Home | History | Annotate | Download | only in include
      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 
     26 /* _WIN32_IE */
     27 #define _WIN32_IE_IE20			0x0200
     28 #define _WIN32_IE_IE30			0x0300
     29 #define _WIN32_IE_IE302			0x0302
     30 #define _WIN32_IE_IE40			0x0400
     31 #define _WIN32_IE_IE401			0x0401
     32 #define _WIN32_IE_IE50			0x0500
     33 #define _WIN32_IE_IE501			0x0501
     34 #define _WIN32_IE_IE55			0x0550
     35 #define _WIN32_IE_IE60			0x0600
     36 #define _WIN32_IE_IE60SP1		0x0601
     37 #define _WIN32_IE_IE60SP2		0x0603
     38 #define _WIN32_IE_IE70			0x0700
     39 #define _WIN32_IE_IE80			0x0800
     40 #define _WIN32_IE_IE90                  0x0900
     41 #define _WIN32_IE_IE100                 0x0a00
     42 
     43 /* Mappings Between IE Version  and Windows Version */
     44 #define _WIN32_IE_NT4			_WIN32_IE_IE20
     45 #define _WIN32_IE_NT4SP1		_WIN32_IE_IE20
     46 #define _WIN32_IE_NT4SP2		_WIN32_IE_IE20
     47 #define _WIN32_IE_NT4SP3		_WIN32_IE_IE302
     48 #define _WIN32_IE_NT4SP4		_WIN32_IE_IE401
     49 #define _WIN32_IE_NT4SP5		_WIN32_IE_IE401
     50 #define _WIN32_IE_NT4SP6		_WIN32_IE_IE50
     51 #define _WIN32_IE_WIN98			_WIN32_IE_IE401
     52 #define _WIN32_IE_WIN98SE		_WIN32_IE_IE50
     53 #define _WIN32_IE_WINME			_WIN32_IE_IE55
     54 #define _WIN32_IE_WIN2K			_WIN32_IE_IE501
     55 #define _WIN32_IE_WIN2KSP1		_WIN32_IE_IE501
     56 #define _WIN32_IE_WIN2KSP2		_WIN32_IE_IE501
     57 #define _WIN32_IE_WIN2KSP3		_WIN32_IE_IE501
     58 #define _WIN32_IE_WIN2KSP4		_WIN32_IE_IE501
     59 #define _WIN32_IE_XP			_WIN32_IE_IE60
     60 #define _WIN32_IE_XPSP1			_WIN32_IE_IE60SP1
     61 #define _WIN32_IE_XPSP2			_WIN32_IE_IE60SP2
     62 #define _WIN32_IE_WS03			0x0602
     63 #define _WIN32_IE_WS03SP1		_WIN32_IE_IE60SP2
     64 #define _WIN32_IE_WIN6			_WIN32_IE_IE70
     65 #define _WIN32_IE_LONGHORN		_WIN32_IE_IE70
     66 #define _WIN32_IE_WIN7			_WIN32_IE_IE80
     67 #define _WIN32_IE_WIN8                  _WIN32_IE_IE100
     68 #define _WIN32_IE_WINBLUE               _WIN32_IE_IE100
     69 
     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 
     87 #ifndef NTDDI_WINXP
     88 #define NTDDI_WINXP			0x05010000
     89 #endif
     90 #ifndef NTDDI_WINXPSP1
     91 #define NTDDI_WINXPSP1			0x05010100
     92 #endif
     93 #ifndef NTDDI_WINXPSP2
     94 #define NTDDI_WINXPSP2			0x05010200
     95 #endif
     96 #ifndef NTDDI_WINXPSP3
     97 #define NTDDI_WINXPSP3			0x05010300
     98 #endif
     99 #ifndef NTDDI_WINXPSP4
    100 #define NTDDI_WINXPSP4			0x05010400
    101 #endif
    102 
    103 #define NTDDI_WS03			0x05020000
    104 #define NTDDI_WS03SP1			0x05020100
    105 #define NTDDI_WS03SP2			0x05020200
    106 #define NTDDI_WS03SP3			0x05020300
    107 #define NTDDI_WS03SP4			0x05020400
    108 
    109 #define NTDDI_WIN6			0x06000000
    110 #define NTDDI_WIN6SP1			0x06000100
    111 #define NTDDI_WIN6SP2			0x06000200
    112 #define NTDDI_WIN6SP3			0x06000300
    113 #define NTDDI_WIN6SP4			0x06000400
    114 
    115 #define NTDDI_VISTA			NTDDI_WIN6
    116 #define NTDDI_VISTASP1			NTDDI_WIN6SP1
    117 #define NTDDI_VISTASP2			NTDDI_WIN6SP2
    118 #define NTDDI_VISTASP3			NTDDI_WIN6SP3
    119 #define NTDDI_VISTASP4			NTDDI_WIN6SP4
    120 #define NTDDI_LONGHORN			NTDDI_VISTA
    121 
    122 #define NTDDI_WS08			NTDDI_WIN6SP1
    123 #define NTDDI_WS08SP2			NTDDI_WIN6SP2
    124 #define NTDDI_WS08SP3			NTDDI_WIN6SP3
    125 #define NTDDI_WS08SP4			NTDDI_WIN6SP4
    126 
    127 #define NTDDI_WIN7			0x06010000
    128 #define NTDDI_WIN8                      0x06020000
    129 #define NTDDI_WINBLUE                   0x06030000
    130 
    131 /* Version Fields in NTDDI_VERSION */
    132 #define OSVERSION_MASK			0xFFFF0000U
    133 #define SPVERSION_MASK			0x0000FF00
    134 #define SUBVERSION_MASK			0x000000FF
    135 
    136 /* Macros to Extract Version Fields From NTDDI_VERSION */
    137 #define OSVER(Version)			((Version) & OSVERSION_MASK)
    138 #define SPVER(Version)			(((Version) & SPVERSION_MASK) >> 8)
    139 #define SUBVER(Version)			(((Version) & SUBVERSION_MASK))
    140 
    141 /* Macros to get the NTDDI for a given WIN32 */
    142 #define NTDDI_VERSION_FROM_WIN32_WINNT2(Version)	Version##0000
    143 #define NTDDI_VERSION_FROM_WIN32_WINNT(Version)		NTDDI_VERSION_FROM_WIN32_WINNT2(Version)
    144 
    145 /* Select Default WIN32_WINNT Value */
    146 #if !defined(_WIN32_WINNT) && !defined(_CHICAGO_)
    147 #define _WIN32_WINNT	_WIN32_WINNT_WS03
    148 #endif
    149 
    150 /* Choose NTDDI Version */
    151 #ifndef NTDDI_VERSION
    152 #ifdef _WIN32_WINNT
    153 #define NTDDI_VERSION	NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT)
    154 #else
    155 #define NTDDI_VERSION	NTDDI_WS03
    156 #endif
    157 #endif
    158 
    159 /* Choose WINVER Value */
    160 #ifndef WINVER
    161 #ifdef _WIN32_WINNT
    162 #define WINVER		_WIN32_WINNT
    163 #else
    164 #define WINVER		0x0502
    165 #endif
    166 #endif
    167 
    168 /* Choose IE Version */
    169 #ifndef _WIN32_IE
    170 #ifdef _WIN32_WINNT
    171 #if (_WIN32_WINNT <= _WIN32_WINNT_NT4)
    172 #define _WIN32_IE	_WIN32_IE_IE50
    173 #elif (_WIN32_WINNT <= _WIN32_WINNT_WIN2K)
    174 #define _WIN32_IE	_WIN32_IE_IE501
    175 #elif (_WIN32_WINNT <= _WIN32_WINNT_WINXP)
    176 #define _WIN32_IE	_WIN32_IE_IE60
    177 #elif (_WIN32_WINNT <= _WIN32_WINNT_WS03)
    178 #define _WIN32_IE	_WIN32_IE_WS03
    179 #elif (_WIN32_WINNT <= _WIN32_WINNT_VISTA)
    180 #define _WIN32_IE       _WIN32_IE_LONGHORN
    181 #elif (_WIN32_WINNT <= _WIN32_WINNT_WIN7)
    182 #define _WIN32_IE       _WIN32_IE_WIN7
    183 #elif (_WIN32_WINNT <= _WIN32_WINNT_WIN8)
    184 #define _WIN32_IE       _WIN32_IE_WIN8
    185 #else
    186 #define _WIN32_IE       0x0a00
    187 #endif
    188 #else
    189 #define _WIN32_IE	0x0700
    190 #endif
    191 #endif
    192 
    193 /* Make Sure NTDDI_VERSION and _WIN32_WINNT Match */
    194 #if ((OSVER(NTDDI_VERSION) == NTDDI_WIN2K) && (_WIN32_WINNT != _WIN32_WINNT_WIN2K)) || \
    195     ((OSVER(NTDDI_VERSION) == NTDDI_WINXP) && (_WIN32_WINNT != _WIN32_WINNT_WINXP)) || \
    196     ((OSVER(NTDDI_VERSION) == NTDDI_WS03) && (_WIN32_WINNT != _WIN32_WINNT_WS03))   || \
    197     ((OSVER(NTDDI_VERSION) == NTDDI_WINXP) && (_WIN32_WINNT != _WIN32_WINNT_WINXP))
    198 #error NTDDI_VERSION and _WIN32_WINNT mismatch!
    199 #endif
    200 
    201 #endif /* _INC_SDKDDKVER */
    202