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