win_sdk10.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #pragma once
  2. #if defined(_MSC_VER)
  3. #include <ntverp.h>
  4. // Check for Windows SDK 10+
  5. #if defined(VER_PRODUCTBUILD) && VER_PRODUCTBUILD >= 9600
  6. #define WIN_SDK10 1
  7. #else
  8. #define WIN_SDK10 0
  9. #endif
  10. // Since Windows SDK 10 FILE is an internal opaque structure with no backward compatibility.
  11. // This code has been transplanted from Windows SDK
  12. // corecrt_internal_stdio.h
  13. // __crt_stdio_stream_data
  14. #if WIN_SDK10
  15. typedef struct {
  16. union {
  17. void* _public_file;
  18. char* _ptr;
  19. };
  20. char* _base;
  21. int _cnt;
  22. long _flags;
  23. long _file;
  24. int _charbuf;
  25. int _bufsiz;
  26. char* _tmpfname;
  27. //CRITICAL_SECTION _lock;
  28. } TWinSdk10File;
  29. enum EWinSdk10ModeBits {
  30. WIN_SDK10_IOREAD = 0x0001,
  31. WIN_SDK10_IOWRITE = 0x0002,
  32. WIN_SDK10_IOUPDATE = 0x0004,
  33. WIN_SDK10_IOEOF = 0x0008,
  34. WIN_SDK10_IOERROR = 0x0010,
  35. WIN_SDK10_IOCTRLZ = 0x0020,
  36. WIN_SDK10_IOBUFFER_CRT = 0x0040,
  37. WIN_SDK10_IOBUFFER_USER = 0x0080,
  38. WIN_SDK10_IOBUFFER_SETVBUF = 0x0100,
  39. WIN_SDK10_IOBUFFER_STBUF = 0x0200,
  40. WIN_SDK10_IOBUFFER_NONE = 0x0400,
  41. WIN_SDK10_IOCOMMIT = 0x0800,
  42. WIN_SDK10_IOSTRING = 0x1000,
  43. WIN_SDK10_IOALLOCATED = 0x2000,
  44. };
  45. #endif
  46. #endif