sdkddkver.h 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. /**
  2. * sdkddkver.h: Version definitions for SDK and DDK. Originally
  3. * from ReactOS PSDK/DDK, this file is in the public domain:
  4. *
  5. * This file has no copyright assigned and is placed in the Public Domain.
  6. * This file is part of the mingw-w64 runtime package.
  7. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  8. */
  9. #ifndef _INC_SDKDDKVER
  10. #define _INC_SDKDDKVER
  11. /* _WIN32_WINNT */
  12. #define _WIN32_WINNT_NT4 0x0400
  13. #define _WIN32_WINNT_WIN2K 0x0500
  14. #define _WIN32_WINNT_WINXP 0x0501
  15. #define _WIN32_WINNT_WS03 0x0502
  16. #define _WIN32_WINNT_WIN6 0x0600
  17. #define _WIN32_WINNT_VISTA 0x0600
  18. #define _WIN32_WINNT_WS08 0x0600
  19. #define _WIN32_WINNT_LONGHORN 0x0600
  20. #define _WIN32_WINNT_WIN7 0x0601
  21. #define _WIN32_WINNT_WIN8 0x0602
  22. #define _WIN32_WINNT_WINBLUE 0x0603
  23. #define _WIN32_WINNT_WINTHRESHOLD 0x0A00
  24. #define _WIN32_WINNT_WIN10 0x0A00
  25. /* _WIN32_IE */
  26. #define _WIN32_IE_IE20 0x0200
  27. #define _WIN32_IE_IE30 0x0300
  28. #define _WIN32_IE_IE302 0x0302
  29. #define _WIN32_IE_IE40 0x0400
  30. #define _WIN32_IE_IE401 0x0401
  31. #define _WIN32_IE_IE50 0x0500
  32. #define _WIN32_IE_IE501 0x0501
  33. #define _WIN32_IE_IE55 0x0550
  34. #define _WIN32_IE_IE60 0x0600
  35. #define _WIN32_IE_IE60SP1 0x0601
  36. #define _WIN32_IE_IE60SP2 0x0603
  37. #define _WIN32_IE_IE70 0x0700
  38. #define _WIN32_IE_IE80 0x0800
  39. #define _WIN32_IE_IE90 0x0900
  40. #define _WIN32_IE_IE100 0x0a00
  41. #define _WIN32_IE_IE110 0x0A00
  42. /* Mappings Between IE Version and Windows Version */
  43. #define _WIN32_IE_NT4 _WIN32_IE_IE20
  44. #define _WIN32_IE_NT4SP1 _WIN32_IE_IE20
  45. #define _WIN32_IE_NT4SP2 _WIN32_IE_IE20
  46. #define _WIN32_IE_NT4SP3 _WIN32_IE_IE302
  47. #define _WIN32_IE_NT4SP4 _WIN32_IE_IE401
  48. #define _WIN32_IE_NT4SP5 _WIN32_IE_IE401
  49. #define _WIN32_IE_NT4SP6 _WIN32_IE_IE50
  50. #define _WIN32_IE_WIN98 _WIN32_IE_IE401
  51. #define _WIN32_IE_WIN98SE _WIN32_IE_IE50
  52. #define _WIN32_IE_WINME _WIN32_IE_IE55
  53. #define _WIN32_IE_WIN2K _WIN32_IE_IE501
  54. #define _WIN32_IE_WIN2KSP1 _WIN32_IE_IE501
  55. #define _WIN32_IE_WIN2KSP2 _WIN32_IE_IE501
  56. #define _WIN32_IE_WIN2KSP3 _WIN32_IE_IE501
  57. #define _WIN32_IE_WIN2KSP4 _WIN32_IE_IE501
  58. #define _WIN32_IE_XP _WIN32_IE_IE60
  59. #define _WIN32_IE_XPSP1 _WIN32_IE_IE60SP1
  60. #define _WIN32_IE_XPSP2 _WIN32_IE_IE60SP2
  61. #define _WIN32_IE_WS03 0x0602
  62. #define _WIN32_IE_WS03SP1 _WIN32_IE_IE60SP2
  63. #define _WIN32_IE_WIN6 _WIN32_IE_IE70
  64. #define _WIN32_IE_LONGHORN _WIN32_IE_IE70
  65. #define _WIN32_IE_WIN7 _WIN32_IE_IE80
  66. #define _WIN32_IE_WIN8 _WIN32_IE_IE100
  67. #define _WIN32_IE_WINBLUE _WIN32_IE_IE100
  68. #define _WIN32_IE_WINTHRESHOLD _WIN32_IE_IE110
  69. #define _WIN32_IE_WIN10 _WIN32_IE_IE110
  70. /* NTDDI_VERSION */
  71. #ifndef NTDDI_WIN2K
  72. #define NTDDI_WIN2K 0x05000000
  73. #endif
  74. #ifndef NTDDI_WIN2KSP1
  75. #define NTDDI_WIN2KSP1 0x05000100
  76. #endif
  77. #ifndef NTDDI_WIN2KSP2
  78. #define NTDDI_WIN2KSP2 0x05000200
  79. #endif
  80. #ifndef NTDDI_WIN2KSP3
  81. #define NTDDI_WIN2KSP3 0x05000300
  82. #endif
  83. #ifndef NTDDI_WIN2KSP4
  84. #define NTDDI_WIN2KSP4 0x05000400
  85. #endif
  86. #ifndef NTDDI_WINXP
  87. #define NTDDI_WINXP 0x05010000
  88. #endif
  89. #ifndef NTDDI_WINXPSP1
  90. #define NTDDI_WINXPSP1 0x05010100
  91. #endif
  92. #ifndef NTDDI_WINXPSP2
  93. #define NTDDI_WINXPSP2 0x05010200
  94. #endif
  95. #ifndef NTDDI_WINXPSP3
  96. #define NTDDI_WINXPSP3 0x05010300
  97. #endif
  98. #ifndef NTDDI_WINXPSP4
  99. #define NTDDI_WINXPSP4 0x05010400
  100. #endif
  101. #define NTDDI_WS03 0x05020000
  102. #define NTDDI_WS03SP1 0x05020100
  103. #define NTDDI_WS03SP2 0x05020200
  104. #define NTDDI_WS03SP3 0x05020300
  105. #define NTDDI_WS03SP4 0x05020400
  106. #define NTDDI_WIN6 0x06000000
  107. #define NTDDI_WIN6SP1 0x06000100
  108. #define NTDDI_WIN6SP2 0x06000200
  109. #define NTDDI_WIN6SP3 0x06000300
  110. #define NTDDI_WIN6SP4 0x06000400
  111. #define NTDDI_VISTA NTDDI_WIN6
  112. #define NTDDI_VISTASP1 NTDDI_WIN6SP1
  113. #define NTDDI_VISTASP2 NTDDI_WIN6SP2
  114. #define NTDDI_VISTASP3 NTDDI_WIN6SP3
  115. #define NTDDI_VISTASP4 NTDDI_WIN6SP4
  116. #define NTDDI_LONGHORN NTDDI_VISTA
  117. #define NTDDI_WS08 NTDDI_WIN6SP1
  118. #define NTDDI_WS08SP2 NTDDI_WIN6SP2
  119. #define NTDDI_WS08SP3 NTDDI_WIN6SP3
  120. #define NTDDI_WS08SP4 NTDDI_WIN6SP4
  121. #define NTDDI_WIN7 0x06010000
  122. #define NTDDI_WIN8 0x06020000
  123. #define NTDDI_WINBLUE 0x06030000
  124. #define NTDDI_WINTHRESHOLD 0x0A000000
  125. #define NTDDI_WIN10 0x0A000000
  126. #define NTDDI_WIN10_TH2 0x0A000001
  127. #define NTDDI_WIN10_RS1 0x0A000002
  128. #define NTDDI_WIN10_RS2 0x0A000003
  129. #define NTDDI_WIN10_RS3 0x0A000004
  130. #define NTDDI_WIN10_RS4 0x0A000005
  131. #define NTDDI_WIN10_RS5 0x0A000006
  132. #define NTDDI_WIN10_19H1 0x0A000007
  133. #define NTDDI_WIN10_VB 0x0A000008
  134. #define NTDDI_WIN10_MN 0x0A000009
  135. #define NTDDI_WIN10_FE 0x0A00000A
  136. #define NTDDI_WIN10_CO 0x0A00000B
  137. #define NTDDI_WIN10_NI 0x0A00000C
  138. #define WDK_NTDDI_VERSION NTDDI_WIN10_NI
  139. /* Version Fields in NTDDI_VERSION */
  140. #define OSVERSION_MASK 0xFFFF0000U
  141. #define SPVERSION_MASK 0x0000FF00
  142. #define SUBVERSION_MASK 0x000000FF
  143. /* Macros to Extract Version Fields From NTDDI_VERSION */
  144. #define OSVER(Version) ((Version) & OSVERSION_MASK)
  145. #define SPVER(Version) (((Version) & SPVERSION_MASK) >> 8)
  146. #define SUBVER(Version) (((Version) & SUBVERSION_MASK))
  147. /* Macros to get the NTDDI for a given WIN32 */
  148. #define NTDDI_VERSION_FROM_WIN32_WINNT2(Version) Version##0000
  149. #define NTDDI_VERSION_FROM_WIN32_WINNT(Version) NTDDI_VERSION_FROM_WIN32_WINNT2(Version)
  150. /* Select Default WIN32_WINNT Value */
  151. #if !defined(_WIN32_WINNT) && !defined(_CHICAGO_)
  152. #define _WIN32_WINNT _WIN32_WINNT_WS03
  153. #endif
  154. /* Choose NTDDI Version */
  155. #ifndef NTDDI_VERSION
  156. #ifdef _WIN32_WINNT
  157. #define NTDDI_VERSION NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT)
  158. #else
  159. #define NTDDI_VERSION NTDDI_WS03
  160. #endif
  161. #endif
  162. /* Choose WINVER Value */
  163. #ifndef WINVER
  164. #ifdef _WIN32_WINNT
  165. #define WINVER _WIN32_WINNT
  166. #else
  167. #define WINVER 0x0502
  168. #endif
  169. #endif
  170. /* Choose IE Version */
  171. #ifndef _WIN32_IE
  172. #ifdef _WIN32_WINNT
  173. #if (_WIN32_WINNT <= _WIN32_WINNT_NT4)
  174. #define _WIN32_IE _WIN32_IE_IE50
  175. #elif (_WIN32_WINNT <= _WIN32_WINNT_WIN2K)
  176. #define _WIN32_IE _WIN32_IE_IE501
  177. #elif (_WIN32_WINNT <= _WIN32_WINNT_WINXP)
  178. #define _WIN32_IE _WIN32_IE_IE60
  179. #elif (_WIN32_WINNT <= _WIN32_WINNT_WS03)
  180. #define _WIN32_IE _WIN32_IE_WS03
  181. #elif (_WIN32_WINNT <= _WIN32_WINNT_VISTA)
  182. #define _WIN32_IE _WIN32_IE_LONGHORN
  183. #elif (_WIN32_WINNT <= _WIN32_WINNT_WIN7)
  184. #define _WIN32_IE _WIN32_IE_WIN7
  185. #elif (_WIN32_WINNT <= _WIN32_WINNT_WIN8)
  186. #define _WIN32_IE _WIN32_IE_WIN8
  187. #else
  188. #define _WIN32_IE 0x0a00
  189. #endif
  190. #else
  191. #define _WIN32_IE 0x0700
  192. #endif
  193. #endif
  194. /* Make Sure NTDDI_VERSION and _WIN32_WINNT Match */
  195. #if ((OSVER(NTDDI_VERSION) == NTDDI_WIN2K) && (_WIN32_WINNT != _WIN32_WINNT_WIN2K)) || \
  196. ((OSVER(NTDDI_VERSION) == NTDDI_WINXP) && (_WIN32_WINNT != _WIN32_WINNT_WINXP)) || \
  197. ((OSVER(NTDDI_VERSION) == NTDDI_WS03) && (_WIN32_WINNT != _WIN32_WINNT_WS03)) || \
  198. ((OSVER(NTDDI_VERSION) == NTDDI_WINXP) && (_WIN32_WINNT != _WIN32_WINNT_WINXP))
  199. #error NTDDI_VERSION and _WIN32_WINNT mismatch!
  200. #endif
  201. #endif /* _INC_SDKDDKVER */