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 
     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 
     40 /* Mappings Between IE Version  and Windows Version */
     41 #define _WIN32_IE_NT4			_WIN32_IE_IE20
     42 #define _WIN32_IE_NT4SP1		_WIN32_IE_IE20
     43 #define _WIN32_IE_NT4SP2		_WIN32_IE_IE20
     44 #define _WIN32_IE_NT4SP3		_WIN32_IE_IE302
     45 #define _WIN32_IE_NT4SP4		_WIN32_IE_IE401
     46 #define _WIN32_IE_NT4SP5		_WIN32_IE_IE401
     47 #define _WIN32_IE_NT4SP6		_WIN32_IE_IE50
     48 #define _WIN32_IE_WIN98			_WIN32_IE_IE401
     49 #define _WIN32_IE_WIN98SE		_WIN32_IE_IE50
     50 #define _WIN32_IE_WINME			_WIN32_IE_IE55
     51 #define _WIN32_IE_WIN2K			_WIN32_IE_IE501
     52 #define _WIN32_IE_WIN2KSP1		_WIN32_IE_IE501
     53 #define _WIN32_IE_WIN2KSP2		_WIN32_IE_IE501
     54 #define _WIN32_IE_WIN2KSP3		_WIN32_IE_IE501
     55 #define _WIN32_IE_WIN2KSP4		_WIN32_IE_IE501
     56 #define _WIN32_IE_XP			_WIN32_IE_IE60
     57 #define _WIN32_IE_XPSP1			_WIN32_IE_IE60SP1
     58 #define _WIN32_IE_XPSP2			_WIN32_IE_IE60SP2
     59 #define _WIN32_IE_WS03			0x0602
     60 #define _WIN32_IE_WS03SP1		_WIN32_IE_IE60SP2
     61 #define _WIN32_IE_WIN6			_WIN32_IE_IE70
     62 #define _WIN32_IE_LONGHORN		_WIN32_IE_IE70
     63 #define _WIN32_IE_WIN7			_WIN32_IE_IE80
     64 
     65 /* NTDDI_VERSION */
     66 #ifndef NTDDI_WIN2K
     67 #define NTDDI_WIN2K			0x05000000
     68 #endif
     69 #ifndef NTDDI_WIN2KSP1
     70 #define NTDDI_WIN2KSP1			0x05000100
     71 #endif
     72 #ifndef NTDDI_WIN2KSP2
     73 #define NTDDI_WIN2KSP2			0x05000200
     74 #endif
     75 #ifndef NTDDI_WIN2KSP3
     76 #define NTDDI_WIN2KSP3			0x05000300
     77 #endif
     78 #ifndef NTDDI_WIN2KSP4
     79 #define NTDDI_WIN2KSP4			0x05000400
     80 #endif
     81 
     82 #ifndef NTDDI_WINXP
     83 #define NTDDI_WINXP			0x05010000
     84 #endif
     85 #ifndef NTDDI_WINXPSP1
     86 #define NTDDI_WINXPSP1			0x05010100
     87 #endif
     88 #ifndef NTDDI_WINXPSP2
     89 #define NTDDI_WINXPSP2			0x05010200
     90 #endif
     91 #ifndef NTDDI_WINXPSP3
     92 #define NTDDI_WINXPSP3			0x05010300
     93 #endif
     94 #ifndef NTDDI_WINXPSP4
     95 #define NTDDI_WINXPSP4			0x05010400
     96 #endif
     97 
     98 #define NTDDI_WS03			0x05020000
     99 #define NTDDI_WS03SP1			0x05020100
    100 #define NTDDI_WS03SP2			0x05020200
    101 #define NTDDI_WS03SP3			0x05020300
    102 #define NTDDI_WS03SP4			0x05020400
    103 
    104 #define NTDDI_WIN6			0x06000000
    105 #define NTDDI_WIN6SP1			0x06000100
    106 #define NTDDI_WIN6SP2			0x06000200
    107 #define NTDDI_WIN6SP3			0x06000300
    108 #define NTDDI_WIN6SP4			0x06000400
    109 
    110 #define NTDDI_VISTA			NTDDI_WIN6
    111 #define NTDDI_VISTASP1			NTDDI_WIN6SP1
    112 #define NTDDI_VISTASP2			NTDDI_WIN6SP2
    113 #define NTDDI_VISTASP3			NTDDI_WIN6SP3
    114 #define NTDDI_VISTASP4			NTDDI_WIN6SP4
    115 #define NTDDI_LONGHORN			NTDDI_VISTA
    116 
    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 
    122 #define NTDDI_WIN7			0x06010000
    123 #define NTDDI_WIN8                      0x06020000
    124 
    125 /* Version Fields in NTDDI_VERSION */
    126 #define OSVERSION_MASK			0xFFFF0000
    127 #define SPVERSION_MASK			0x0000FF00
    128 #define SUBVERSION_MASK			0x000000FF
    129 
    130 /* Macros to Extract Version Fields From NTDDI_VERSION */
    131 #define OSVER(Version)			((Version) & OSVERSION_MASK)
    132 #define SPVER(Version)			(((Version) & SPVERSION_MASK) >> 8)
    133 #define SUBVER(Version)			(((Version) & SUBVERSION_MASK))
    134 
    135 /* Macros to get the NTDDI for a given WIN32 */
    136 #define NTDDI_VERSION_FROM_WIN32_WINNT2(Version)	Version##0000
    137 #define NTDDI_VERSION_FROM_WIN32_WINNT(Version)		NTDDI_VERSION_FROM_WIN32_WINNT2(Version)
    138 
    139 /* Select Default WIN32_WINNT Value */
    140 #if !defined(_WIN32_WINNT) && !defined(_CHICAGO_)
    141 #define _WIN32_WINNT	_WIN32_WINNT_WS03
    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	NTDDI_WS03
    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		0x0502
    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	0x0602
    173 #else
    174 #define _WIN32_IE	0x0700
    175 #endif
    176 #else
    177 #define _WIN32_IE	0x0700
    178 #endif
    179 #endif
    180 
    181 /* Make Sure NTDDI_VERSION and _WIN32_WINNT Match */
    182 #if ((OSVER(NTDDI_VERSION) == NTDDI_WIN2K) && (_WIN32_WINNT != _WIN32_WINNT_WIN2K)) || \
    183     ((OSVER(NTDDI_VERSION) == NTDDI_WINXP) && (_WIN32_WINNT != _WIN32_WINNT_WINXP)) || \
    184     ((OSVER(NTDDI_VERSION) == NTDDI_WS03) && (_WIN32_WINNT != _WIN32_WINNT_WS03))   || \
    185     ((OSVER(NTDDI_VERSION) == NTDDI_WINXP) && (_WIN32_WINNT != _WIN32_WINNT_WINXP))
    186 #error NTDDI_VERSION and _WIN32_WINNT mismatch!
    187 #endif
    188 
    189 #endif /* _INC_SDKDDKVER */
    190