ifndef _INC_SDKDDKVER
define _INC_SDKDDKVER
.pragma list(push, 0)

ifndef WINAPI ; default (API) type
ifdef _WIN64
define WINAPI <fastcall>
else
define WINAPI <stdcall>
endif
endif

define _INTEGRAL_MAX_BITS	64

define _WIN32_WINNT_NT4		0x0400
define _WIN32_WINNT_WIN2K	0x0500
define _WIN32_WINNT_WINXP	0x0501
define _WIN32_WINNT_WS03	0x0502
define _WIN32_WINNT_WIN6	0x0600
define _WIN32_WINNT_VISTA	0x0600
define _WIN32_WINNT_WS08	0x0600
define _WIN32_WINNT_LONGHORN	0x0600
define _WIN32_WINNT_WIN7	0x0601
define _WIN32_WINNT_WIN8	0x0602
define _WIN32_WINNT_WINBLUE	0x0603
define _WIN32_WINNT_WIN10	0x0A00
define _WIN32_WINNT_WINTHRESHOLD 0x0A00

define _WIN32_WINNT_WIN10_TH2	0x0A01
define _WIN32_WINNT_WIN10_RS1	0x0A02
define _WIN32_WINNT_WIN10_RS2	0x0A03
define _WIN32_WINNT_WIN10_RS3	0x0A04
define _WIN32_WINNT_WIN10_RS4	0x0A05
define _NT_TARGET_VERSION_WIN10_RS4 _WIN32_WINNT_WIN10_RS4
define _WIN32_WINNT_WIN10_RS5	0x0A06

define _WIN32_IE_IE20		0x0200
define _WIN32_IE_IE30		0x0300
define _WIN32_IE_IE302		0x0302
define _WIN32_IE_IE40		0x0400
define _WIN32_IE_IE401		0x0401
define _WIN32_IE_IE50		0x0500
define _WIN32_IE_IE501		0x0501
define _WIN32_IE_IE55		0x0550
define _WIN32_IE_IE60		0x0600
define _WIN32_IE_IE60SP1	0x0601
define _WIN32_IE_IE60SP2	0x0603
define _WIN32_IE_IE70		0x0700
define _WIN32_IE_IE80		0x0800
define _WIN32_IE_IE90		0x0900
define _WIN32_IE_IE100		0x0A00
define _WIN32_IE_IE110		0x0A00

define _WIN32_IE_NT4		_WIN32_IE_IE20
define _WIN32_IE_NT4SP1		_WIN32_IE_IE20
define _WIN32_IE_NT4SP2		_WIN32_IE_IE20
define _WIN32_IE_NT4SP3		_WIN32_IE_IE302
define _WIN32_IE_NT4SP4		_WIN32_IE_IE401
define _WIN32_IE_NT4SP5		_WIN32_IE_IE401
define _WIN32_IE_NT4SP6		_WIN32_IE_IE50
define _WIN32_IE_WIN98		_WIN32_IE_IE401
define _WIN32_IE_WIN98SE	_WIN32_IE_IE50
define _WIN32_IE_WINME		_WIN32_IE_IE55
define _WIN32_IE_WIN2K		_WIN32_IE_IE501
define _WIN32_IE_WIN2KSP1	_WIN32_IE_IE501
define _WIN32_IE_WIN2KSP2	_WIN32_IE_IE501
define _WIN32_IE_WIN2KSP3	_WIN32_IE_IE501
define _WIN32_IE_WIN2KSP4	_WIN32_IE_IE501
define _WIN32_IE_XP		_WIN32_IE_IE60
define _WIN32_IE_XPSP1		_WIN32_IE_IE60SP1
define _WIN32_IE_XPSP2		_WIN32_IE_IE60SP2
define _WIN32_IE_WS03		_WIN32_WINNT_WIN8
define _WIN32_IE_WS03SP1	_WIN32_IE_IE60SP2
define _WIN32_IE_WIN6		_WIN32_IE_IE70
define _WIN32_IE_LONGHORN	_WIN32_IE_IE70
define _WIN32_IE_WIN7		_WIN32_IE_IE80
define _WIN32_IE_WIN8		_WIN32_IE_IE100
define _WIN32_IE_WINBLUE	_WIN32_IE_IE100
define _WIN32_IE_WINTHRESHOLD	_WIN32_IE_IE110
define _WIN32_IE_WIN10		_WIN32_IE_IE110


