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