define NTDDI_WIN2K		0x05000000
define NTDDI_WIN2KSP1		0x05000100
define NTDDI_WIN2KSP2		0x05000200
define NTDDI_WIN2KSP3		0x05000300
define NTDDI_WIN2KSP4		0x05000400

define NTDDI_WINXP		0x05010000
define NTDDI_WINXPSP1		0x05010100
define NTDDI_WINXPSP2		0x05010200
define NTDDI_WINXPSP3		0x05010300
define NTDDI_WINXPSP4		0x05010400

define NTDDI_WS03		0x05020000
define NTDDI_WS03SP1		0x05020100
define NTDDI_WS03SP2		0x05020200
define NTDDI_WS03SP3		0x05020300
define NTDDI_WS03SP4		0x05020400

define NTDDI_WIN6		0x06000000
define NTDDI_WIN6SP1		0x06000100
define NTDDI_WIN6SP2		0x06000200
define NTDDI_WIN6SP3		0x06000300
define NTDDI_WIN6SP4		0x06000400

define NTDDI_VISTA		NTDDI_WIN6
define NTDDI_VISTASP1		NTDDI_WIN6SP1
define NTDDI_VISTASP2		NTDDI_WIN6SP2
define NTDDI_VISTASP3		NTDDI_WIN6SP3
define NTDDI_VISTASP4		NTDDI_WIN6SP4

define NTDDI_LONGHORN		NTDDI_VISTA

define NTDDI_WS08		NTDDI_WIN6SP1
define NTDDI_WS08SP2		NTDDI_WIN6SP2
define NTDDI_WS08SP3		NTDDI_WIN6SP3
define NTDDI_WS08SP4		NTDDI_WIN6SP4

define NTDDI_WIN7		0x06010000
define NTDDI_WIN7SP1		0x06010100
define NTDDI_WIN8		0x06020000
define NTDDI_WINBLUE		0x06030000
define NTDDI_WINTHRESHOLD	0x0A000000
define NTDDI_WIN10		0x0A000000

define NTDDI_WIN10_TH2		0x0A000001
define NTDDI_WIN10_RS1		0x0A000002
define NTDDI_WIN10_RS2		0x0A000003
define NTDDI_WIN10_RS3		0x0A000004
define NTDDI_WIN10_RS4		0x0A000005
define NTDDI_WIN10_RS5		0x0A000006
define NTDDI_WIN10_19H1		0x0A000007
define NTDDI_WIN10_VB		0x0A000008
define NTDDI_WIN10_MN		0x0A000009

define WDK_NTDDI_VERSION	NTDDI_WIN10_VB

define OSVERSION_MASK		0xFFFF0000
define SPVERSION_MASK		0x0000FF00
define SUBVERSION_MASK		0x000000FF

OSVER macro Version
    exitm<((Version) and OSVERSION_MASK)>
    endm

SPVER macro Version
    exitm<(((Version) and SPVERSION_MASK) shr 8)>
    endm

SUBVER macro Version
    exitm<(((Version) and SUBVERSION_MASK) )>
    endm

ifdef DECLSPEC_DEPRECATED_DDK

if (NTDDI_VERSION GE NTDDI_WIN2K)
define DECLSPEC_DEPRECATED_DDK_WIN2K DECSPEC_DEPRECATED_DDK
else
define DECLSPEC_DEPRECATED_DDK_WIN2K <>
endif

if (NTDDI_VERSION GE NTDDI_WINXP)
define DECLSPEC_DEPRECATED_DDK_WINXP DECSPEC_DEPRECATED_DDK
else
define DECLSPEC_DEPRECATED_DDK_WINXP <>
endif

if (NTDDI_VERSION GE NTDDI_WS03)
define DECLSPEC_DEPRECATED_DDK_WIN2003 DECSPEC_DEPRECATED_DDK
else
define DECLSPEC_DEPRECATED_DDK_WIN2003 <>
endif

if (NTDDI_VERSION GE NTDDI_WIN6)
define DECLSPEC_DEPRECATED_DDK_WIN6 DECSPEC_DEPRECATED_DDK
else
define DECLSPEC_DEPRECATED_DDK_WIN6 <>
endif

define DECLSPEC_DEPRECATED_DDK_LONGHORN DECSPEC_DEPRECATED_DDK_WIN6

endif

if NOT defined(_WIN32_WINNT) AND NOT defined(NTDDI_VERSION)
ifndef PSAPI_VERSION
define PSAPI_VERSION
endif
endif

if NOT defined(_WIN32_WINNT) AND NOT defined(_CHICAGO_)
define _WIN32_WINNT _WIN32_WINNT_WIN7
endif

ifndef NTDDI_VERSION
ifdef _WIN32_WINNT
define NTDDI_VERSION (_WIN32_WINNT SHL 16)
define _WINNT_WINNT _WIN32_WINNT
else
define NTDDI_VERSION NTDDI_WIN7
define _WINNT_WINNT _WIN32_WINNT_WIN7
endif
endif
define NTDDI_WIN2003 NTDDI_WIN2K

ifndef WINVER
ifdef _WIN95
define WINVER _WIN32_WINNT_NT4
elseifdef _WIN32
define WINVER _WIN32_WINNT_WS03
else
define WINVER _WIN32_WINNT_WIN7
define _MSC_VER 1700
define _MSC_FULL_VER 170000000
endif
endif

ifndef _WIN32_WINDOWS
define _WIN32_WINDOWS 0x0410
endif

ifndef _WIN32_IE
ifdef _WIN32_WINNT
if (_WIN32_WINNT LE _WIN32_WINNT_NT4)
define _WIN32_IE _WIN32_IE_IE50
elseif (_WIN32_WINNT LE _WIN32_WINNT_WIN2K)
define _WIN32_IE _WIN32_IE_IE501
elseif (_WIN32_WINNT LE _WIN32_WINNT_WINXP)
define _WIN32_IE _WIN32_IE_IE60
elseif (_WIN32_WINNT LE _WIN32_WINNT_WS03)
define _WIN32_IE _WIN32_IE_WS03
elseif (_WIN32_WINNT LE _WIN32_WINNT_VISTA)
define _WIN32_IE _WIN32_IE_LONGHORN
elseif (_WIN32_WINNT LE _WIN32_WINNT_WIN7)
define _WIN32_IE _WIN32_IE_WIN7
elseif (_WIN32_WINNT LE _WIN32_WINNT_WIN8)
define _WIN32_IE _WIN32_IE_WIN8
else
define _WIN32_IE 0x0A00
endif
else
define _WIN32_IE 0x0A00
endif
endif


if defined(_WIN32_WINNT) AND NOT defined(MIDL_PASS)

if ((WINVER LT 0x0400) AND (_WIN32_WINNT GT 0x0400))
.err <WINVER setting conflicts with _WIN32_WINNT setting>
endif

if (((OSVERSION_MASK AND NTDDI_VERSION) EQ NTDDI_WIN2K) AND (_WIN32_WINNT NE _WIN32_WINNT_WIN2K))
.err <NTDDI_VERSION setting conflicts with _WIN32_WINNT setting>
endif

if (((OSVERSION_MASK AND NTDDI_VERSION) EQ NTDDI_WINXP) AND (_WIN32_WINNT NE _WIN32_WINNT_WINXP))
.err <NTDDI_VERSION setting conflicts with _WIN32_WINNT setting>
endif

if (((OSVERSION_MASK AND NTDDI_VERSION) EQ NTDDI_WS03) AND (_WIN32_WINNT NE _WIN32_WINNT_WS03))
.err <NTDDI_VERSION setting conflicts with _WIN32_WINNT setting>
endif

if (((OSVERSION_MASK AND NTDDI_VERSION) EQ NTDDI_VISTA) AND (_WIN32_WINNT NE _WIN32_WINNT_VISTA))
.err <NTDDI_VERSION setting conflicts with _WIN32_WINNT setting>
endif

if ((_WIN32_WINNT LT _WIN32_WINNT_WIN2K) AND (_WIN32_IE GT _WIN32_IE_IE60SP1))
.err <_WIN32_WINNT settings conflicts with _WIN32_IE setting>
endif

endif

.pragma list(pop)
endif

