blob: 5133c1fc9d69760f486b44095c8ce0c276bf0084 [file] [log] [blame]
/**
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _WINNT_
#define _WINNT_
#include <_mingw_unicode.h>
#ifdef __cplusplus
extern "C" {
#endif
#include <_mingw.h>
#include <ctype.h>
#include <excpt.h>
#include <winapifamily.h>
#include <apiset.h>
#define ANYSIZE_ARRAY 1
#include <specstrings.h>
#ifndef __WIDL__
#define __INTRINSIC_GROUP_WINNT /* only define the intrinsics in this file */
#include <psdk_inc/intrin-impl.h>
#endif
#if defined(__x86_64) && \
!(defined(_X86_) || defined(__i386__) || defined(_IA64_) || defined (__arm__) || defined(__aarch64__))
#if !defined(_AMD64_)
#define _AMD64_
#endif
#endif /* _AMD64_ */
#if defined(__arm__) && \
!(defined(_X86_) || defined(__x86_64) || defined(_AMD64_) || defined (__ia64__) || defined(__aarch64__))
#if !defined(_ARM_)
#define _ARM_
#endif
#endif /* _ARM_ */
#if defined(__aarch64__) && \
!(defined(_X86_) || defined(__x86_64) || defined(_AMD64_) || defined (__ia64__) || defined(__arm__))
#if !defined(_ARM64_)
#define _ARM64_
#endif
#endif /* _ARM64_ */
#if defined(__ia64__) && \
!(defined(_X86_) || defined(__x86_64) || defined(_AMD64_) || defined (__arm__) || defined(__aarch64__))
#if !defined(_IA64_)
#define _IA64_
#endif
#endif /* _IA64_ */
#include <sdkddkver.h>
#ifndef DUMMYUNIONNAME
#if defined (NONAMELESSUNION)
#define DUMMYUNIONNAME u
#define DUMMYUNIONNAME2 u2
#define DUMMYUNIONNAME3 u3
#define DUMMYUNIONNAME4 u4
#define DUMMYUNIONNAME5 u5
#define DUMMYUNIONNAME6 u6
#define DUMMYUNIONNAME7 u7
#define DUMMYUNIONNAME8 u8
#define DUMMYUNIONNAME9 u9
#else
#define DUMMYUNIONNAME
#define DUMMYUNIONNAME2
#define DUMMYUNIONNAME3
#define DUMMYUNIONNAME4
#define DUMMYUNIONNAME5
#define DUMMYUNIONNAME6
#define DUMMYUNIONNAME7
#define DUMMYUNIONNAME8
#define DUMMYUNIONNAME9
#endif
#endif
#ifndef DUMMYSTRUCTNAME
#if defined (NONAMELESSUNION)
#define DUMMYSTRUCTNAME s
#define DUMMYSTRUCTNAME2 s2
#define DUMMYSTRUCTNAME3 s3
#define DUMMYSTRUCTNAME4 s4
#define DUMMYSTRUCTNAME5 s5
#else
#define DUMMYSTRUCTNAME
#define DUMMYSTRUCTNAME2
#define DUMMYSTRUCTNAME3
#define DUMMYSTRUCTNAME4
#define DUMMYSTRUCTNAME5
#endif
#endif
#define RESTRICTED_POINTER
#undef UNALIGNED /* avoid redefinition warnings vs _mingw.h */
#undef UNALIGNED64
#if defined (__ia64__) || defined (__x86_64__) || defined (__arm__) || defined(__aarch64__)
#define ALIGNMENT_MACHINE
#define UNALIGNED __unaligned
#if defined (_WIN64)
#define UNALIGNED64 __unaligned
#else
#define UNALIGNED64
#endif
#else
#undef ALIGNMENT_MACHINE
#define UNALIGNED
#define UNALIGNED64
#endif
#ifdef _WIN64
#define MAX_NATURAL_ALIGNMENT sizeof(ULONGLONG)
#define MEMORY_ALLOCATION_ALIGNMENT 16
#else
#define MAX_NATURAL_ALIGNMENT sizeof(DWORD)
#define MEMORY_ALLOCATION_ALIGNMENT 8
#endif
#ifdef __cplusplus
#define TYPE_ALIGNMENT(t) __alignof__ (t)
#else
#define TYPE_ALIGNMENT(t) FIELD_OFFSET(struct { char x; t test; }, test)
#endif
#if defined (__x86_64__) || defined (__i386__)
#define PROBE_ALIGNMENT(_s) TYPE_ALIGNMENT (DWORD)
#elif defined (__ia64__) || defined (__arm__) || defined(__aarch64__)
#define PROBE_ALIGNMENT(_s) (TYPE_ALIGNMENT (_s) > TYPE_ALIGNMENT (DWORD) ? TYPE_ALIGNMENT (_s) : TYPE_ALIGNMENT (DWORD))
#elif !defined (RC_INVOKED) && !defined (__WIDL__)
#error No supported target architecture.
#endif
#ifdef _WIN64
#define PROBE_ALIGNMENT32(_s) TYPE_ALIGNMENT (DWORD)
#endif
#if defined(_MSC_VER)
# define C_ASSERT(e) typedef char __C_ASSERT__[(e)?1:-1]
#else
# define C_ASSERT(e) extern void __C_ASSERT__(int [(e)?1:-1])
#endif
#include <basetsd.h>
#ifndef DECLSPEC_IMPORT
#if (defined (__i386__) || defined (__ia64__) || defined (__x86_64__) || defined (__arm__) || defined(__aarch64__)) && !defined (__WIDL__)
#define DECLSPEC_IMPORT __declspec (dllimport)
#else
#define DECLSPEC_IMPORT
#endif
#endif
#ifndef DECLSPEC_NORETURN
#ifndef __WIDL__
#define DECLSPEC_NORETURN __declspec (noreturn)
#else
#define DECLSPEC_NORETURN
#endif
#endif
#ifndef DECLSPEC_NOTHROW
#ifndef __WIDL__
#define DECLSPEC_NOTHROW __declspec (nothrow)
#else
#define DECLSPEC_NOTHROW
#endif
#endif
#ifndef DECLSPEC_ALIGN
#ifndef __WIDL__
#if defined(_MSC_VER) && (_MSC_VER >= 1300) && !defined(MIDL_PASS)
#define DECLSPEC_ALIGN(x) __declspec(align(x))
#elif defined(__GNUC__)
#define DECLSPEC_ALIGN(x) __attribute__ ((__aligned__ (x)))
#else
#define DECLSPEC_ALIGN(x) /*__declspec (align (x))*/
#endif
#else
#define DECLSPEC_ALIGN(x)
#endif
#endif /* DECLSPEC_ALIGN */
#ifndef SYSTEM_CACHE_ALIGNMENT_SIZE
#if defined(__x86_64__) || defined(__i386__)
#define SYSTEM_CACHE_ALIGNMENT_SIZE 64
#else
#define SYSTEM_CACHE_ALIGNMENT_SIZE 128
#endif
#endif
#ifndef DECLSPEC_CACHEALIGN
#define DECLSPEC_CACHEALIGN DECLSPEC_ALIGN(SYSTEM_CACHE_ALIGNMENT_SIZE)
#endif
#ifndef DECLSPEC_UUID
#define DECLSPEC_UUID(x)
#endif
#ifndef DECLSPEC_NOVTABLE
#define DECLSPEC_NOVTABLE
#endif
#ifndef DECLSPEC_SELECTANY
#define DECLSPEC_SELECTANY __declspec(selectany)
#endif
#ifndef NOP_FUNCTION
#if (_MSC_VER >= 1210)
#define NOP_FUNCTION __noop
#else
#define NOP_FUNCTION (void)0
#endif
#endif
#ifndef DECLSPEC_ADDRSAFE
#define DECLSPEC_ADDRSAFE
#endif
#ifndef DECLSPEC_NOINLINE
#if (_MSC_VER >= 1300)
#define DECLSPEC_NOINLINE __declspec(noinline)
#elif defined(__GNUC__)
#define DECLSPEC_NOINLINE __attribute__((noinline))
#else
#define DECLSPEC_NOINLINE
#endif
#endif /* DECLSPEC_NOINLINE */
#ifndef FORCEINLINE
#if !defined(_MSC_VER) || (_MSC_VER >=1200)
#define FORCEINLINE __forceinline
#else
#define FORCEINLINE __inline
#endif
#endif /* FORCEINLINE */
#ifndef DECLSPEC_DEPRECATED
#if !defined (__WIDL__)
#define DECLSPEC_DEPRECATED __declspec(deprecated)
#define DEPRECATE_SUPPORTED
#else
#define DECLSPEC_DEPRECATED
#undef DEPRECATE_SUPPORTED
#endif
#endif
#define DECLSPEC_DEPRECATED_DDK
#define PRAGMA_DEPRECATED_DDK 0
typedef void *PVOID;
typedef void *PVOID64;
#ifndef FASTCALL
#if defined (__i386__) && !defined (__WIDL__)
#define FASTCALL __fastcall
#else
#define FASTCALL
#endif
#endif /* FASTCALL */
#if defined(_ARM_) || defined(_ARM64_)
#define NTAPI
#else
#define NTAPI __stdcall
#endif
#define NTAPI_INLINE NTAPI
#if !defined(_NTSYSTEM_)
#define NTSYSAPI DECLSPEC_IMPORT
#define NTSYSCALLAPI DECLSPEC_IMPORT
#else
#define NTSYSAPI
#define NTSYSCALLAPI DECLSPEC_ADDRSAFE
#endif
#ifndef VOID
#define VOID void
typedef char CHAR;
typedef short SHORT;
typedef __LONG32 LONG;
#if !defined (__WIDL__)
typedef int INT;
#endif
#endif
#ifndef __WCHAR_DEFINED
#define __WCHAR_DEFINED
typedef wchar_t WCHAR;
#endif
typedef WCHAR *PWCHAR,*LPWCH,*PWCH;
typedef CONST WCHAR *LPCWCH,*PCWCH;
typedef WCHAR *NWPSTR,*LPWSTR,*PWSTR;
typedef PWSTR *PZPWSTR;
typedef CONST PWSTR *PCZPWSTR;
typedef WCHAR UNALIGNED *LPUWSTR,*PUWSTR;
typedef CONST WCHAR *LPCWSTR,*PCWSTR;
typedef PCWSTR *PZPCWSTR;
typedef CONST WCHAR UNALIGNED *LPCUWSTR,*PCUWSTR;
typedef WCHAR *PZZWSTR;
typedef CONST WCHAR *PCZZWSTR;
typedef WCHAR UNALIGNED *PUZZWSTR;
typedef CONST WCHAR UNALIGNED *PCUZZWSTR;
typedef WCHAR *PNZWCH;
typedef CONST WCHAR *PCNZWCH;
typedef WCHAR UNALIGNED *PUNZWCH;
typedef CONST WCHAR UNALIGNED *PCUNZWCH;
#if _WIN32_WINNT >= 0x0600 || (defined (__cplusplus) && defined (WINDOWS_ENABLE_CPLUSPLUS))
typedef CONST WCHAR *LPCWCHAR,*PCWCHAR;
typedef CONST WCHAR UNALIGNED *LPCUWCHAR,*PCUWCHAR;
typedef unsigned long UCSCHAR;
#define UCSCHAR_INVALID_CHARACTER (0xffffffff)
#define MIN_UCSCHAR (0)
#define MAX_UCSCHAR (0x0010ffff)
typedef UCSCHAR *PUCSCHAR;
typedef const UCSCHAR *PCUCSCHAR;
typedef UCSCHAR *PUCSSTR;
typedef UCSCHAR UNALIGNED *PUUCSSTR;
typedef const UCSCHAR *PCUCSSTR;
typedef const UCSCHAR UNALIGNED *PCUUCSSTR;
typedef UCSCHAR UNALIGNED *PUUCSCHAR;
typedef const UCSCHAR UNALIGNED *PCUUCSCHAR;
#endif
typedef CHAR *PCHAR,*LPCH,*PCH;
typedef CONST CHAR *LPCCH,*PCCH;
typedef CHAR *NPSTR,*LPSTR,*PSTR;
typedef PSTR *PZPSTR;
typedef CONST PSTR *PCZPSTR;
typedef CONST CHAR *LPCSTR,*PCSTR;
typedef PCSTR *PZPCSTR;
typedef CHAR *PZZSTR;
typedef CONST CHAR *PCZZSTR;
typedef CHAR *PNZCH;
typedef CONST CHAR *PCNZCH;
#ifdef UNICODE
#ifndef _TCHAR_DEFINED
#define _TCHAR_DEFINED
typedef WCHAR TCHAR, *PTCHAR;
typedef WCHAR TBYTE, *PTBYTE;
#endif
typedef LPWSTR LPTCH,PTCH;
typedef LPWSTR PTSTR,LPTSTR;
typedef LPCWSTR PCTSTR,LPCTSTR;
typedef LPUWSTR PUTSTR,LPUTSTR;
typedef LPCUWSTR PCUTSTR,LPCUTSTR;
typedef LPWSTR LP;
typedef PZZWSTR PZZTSTR;
typedef PCZZWSTR PCZZTSTR;
typedef PUZZWSTR PUZZTSTR;
typedef PCUZZWSTR PCUZZTSTR;
typedef PZPWSTR PZPTSTR;
typedef PNZWCH PNZTCH;
typedef PCNZWCH PCNZTCH;
typedef PUNZWCH PUNZTCH;
typedef PCUNZWCH PCUNZTCH;
#define __TEXT(quote) L##quote
#else
#ifndef _TCHAR_DEFINED
#define _TCHAR_DEFINED
typedef char TCHAR, *PTCHAR;
typedef unsigned char TBYTE, *PTBYTE;
#endif
typedef LPSTR LPTCH,PTCH;
typedef LPCCH LPCTCH,PCTCH;
typedef LPSTR PTSTR,LPTSTR,PUTSTR,LPUTSTR;
typedef LPCSTR PCTSTR,LPCTSTR,PCUTSTR,LPCUTSTR;
typedef PZZSTR PZZTSTR, PUZZTSTR;
typedef PCZZSTR PCZZTSTR, PCUZZTSTR;
typedef PZPSTR PZPTSTR;
typedef PNZCH PNZTCH, PUNZTCH;
typedef PCNZCH PCNZTCH, PCUNZTCH;
#define __TEXT(quote) quote
#endif
#define TEXT(quote) __TEXT(quote)
typedef SHORT *PSHORT;
typedef LONG *PLONG;
#ifndef ___GROUP_AFFINITY_DEFINED
#define ___GROUP_AFFINITY_DEFINED
typedef struct _GROUP_AFFINITY {
KAFFINITY Mask;
WORD Group;
WORD Reserved[3];
} GROUP_AFFINITY, *PGROUP_AFFINITY;
#endif /* !___GROUP_AFFINITY_DEFINED */
#ifdef STRICT
typedef void *HANDLE;
#define DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name
#else
typedef PVOID HANDLE;
#define DECLARE_HANDLE(name) typedef HANDLE name
#endif
typedef HANDLE *PHANDLE;
typedef BYTE FCHAR;
typedef WORD FSHORT;
typedef DWORD FLONG;
#ifndef _HRESULT_DEFINED
#define _HRESULT_DEFINED
typedef LONG HRESULT;
#endif
#ifdef __cplusplus
#define EXTERN_C extern "C"
#else
#define EXTERN_C extern
#endif
/* Keep in sync with basetyps.h header. */
#ifndef STDMETHODCALLTYPE
#define STDMETHODCALLTYPE WINAPI
#define STDMETHODVCALLTYPE __cdecl
#define STDAPICALLTYPE WINAPI
#define STDAPIVCALLTYPE __cdecl
#define STDAPI EXTERN_C HRESULT WINAPI
#define STDAPI_(type) EXTERN_C type WINAPI
#define STDMETHODIMP HRESULT WINAPI
#define STDMETHODIMP_(type) type WINAPI
#define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE
#define STDAPIV_(type) EXTERN_C type STDAPIVCALLTYPE
#define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE
#define STDMETHODIMPV_(type) type STDMETHODVCALLTYPE
#endif
#define IFACEMETHODIMP STDMETHODIMP
#define IFACEMETHODIMP_(type) STDMETHODIMP_(type)
#define IFACEMETHODIMPV STDMETHODIMPV
#define IFACEMETHODIMPV_(type) STDMETHODIMPV_(type)
typedef char CCHAR;
#ifndef _LCID_DEFINED
#define _LCID_DEFINED
typedef DWORD LCID;
#endif
typedef PDWORD PLCID;
#ifndef _LANGID_DEFINED
#define _LANGID_DEFINED
typedef WORD LANGID;
#endif
#ifndef __COMPARTMENT_ID_DEFINED__
#define __COMPARTMENT_ID_DEFINED__
typedef enum {
UNSPECIFIED_COMPARTMENT_ID = 0,
DEFAULT_COMPARTMENT_ID
} COMPARTMENT_ID,*PCOMPARTMENT_ID;
#endif
#define APPLICATION_ERROR_MASK 0x20000000
#define ERROR_SEVERITY_SUCCESS 0x00000000
#define ERROR_SEVERITY_INFORMATIONAL 0x40000000
#define ERROR_SEVERITY_WARNING 0x80000000
#define ERROR_SEVERITY_ERROR 0xC0000000
#if defined (__ia64__) && !defined (__WIDL__)
__declspec(align(16))
#endif
typedef struct _FLOAT128 {
__MINGW_EXTENSION __int64 LowPart;
__MINGW_EXTENSION __int64 HighPart;
} FLOAT128;
typedef FLOAT128 *PFLOAT128;
#define _ULONGLONG_
__MINGW_EXTENSION typedef __int64 LONGLONG;
__MINGW_EXTENSION typedef unsigned __int64 ULONGLONG;
#define MAXLONGLONG (0x7fffffffffffffffll)
typedef LONGLONG *PLONGLONG;
typedef ULONGLONG *PULONGLONG;
typedef LONGLONG USN;
#ifndef _LARGE_INTEGER_DEFINED
#define _LARGE_INTEGER_DEFINED
#if defined (__WIDL__)
typedef struct _LARGE_INTEGER {
#else
typedef union _LARGE_INTEGER {
__C89_NAMELESS struct {
DWORD LowPart;
LONG HighPart;
} DUMMYSTRUCTNAME;
struct {
DWORD LowPart;
LONG HighPart;
} u;
#endif
LONGLONG QuadPart;
} LARGE_INTEGER;
typedef LARGE_INTEGER *PLARGE_INTEGER;
#if defined (__WIDL__)
typedef struct _ULARGE_INTEGER {
#else
typedef union _ULARGE_INTEGER {
__C89_NAMELESS struct {
DWORD LowPart;
DWORD HighPart;
} DUMMYSTRUCTNAME;
struct {
DWORD LowPart;
DWORD HighPart;
} u;
#endif
ULONGLONG QuadPart;
} ULARGE_INTEGER;
typedef ULARGE_INTEGER *PULARGE_INTEGER;
typedef struct _LUID {
DWORD LowPart;
LONG HighPart;
} LUID,*PLUID;
#endif /* _LARGE_INTEGER_DEFINED */
#define _DWORDLONG_
typedef ULONGLONG DWORDLONG;
typedef DWORDLONG *PDWORDLONG;
#define Int32x32To64(a, b) (((LONGLONG) ((LONG) (a))) * ((LONGLONG) ((LONG) (b))))
#define UInt32x32To64(a, b) (((ULONGLONG) ((unsigned int) (a))) *((ULONGLONG) ((unsigned int) (b))))
#define Int64ShllMod32(a, b) (((ULONGLONG) (a)) << (b))
#define Int64ShraMod32(a, b) (((LONGLONG) (a)) >> (b))
#define Int64ShrlMod32(a, b) (((ULONGLONG) (a)) >> (b))
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __x86_64
#define RotateLeft8 _rotl8
#define RotateLeft16 _rotl16
#define RotateRight8 _rotr8
#define RotateRight16 _rotr16
unsigned char __cdecl _rotl8(unsigned char Value,unsigned char Shift);
unsigned short __cdecl _rotl16(unsigned short Value,unsigned char Shift);
unsigned char __cdecl _rotr8(unsigned char Value,unsigned char Shift);
unsigned short __cdecl _rotr16(unsigned short Value,unsigned char Shift);
#endif /* __x86_64 */
#define RotateLeft32 _rotl
#define RotateLeft64 _rotl64
#define RotateRight32 _rotr
#define RotateRight64 _rotr64
#pragma push_macro ("_rotl")
#pragma push_macro ("_rotr")
#undef _rotl
#undef _rotr
unsigned int __cdecl _rotl(unsigned int Value,int Shift);
unsigned int __cdecl _rotr(unsigned int Value,int Shift);
#pragma pop_macro ("_rotr")
#pragma pop_macro ("_rotl")
#pragma push_macro ("_rotr64")
#pragma push_macro ("_rotl64")
#undef _rotl64
#undef _rotr64
__MINGW_EXTENSION unsigned __int64 __cdecl _rotl64(unsigned __int64 Value,int Shift);
__MINGW_EXTENSION unsigned __int64 __cdecl _rotr64(unsigned __int64 Value,int Shift);
#pragma pop_macro ("_rotl64")
#pragma pop_macro ("_rotr64")
#ifdef __cplusplus
}
#endif
#define ANSI_NULL ((CHAR)0)
#define UNICODE_NULL ((WCHAR)0)
#define UNICODE_STRING_MAX_BYTES ((WORD) 65534)
#define UNICODE_STRING_MAX_CHARS (32767)
#ifndef _BOOLEAN_
#define _BOOLEAN_
typedef BYTE BOOLEAN;
#endif
typedef BOOLEAN *PBOOLEAN;
#ifndef _LIST_ENTRY_DEFINED
#define _LIST_ENTRY_DEFINED
typedef struct _LIST_ENTRY {
struct _LIST_ENTRY *Flink;
struct _LIST_ENTRY *Blink;
} LIST_ENTRY,*PLIST_ENTRY,*RESTRICTED_POINTER PRLIST_ENTRY;
typedef struct _SINGLE_LIST_ENTRY {
struct _SINGLE_LIST_ENTRY *Next;
} SINGLE_LIST_ENTRY,*PSINGLE_LIST_ENTRY;
typedef struct LIST_ENTRY32 {
DWORD Flink;
DWORD Blink;
} LIST_ENTRY32;
typedef LIST_ENTRY32 *PLIST_ENTRY32;
typedef struct LIST_ENTRY64 {
ULONGLONG Flink;
ULONGLONG Blink;
} LIST_ENTRY64;
typedef LIST_ENTRY64 *PLIST_ENTRY64;
#endif /* _LIST_ENTRY_DEFINED */
#include <guiddef.h>
#ifndef __OBJECTID_DEFINED
#define __OBJECTID_DEFINED
typedef struct _OBJECTID {
GUID Lineage;
DWORD Uniquifier;
} OBJECTID;
#endif
#define MINCHAR 0x80
#define MAXCHAR 0x7f
#define MINSHORT 0x8000
#define MAXSHORT 0x7fff
#define MINLONG 0x80000000
#define MAXLONG 0x7fffffff
#define MAXBYTE 0xff
#define MAXWORD 0xffff
#define MAXDWORD 0xffffffff
#define FIELD_OFFSET(Type, Field) ((LONG) __builtin_offsetof(Type, Field))
#define RTL_FIELD_SIZE(type,field) (sizeof(((type *)0)->field))
#define RTL_SIZEOF_THROUGH_FIELD(type,field) (FIELD_OFFSET(type,field) + RTL_FIELD_SIZE(type,field))
#define RTL_CONTAINS_FIELD(Struct,Size,Field) ((((PCHAR)(&(Struct)->Field)) + sizeof((Struct)->Field)) <= (((PCHAR)(Struct))+(Size)))
#define RTL_NUMBER_OF_V1(A) (sizeof(A)/sizeof((A)[0]))
#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
#ifdef ENABLE_RTL_NUMBER_OF_V2
#define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V2(A)
#else
#define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V1(A)
#endif
#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
#define _ARRAYSIZE(A) RTL_NUMBER_OF_V1(A)
#define RTL_FIELD_TYPE(type,field) (((type*)0)->field)
#define RTL_NUMBER_OF_FIELD(type,field) (RTL_NUMBER_OF(RTL_FIELD_TYPE(type,field)))
#define RTL_PADDING_BETWEEN_FIELDS(T,F1,F2) ((FIELD_OFFSET(T,F2) > FIELD_OFFSET(T,F1)) ? (FIELD_OFFSET(T,F2) - FIELD_OFFSET(T,F1) - RTL_FIELD_SIZE(T,F1)) : (FIELD_OFFSET(T,F1) - FIELD_OFFSET(T,F2) - RTL_FIELD_SIZE(T,F2)))
#ifdef __cplusplus
#define RTL_CONST_CAST(type) const_cast<type>
#else
#define RTL_CONST_CAST(type) (type)
#endif
#ifdef __cplusplus
#define DEFINE_ENUM_FLAG_OPERATORS(ENUMTYPE) \
extern "C++" { \
inline ENUMTYPE operator | (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a) | ((int)b)); } \
inline ENUMTYPE &operator |= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) |= ((int)b)); } \
inline ENUMTYPE operator & (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a) & ((int)b)); } \
inline ENUMTYPE &operator &= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) &= ((int)b)); } \
inline ENUMTYPE operator ~ (ENUMTYPE a) { return ENUMTYPE(~((int)a)); } \
inline ENUMTYPE operator ^ (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a) ^ ((int)b)); } \
inline ENUMTYPE &operator ^= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) ^= ((int)b)); } \
}
#else
#define DEFINE_ENUM_FLAG_OPERATORS(ENUMTYPE) /* */
#endif
#define COMPILETIME_OR_2FLAGS(a, b) ((UINT) (a) | (UINT) (b))
#define COMPILETIME_OR_3FLAGS(a, b, c) ((UINT) (a) | (UINT) (b) | (UINT) (c))
#define COMPILETIME_OR_4FLAGS(a, b, c, d) ((UINT) (a) | (UINT) (b) | (UINT) (c) | (UINT) (d))
#define COMPILETIME_OR_5FLAGS(a, b, c, d, e) ((UINT) (a) | (UINT) (b) | (UINT) (c) | (UINT) (d) | (UINT) (e))
#define RTL_BITS_OF(sizeOfArg) (sizeof(sizeOfArg) * 8)
#define RTL_BITS_OF_FIELD(type,field) (RTL_BITS_OF(RTL_FIELD_TYPE(type,field)))
#define CONTAINING_RECORD(address,type,field) ((type *)((PCHAR)(address) - (ULONG_PTR)(&((type *)0)->field)))
typedef EXCEPTION_DISPOSITION NTAPI EXCEPTION_ROUTINE (struct _EXCEPTION_RECORD *ExceptionRecord, PVOID EstablisherFrame, struct _CONTEXT *ContextRecord, PVOID DispatcherContext);
#ifndef __PEXCEPTION_ROUTINE_DEFINED
#define __PEXCEPTION_ROUTINE_DEFINED
typedef EXCEPTION_ROUTINE *PEXCEPTION_ROUTINE;
#endif
#define VER_WORKSTATION_NT 0x40000000
#define VER_SERVER_NT 0x80000000
#define VER_SUITE_SMALLBUSINESS 0x00000001
#define VER_SUITE_ENTERPRISE 0x00000002
#define VER_SUITE_BACKOFFICE 0x00000004
#define VER_SUITE_COMMUNICATIONS 0x00000008
#define VER_SUITE_TERMINAL 0x00000010
#define VER_SUITE_SMALLBUSINESS_RESTRICTED 0x00000020
#define VER_SUITE_EMBEDDEDNT 0x00000040
#define VER_SUITE_DATACENTER 0x00000080
#define VER_SUITE_SINGLEUSERTS 0x00000100
#define VER_SUITE_PERSONAL 0x00000200
#define VER_SUITE_BLADE 0x00000400
#define VER_SUITE_EMBEDDED_RESTRICTED 0x00000800
#define VER_SUITE_SECURITY_APPLIANCE 0x00001000
#define VER_SUITE_STORAGE_SERVER 0x00002000
#define VER_SUITE_COMPUTE_SERVER 0x00004000
#define VER_SUITE_WH_SERVER 0x00008000
#define PRODUCT_UNDEFINED 0x0
#define PRODUCT_ULTIMATE 0x1
#define PRODUCT_HOME_BASIC 0x2
#define PRODUCT_HOME_PREMIUM 0x3
#define PRODUCT_ENTERPRISE 0x4
#define PRODUCT_HOME_BASIC_N 0x5
#define PRODUCT_BUSINESS 0x6
#define PRODUCT_STANDARD_SERVER 0x7
#define PRODUCT_DATACENTER_SERVER 0x8
#define PRODUCT_SMALLBUSINESS_SERVER 0x9
#define PRODUCT_ENTERPRISE_SERVER 0xa
#define PRODUCT_STARTER 0xb
#define PRODUCT_DATACENTER_SERVER_CORE 0xc
#define PRODUCT_STANDARD_SERVER_CORE 0xd
#define PRODUCT_ENTERPRISE_SERVER_CORE 0xe
#define PRODUCT_ENTERPRISE_SERVER_IA64 0xf
#define PRODUCT_BUSINESS_N 0x10
#define PRODUCT_WEB_SERVER 0x11
#define PRODUCT_CLUSTER_SERVER 0x12
#define PRODUCT_HOME_SERVER 0x13
#define PRODUCT_STORAGE_EXPRESS_SERVER 0x14
#define PRODUCT_STORAGE_STANDARD_SERVER 0x15
#define PRODUCT_STORAGE_WORKGROUP_SERVER 0x16
#define PRODUCT_STORAGE_ENTERPRISE_SERVER 0x17
#define PRODUCT_SERVER_FOR_SMALLBUSINESS 0x18
#define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM 0x19
#define PRODUCT_HOME_PREMIUM_N 0x1a
#define PRODUCT_ENTERPRISE_N 0x1b
#define PRODUCT_ULTIMATE_N 0x1c
#define PRODUCT_WEB_SERVER_CORE 0x1d
#define PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT 0x1e
#define PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY 0x1f
#define PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING 0x20
#define PRODUCT_SERVER_FOUNDATION 0x21
#define PRODUCT_HOME_PREMIUM_SERVER 0x22
#define PRODUCT_SERVER_FOR_SMALLBUSINESS_V 0x23
#define PRODUCT_STANDARD_SERVER_V 0x24
#define PRODUCT_DATACENTER_SERVER_V 0x25
#define PRODUCT_SERVER_V 0x25
#define PRODUCT_ENTERPRISE_SERVER_V 0x26
#define PRODUCT_DATACENTER_SERVER_CORE_V 0x27
#define PRODUCT_STANDARD_SERVER_CORE_V 0x28
#define PRODUCT_ENTERPRISE_SERVER_CORE_V 0x29
#define PRODUCT_HYPERV 0x2a
#define PRODUCT_STORAGE_EXPRESS_SERVER_CORE 0x2b
#define PRODUCT_STORAGE_STANDARD_SERVER_CORE 0x2c
#define PRODUCT_STORAGE_WORKGROUP_SERVER_CORE 0x2d
#define PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE 0x2e
#define PRODUCT_STARTER_N 0x2f
#define PRODUCT_PROFESSIONAL 0x30
#define PRODUCT_PROFESSIONAL_N 0x31
#define PRODUCT_SB_SOLUTION_SERVER 0x32
#define PRODUCT_SERVER_FOR_SB_SOLUTIONS 0x33
#define PRODUCT_STANDARD_SERVER_SOLUTIONS 0x34
#define PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE 0x35
#define PRODUCT_SB_SOLUTION_SERVER_EM 0x36
#define PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM 0x37
#define PRODUCT_SOLUTION_EMBEDDEDSERVER 0x38
#define PRODUCT_SOLUTION_EMBEDDEDSERVER_CORE 0x39
#define PRODUCT_PROFESSIONAL_EMBEDDED 0x3A
#define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT 0x3B
#define PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL 0x3C
#define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC 0x3D
#define PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC 0x3E
#define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE 0x3f
#define PRODUCT_CLUSTER_SERVER_V 0x40
#define PRODUCT_EMBEDDED 0x41
#define PRODUCT_STARTER_E 0x42
#define PRODUCT_HOME_BASIC_E 0x43
#define PRODUCT_HOME_PREMIUM_E 0x44
#define PRODUCT_PROFESSIONAL_E 0x45
#define PRODUCT_ENTERPRISE_E 0x46
#define PRODUCT_ULTIMATE_E 0x47
#define PRODUCT_ENTERPRISE_EVALUATION 0x48
#define PRODUCT_MULTIPOINT_STANDARD_SERVER 0x4C
#define PRODUCT_MULTIPOINT_PREMIUM_SERVER 0x4D
#define PRODUCT_STANDARD_EVALUATION_SERVER 0x4F
#define PRODUCT_DATACENTER_EVALUATION_SERVER 0x50
#define PRODUCT_ENTERPRISE_N_EVALUATION 0x54
#define PRODUCT_EMBEDDED_AUTOMOTIVE 0x55
#define PRODUCT_EMBEDDED_INDUSTRY_A 0x56
#define PRODUCT_THINPC 0x57
#define PRODUCT_EMBEDDED_A 0x58
#define PRODUCT_EMBEDDED_INDUSTRY 0x59
#define PRODUCT_EMBEDDED_E 0x5A
#define PRODUCT_EMBEDDED_INDUSTRY_E 0x5B
#define PRODUCT_EMBEDDED_INDUSTRY_A_E 0x5C
#define PRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER 0x5F
#define PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER 0x60
#define PRODUCT_CORE_ARM 0x61
#define PRODUCT_CORE_N 0x62
#define PRODUCT_CORE_COUNTRYSPECIFIC 0x63
#define PRODUCT_CORE_SINGLELANGUAGE 0x64
#define PRODUCT_CORE_LANGUAGESPECIFIC 0x64
#define PRODUCT_CORE 0x65
#define PRODUCT_PROFESSIONAL_WMC 0x67
#define PRODUCT_MOBILE_CORE 0x68
#define PRODUCT_EMBEDDED_INDUSTRY_EVAL 0x69
#define PRODUCT_EMBEDDED_INDUSTRY_E_EVAL 0x6A
#define PRODUCT_EMBEDDED_EVAL 0x6B
#define PRODUCT_EMBEDDED_E_EVAL 0x6C
#define PRODUCT_NANO_SERVER 0x6D
#define PRODUCT_CLOUD_STORAGE_SERVER 0x6E
#define PRODUCT_CORE_CONNECTED 0x6F
#define PRODUCT_PROFESSIONAL_STUDENT 0x70
#define PRODUCT_CORE_CONNECTED_N 0x71
#define PRODUCT_PROFESSIONAL_STUDENT_N 0x72
#define PRODUCT_CORE_CONNECTED_SINGLELANGUAGE 0x73
#define PRODUCT_CORE_CONNECTED_COUNTRYSPECIFIC 0x74
#define PRODUCT_CONNECTED_CAR 0x75
#define PRODUCT_INDUSTRY_HANDHELD 0x76
#define PRODUCT_PPI_PRO 0x77
#define PRODUCT_ARM64_SERVER 0x78
#define PRODUCT_EDUCATION 0x79
#define PRODUCT_EDUCATION_N 0x7a
#define PRODUCT_IOTUAP 0x7B
#define PRODUCT_CLOUD_HOST_INFRASTRUCTURE_SERVER 0x7C
#define PRODUCT_ENTERPRISE_S 0x7D
#define PRODUCT_ENTERPRISE_S_N 0x7E
#define PRODUCT_PROFESSIONAL_S 0x7F
#define PRODUCT_PROFESSIONAL_S_N 0x80
#define PRODUCT_ENTERPRISE_S_EVALUATION 0x81
#define PRODUCT_ENTERPRISE_S_N_EVALUATION 0x82
#define PRODUCT_MOBILE_ENTERPRISE 0x85
#define PRODUCT_UNLICENSED 0xabcdabcd
#define LANG_NEUTRAL 0x00
#define LANG_INVARIANT 0x7f
#define LANG_AFRIKAANS 0x36
#define LANG_ALBANIAN 0x1c
#define LANG_ALSATIAN 0x84
#define LANG_AMHARIC 0x5e
#define LANG_ARABIC 0x01
#define LANG_ARMENIAN 0x2b
#define LANG_ASSAMESE 0x4d
#define LANG_AZERI 0x2c
#define LANG_AZERBAIJANI 0x2c
#define LANG_BANGLA 0x45
#define LANG_BASHKIR 0x6d
#define LANG_BASQUE 0x2d
#define LANG_BELARUSIAN 0x23
#define LANG_BENGALI 0x45
#define LANG_BRETON 0x7e
#define LANG_BOSNIAN 0x1a
#define LANG_BOSNIAN_NEUTRAL 0x781a
#define LANG_BULGARIAN 0x02
#define LANG_CATALAN 0x03
#define LANG_CENTRAL_KURDISH 0x92
#define LANG_CHEROKEE 0x5c
#define LANG_CHINESE 0x04
#define LANG_CHINESE_SIMPLIFIED 0x04
#define LANG_CHINESE_TRADITIONAL 0x7c04
#define LANG_CORSICAN 0x83
#define LANG_CROATIAN 0x1a
#define LANG_CZECH 0x05
#define LANG_DANISH 0x06
#define LANG_DARI 0x8c
#define LANG_DIVEHI 0x65
#define LANG_DUTCH 0x13
#define LANG_ENGLISH 0x09
#define LANG_ESTONIAN 0x25
#define LANG_FAEROESE 0x38
#define LANG_FARSI 0x29
#define LANG_FILIPINO 0x64
#define LANG_FINNISH 0x0b
#define LANG_FRENCH 0x0c
#define LANG_FRISIAN 0x62
#define LANG_FULAH 0x67
#define LANG_GALICIAN 0x56
#define LANG_GEORGIAN 0x37
#define LANG_GERMAN 0x07
#define LANG_GREEK 0x08
#define LANG_GREENLANDIC 0x6f
#define LANG_GUJARATI 0x47
#define LANG_HAUSA 0x68
#define LANG_HEBREW 0x0d
#define LANG_HINDI 0x39
#define LANG_HUNGARIAN 0x0e
#define LANG_ICELANDIC 0x0f
#define LANG_IGBO 0x70
#define LANG_INDONESIAN 0x21
#define LANG_INUKTITUT 0x5d
#define LANG_IRISH 0x3c
#define LANG_ITALIAN 0x10
#define LANG_JAPANESE 0x11
#define LANG_KANNADA 0x4b
#define LANG_KASHMIRI 0x60
#define LANG_KAZAK 0x3f
#define LANG_KHMER 0x53
#define LANG_KICHE 0x86
#define LANG_KINYARWANDA 0x87
#define LANG_KONKANI 0x57
#define LANG_KOREAN 0x12
#define LANG_KYRGYZ 0x40
#define LANG_LAO 0x54
#define LANG_LATVIAN 0x26
#define LANG_LITHUANIAN 0x27
#define LANG_LOWER_SORBIAN 0x2e
#define LANG_LUXEMBOURGISH 0x6e
#define LANG_MACEDONIAN 0x2f
#define LANG_MALAY 0x3e
#define LANG_MALAYALAM 0x4c
#define LANG_MALTESE 0x3a
#define LANG_MANIPURI 0x58
#define LANG_MAORI 0x81
#define LANG_MAPUDUNGUN 0x7a
#define LANG_MARATHI 0x4e
#define LANG_MOHAWK 0x7c
#define LANG_MONGOLIAN 0x50
#define LANG_NEPALI 0x61
#define LANG_NORWEGIAN 0x14
#define LANG_OCCITAN 0x82
#define LANG_ODIA 0x48
#define LANG_ORIYA 0x48
#define LANG_PASHTO 0x63
#define LANG_PERSIAN 0x29
#define LANG_POLISH 0x15
#define LANG_PORTUGUESE 0x16
#define LANG_PULAR 0x67
#define LANG_PUNJABI 0x46
#define LANG_QUECHUA 0x6b
#define LANG_ROMANIAN 0x18
#define LANG_ROMANSH 0x17
#define LANG_RUSSIAN 0x19
#define LANG_SAKHA 0x85
#define LANG_SAMI 0x3b
#define LANG_SANSKRIT 0x4f
#define LANG_SCOTTISH_GAELIC 0x91
#define LANG_SERBIAN 0x1a
#define LANG_SERBIAN_NEUTRAL 0x7c1a
#define LANG_SINDHI 0x59
#define LANG_SINHALESE 0x5b
#define LANG_SLOVAK 0x1b
#define LANG_SLOVENIAN 0x24
#define LANG_SOTHO 0x6c
#define LANG_SPANISH 0x0a
#define LANG_SWAHILI 0x41
#define LANG_SWEDISH 0x1d
#define LANG_SYRIAC 0x5a
#define LANG_TAJIK 0x28
#define LANG_TAMAZIGHT 0x5f
#define LANG_TAMIL 0x49
#define LANG_TATAR 0x44
#define LANG_TELUGU 0x4a
#define LANG_THAI 0x1e
#define LANG_TIBETAN 0x51
#define LANG_TIGRIGNA 0x73
#define LANG_TIGRINYA 0x73
#define LANG_TSWANA 0x32
#define LANG_TURKISH 0x1f
#define LANG_TURKMEN 0x42
#define LANG_UIGHUR 0x80
#define LANG_UKRAINIAN 0x22
#define LANG_UPPER_SORBIAN 0x2e
#define LANG_URDU 0x20
#define LANG_UZBEK 0x43
#define LANG_VALENCIAN 0x03
#define LANG_VIETNAMESE 0x2a
#define LANG_WELSH 0x52
#define LANG_WOLOF 0x88
#define LANG_XHOSA 0x34
#define LANG_YAKUT 0x85
#define LANG_YI 0x78
#define LANG_YORUBA 0x6a
#define LANG_ZULU 0x35
#define SUBLANG_NEUTRAL 0x00
#define SUBLANG_DEFAULT 0x01
#define SUBLANG_SYS_DEFAULT 0x02
#define SUBLANG_CUSTOM_DEFAULT 0x03
#define SUBLANG_CUSTOM_UNSPECIFIED 0x04
#define SUBLANG_UI_CUSTOM_DEFAULT 0x05
#define SUBLANG_AFRIKAANS_SOUTH_AFRICA 0x01
#define SUBLANG_ALBANIAN_ALBANIA 0x01
#define SUBLANG_ALSATIAN_FRANCE 0x01
#define SUBLANG_AMHARIC_ETHIOPIA 0x01
#define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
#define SUBLANG_ARABIC_IRAQ 0x02
#define SUBLANG_ARABIC_EGYPT 0x03
#define SUBLANG_ARABIC_LIBYA 0x04
#define SUBLANG_ARABIC_ALGERIA 0x05
#define SUBLANG_ARABIC_MOROCCO 0x06
#define SUBLANG_ARABIC_TUNISIA 0x07
#define SUBLANG_ARABIC_OMAN 0x08
#define SUBLANG_ARABIC_YEMEN 0x09
#define SUBLANG_ARABIC_SYRIA 0x0a
#define SUBLANG_ARABIC_JORDAN 0x0b
#define SUBLANG_ARABIC_LEBANON 0x0c
#define SUBLANG_ARABIC_KUWAIT 0x0d
#define SUBLANG_ARABIC_UAE 0x0e
#define SUBLANG_ARABIC_BAHRAIN 0x0f
#define SUBLANG_ARABIC_QATAR 0x10
#define SUBLANG_ARMENIAN_ARMENIA 0x01
#define SUBLANG_ASSAMESE_INDIA 0x01
#define SUBLANG_AZERI_LATIN 0x01
#define SUBLANG_AZERI_CYRILLIC 0x02
#define SUBLANG_AZERBAIJANI_AZERBAIJAN_LATIN 0x01
#define SUBLANG_AZERBAIJANI_AZERBAIJAN_CYRILLIC 0x02
#define SUBLANG_BANGLA_INDIA 0x01
#define SUBLANG_BANGLA_BANGLADESH 0x02
#define SUBLANG_BASHKIR_RUSSIA 0x01
#define SUBLANG_BASQUE_BASQUE 0x01
#define SUBLANG_BELARUSIAN_BELARUS 0x01
#define SUBLANG_BENGALI_INDIA 0x01
#define SUBLANG_BENGALI_BANGLADESH 0x02
#define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN 0x05
#define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x08
#define SUBLANG_BRETON_FRANCE 0x01
#define SUBLANG_BULGARIAN_BULGARIA 0x01
#define SUBLANG_CATALAN_CATALAN 0x01
#define SUBLANG_CENTRAL_KURDISH_IRAQ 0x01
#define SUBLANG_CHEROKEE_CHEROKEE 0x01
#define SUBLANG_CHINESE_TRADITIONAL 0x01
#define SUBLANG_CHINESE_SIMPLIFIED 0x02
#define SUBLANG_CHINESE_HONGKONG 0x03
#define SUBLANG_CHINESE_SINGAPORE 0x04
#define SUBLANG_CHINESE_MACAU 0x05
#define SUBLANG_CORSICAN_FRANCE 0x01
#define SUBLANG_CZECH_CZECH_REPUBLIC 0x01
#define SUBLANG_CROATIAN_CROATIA 0x01
#define SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN 0x04
#define SUBLANG_DANISH_DENMARK 0x01
#define SUBLANG_DARI_AFGHANISTAN 0x01
#define SUBLANG_DIVEHI_MALDIVES 0x01
#define SUBLANG_DUTCH 0x01
#define SUBLANG_DUTCH_BELGIAN 0x02
#define SUBLANG_ENGLISH_US 0x01
#define SUBLANG_ENGLISH_UK 0x02
#define SUBLANG_ENGLISH_AUS 0x03
#define SUBLANG_ENGLISH_CAN 0x04
#define SUBLANG_ENGLISH_NZ 0x05
#define SUBLANG_ENGLISH_IRELAND 0x06
#define SUBLANG_ENGLISH_EIRE 0x06
#define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
#define SUBLANG_ENGLISH_JAMAICA 0x08
#define SUBLANG_ENGLISH_CARIBBEAN 0x09
#define SUBLANG_ENGLISH_BELIZE 0x0a
#define SUBLANG_ENGLISH_TRINIDAD 0x0b
#define SUBLANG_ENGLISH_ZIMBABWE 0x0c
#define SUBLANG_ENGLISH_PHILIPPINES 0x0d
#define SUBLANG_ENGLISH_INDIA 0x10
#define SUBLANG_ENGLISH_MALAYSIA 0x11
#define SUBLANG_ENGLISH_SINGAPORE 0x12
#define SUBLANG_ESTONIAN_ESTONIA 0x01
#define SUBLANG_FAEROESE_FAROE_ISLANDS 0x01
#define SUBLANG_FILIPINO_PHILIPPINES 0x01
#define SUBLANG_FINNISH_FINLAND 0x01
#define SUBLANG_FRENCH 0x01
#define SUBLANG_FRENCH_BELGIAN 0x02
#define SUBLANG_FRENCH_CANADIAN 0x03
#define SUBLANG_FRENCH_SWISS 0x04
#define SUBLANG_FRENCH_LUXEMBOURG 0x05
#define SUBLANG_FRENCH_MONACO 0x06
#define SUBLANG_FRISIAN_NETHERLANDS 0x01
#define SUBLANG_FULAH_SENEGAL 0x02
#define SUBLANG_GALICIAN_GALICIAN 0x01
#define SUBLANG_GEORGIAN_GEORGIA 0x01
#define SUBLANG_GERMAN 0x01
#define SUBLANG_GERMAN_SWISS 0x02
#define SUBLANG_GERMAN_AUSTRIAN 0x03
#define SUBLANG_GERMAN_LUXEMBOURG 0x04
#define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
#define SUBLANG_GREEK_GREECE 0x01
#define SUBLANG_GREENLANDIC_GREENLAND 0x01
#define SUBLANG_GUJARATI_INDIA 0x01
#define SUBLANG_HAUSA_NIGERIA_LATIN 0x01
#define SUBLANG_HAUSA_NIGERIA SUBLANG_HAUSA_NIGERIA_LATIN /* SUBLANG_HAUSA_NIGERIA_LATIN is what MS defines */
#define SUBLANG_HAWAIIAN_US 0x01
#define SUBLANG_HEBREW_ISRAEL 0x01
#define SUBLANG_HINDI_INDIA 0x01
#define SUBLANG_HUNGARIAN_HUNGARY 0x01
#define SUBLANG_ICELANDIC_ICELAND 0x01
#define SUBLANG_IGBO_NIGERIA 0x01
#define SUBLANG_INDONESIAN_INDONESIA 0x01
#define SUBLANG_INUKTITUT_CANADA 0x01
#define SUBLANG_INUKTITUT_CANADA_LATIN 0x02
#define SUBLANG_IRISH_IRELAND 0x02
#define SUBLANG_ITALIAN 0x01
#define SUBLANG_ITALIAN_SWISS 0x02
#define SUBLANG_JAPANESE_JAPAN 0x01
#define SUBLANG_KANNADA_INDIA 0x01
#define SUBLANG_KASHMIRI_INDIA 0x02
#define SUBLANG_KASHMIRI_SASIA 0x02
#define SUBLANG_KAZAK_KAZAKHSTAN 0x01
#define SUBLANG_KHMER_CAMBODIA 0x01
#define SUBLANG_KICHE_GUATEMALA 0x01
#define SUBLANG_KINYARWANDA_RWANDA 0x01
#define SUBLANG_KONKANI_INDIA 0x01
#define SUBLANG_KOREAN 0x01
#define SUBLANG_KYRGYZ_KYRGYZSTAN 0x01
#define SUBLANG_LAO_LAO 0x01
#define SUBLANG_LAO_LAO_PDR SUBLANG_LAO_LAO /* SUBLANG_LAO_LAO is what MS defines */
#define SUBLANG_LATVIAN_LATVIA 0x01
#if (WINVER >= 0x0600)
#define SUBLANG_LITHUANIAN_LITHUANIA 0x01
#endif /* WINVER >= 0x0600 */
#define SUBLANG_LITHUANIAN 0x01
#define SUBLANG_LOWER_SORBIAN_GERMANY 0x02
#define SUBLANG_LUXEMBOURGISH_LUXEMBOURG 0x01
#define SUBLANG_MACEDONIAN_MACEDONIA 0x01
#define SUBLANG_MALAY_MALAYSIA 0x01
#define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
#define SUBLANG_MALAYALAM_INDIA 0x01
#define SUBLANG_MALTESE_MALTA 0x01
#define SUBLANG_MAORI_NEW_ZEALAND 0x01
#define SUBLANG_MAPUDUNGUN_CHILE 0x01
#define SUBLANG_MARATHI_INDIA 0x01
#define SUBLANG_MOHAWK_MOHAWK 0x01
#define SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA 0x01
#define SUBLANG_MONGOLIAN_PRC 0x02
#define SUBLANG_NEPALI_NEPAL 0x01
#define SUBLANG_NEPALI_INDIA 0x02
#define SUBLANG_NORWEGIAN_BOKMAL 0x01
#define SUBLANG_NORWEGIAN_NYNORSK 0x02
#define SUBLANG_OCCITAN_FRANCE 0x01
#define SUBLANG_ORIYA_INDIA 0x01
#define SUBLANG_PASHTO_AFGHANISTAN 0x01
#define SUBLANG_PERSIAN_IRAN 0x01
#define SUBLANG_POLISH_POLAND 0x01
#define SUBLANG_PORTUGUESE_BRAZILIAN 0x01
#if (WINVER >= 0x0600)
#define SUBLANG_PORTUGUESE_PORTUGAL 0x02
#endif /* WINVER >= 0x0600 */
#define SUBLANG_PORTUGUESE 0x02
#define SUBLANG_PULAR_SENEGAL 0x02
#define SUBLANG_PUNJABI_INDIA 0x01
#define SUBLANG_PUNJABI_PAKISTAN 0x02
#define SUBLANG_QUECHUA_BOLIVIA 0x01
#define SUBLANG_QUECHUA_ECUADOR 0x02
#define SUBLANG_QUECHUA_PERU 0x03
#define SUBLANG_ROMANIAN_ROMANIA 0x01
/* ??? #define SUBLANG_ROMANIAN_MOLDOVA 0x01 ??? */
#define SUBLANG_ROMANSH_SWITZERLAND 0x01
#define SUBLANG_RUSSIAN_RUSSIA 0x01
#define SUBLANG_SAKHA_RUSSIA 0x01
#define SUBLANG_SAMI_NORTHERN_NORWAY 0x01
#define SUBLANG_SAMI_NORTHERN_SWEDEN 0x02
#define SUBLANG_SAMI_NORTHERN_FINLAND 0x03
#define SUBLANG_SAMI_LULE_NORWAY 0x04
#define SUBLANG_SAMI_LULE_SWEDEN 0x05
#define SUBLANG_SAMI_SOUTHERN_NORWAY 0x06
#define SUBLANG_SAMI_SOUTHERN_SWEDEN 0x07
#define SUBLANG_SAMI_SKOLT_FINLAND 0x08
#define SUBLANG_SAMI_INARI_FINLAND 0x09
#define SUBLANG_SANSKRIT_INDIA 0x01
#define SUBLANG_SCOTTISH_GAELIC 0x01
#define SUBLANG_SERBIAN_LATIN 0x02
#define SUBLANG_SERBIAN_CYRILLIC 0x03
#define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN 0x06
#define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x07
#define SUBLANG_SERBIAN_MONTENEGRO_LATIN 0x0b
#define SUBLANG_SERBIAN_MONTENEGRO_CYRILLIC 0x0c
#define SUBLANG_SERBIAN_SERBIA_LATIN 0x09
#define SUBLANG_SERBIAN_SERBIA_CYRILLIC 0x0a
#define SUBLANG_SINDHI_INDIA 0x01
#define SUBLANG_SINDHI_AFGHANISTAN 0x02
#define SUBLANG_SINDHI_PAKISTAN 0x02
#define SUBLANG_SINHALESE_SRI_LANKA 0x01
#define SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA 0x01
#define SUBLANG_SLOVAK_SLOVAKIA 0x01
#define SUBLANG_SLOVENIAN_SLOVENIA 0x01
#define SUBLANG_SPANISH 0x01
#define SUBLANG_SPANISH_MEXICAN 0x02
#define SUBLANG_SPANISH_MODERN 0x03
#define SUBLANG_SPANISH_GUATEMALA 0x04
#define SUBLANG_SPANISH_COSTA_RICA 0x05
#define SUBLANG_SPANISH_PANAMA 0x06
#define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07
#define SUBLANG_SPANISH_VENEZUELA 0x08
#define SUBLANG_SPANISH_COLOMBIA 0x09
#define SUBLANG_SPANISH_PERU 0x0a
#define SUBLANG_SPANISH_ARGENTINA 0x0b
#define SUBLANG_SPANISH_ECUADOR 0x0c
#define SUBLANG_SPANISH_CHILE 0x0d
#define SUBLANG_SPANISH_URUGUAY 0x0e
#define SUBLANG_SPANISH_PARAGUAY 0x0f
#define SUBLANG_SPANISH_BOLIVIA 0x10
#define SUBLANG_SPANISH_EL_SALVADOR 0x11
#define SUBLANG_SPANISH_HONDURAS 0x12
#define SUBLANG_SPANISH_NICARAGUA 0x13
#define SUBLANG_SPANISH_PUERTO_RICO 0x14
#define SUBLANG_SPANISH_US 0x15
#define SUBLANG_SWAHILI_KENYA 0x01
#if (WINVER >= 0x0600)
#define SUBLANG_SWEDISH_SWEDEN 0x01
#endif /* WINVER >= 0x0600 */
#define SUBLANG_SWEDISH 0x01
#define SUBLANG_SWEDISH_FINLAND 0x02
#define SUBLANG_SYRIAC 0x01
#define SUBLANG_SYRIAC_SYRIA SUBLANG_SYRIAC /* SUBLANG_SYRIAC_SYRIA is what MSDN mentions */
#define SUBLANG_TAJIK_TAJIKISTAN 0x01
#define SUBLANG_TAMAZIGHT_ALGERIA_LATIN 0x02
#define SUBLANG_TAMAZIGHT_MOROCCO_TIFINAGH 0x04
#define SUBLANG_TAMIL_INDIA 0x01
#define SUBLANG_TAMIL_SRI_LANKA 0x02
#define SUBLANG_TATAR_RUSSIA 0x01
#define SUBLANG_TELUGU_INDIA 0x01
#define SUBLANG_THAI_THAILAND 0x01
#define SUBLANG_TIBETAN_PRC 0x01
#define SUBLANG_TIBETAN_BHUTAN 0x02
#define SUBLANG_TIGRIGNA_ERITREA 0x02
#define SUBLANG_TIGRINYA_ERITREA 0x02
#define SUBLANG_TIGRINYA_ETHIOPIA 0x01
#define SUBLANG_TSWANA_BOTSWANA 0x02
#define SUBLANG_TSWANA_SOUTH_AFRICA 0x01
#define SUBLANG_TURKISH_TURKEY 0x01
#define SUBLANG_TURKMEN_TURKMENISTAN 0x01
#define SUBLANG_UIGHUR_PRC 0x01
#define SUBLANG_UKRAINIAN_UKRAINE 0x01
#define SUBLANG_UPPER_SORBIAN_GERMANY 0x01
#define SUBLANG_URDU_PAKISTAN 0x01
#define SUBLANG_URDU_INDIA 0x02
#define SUBLANG_UZBEK_LATIN 0x01
#define SUBLANG_UZBEK_CYRILLIC 0x02
#define SUBLANG_VALENCIAN_VALENCIA 0x02
#define SUBLANG_VIETNAMESE_VIETNAM 0x01
#define SUBLANG_WELSH_UNITED_KINGDOM 0x01
#define SUBLANG_WOLOF_SENEGAL 0x01
#define SUBLANG_YORUBA_NIGERIA 0x01
#define SUBLANG_XHOSA_SOUTH_AFRICA 0x01
#define SUBLANG_YAKUT_RUSSIA 0x01
#define SUBLANG_YI_PRC 0x01
#define SUBLANG_ZULU_SOUTH_AFRICA 0x01
#define SORT_DEFAULT 0x0
#define SORT_INVARIANT_MATH 0x1
#define SORT_JAPANESE_XJIS 0x0
#define SORT_JAPANESE_UNICODE 0x1
#define SORT_JAPANESE_RADICALSTROKE 0x4
#define SORT_CHINESE_BIG5 0x0
#define SORT_CHINESE_PRCP 0x0
#define SORT_CHINESE_UNICODE 0x1
#define SORT_CHINESE_PRC 0x2
#define SORT_CHINESE_BOPOMOFO 0x3
#define SORT_CHINESE_RADICALSTROKE 0x4
#define SORT_KOREAN_KSC 0x0
#define SORT_KOREAN_UNICODE 0x1
#define SORT_GERMAN_PHONE_BOOK 0x1
#define SORT_HUNGARIAN_DEFAULT 0x0
#define SORT_HUNGARIAN_TECHNICAL 0x1
#define SORT_GEORGIAN_TRADITIONAL 0x0
#define SORT_GEORGIAN_MODERN 0x1
#define MAKELANGID(p,s) ((((WORD)(s)) << 10) | (WORD)(p))
#define PRIMARYLANGID(lgid) ((WORD)(lgid) & 0x3ff)
#define SUBLANGID(lgid) ((WORD)(lgid) >> 10)
#define NLS_VALID_LOCALE_MASK 0x000fffff
#define MAKELCID(lgid,srtid) ((DWORD)((((DWORD)((WORD)(srtid))) << 16) | ((DWORD)((WORD)(lgid)))))
#define MAKESORTLCID(lgid,srtid,ver) ((DWORD)((MAKELCID(lgid,srtid)) | (((DWORD)((WORD)(ver))) << 20)))
#define LANGIDFROMLCID(lcid) ((WORD)(lcid))
#define SORTIDFROMLCID(lcid) ((WORD)((((DWORD)(lcid)) >> 16) & 0xf))
#define SORTVERSIONFROMLCID(lcid) ((WORD)((((DWORD)(lcid)) >> 20) & 0xf))
#define LOCALE_NAME_MAX_LENGTH 85
#define LANG_SYSTEM_DEFAULT (MAKELANGID(LANG_NEUTRAL,SUBLANG_SYS_DEFAULT))
#define LANG_USER_DEFAULT (MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT))
#define LOCALE_SYSTEM_DEFAULT (MAKELCID(LANG_SYSTEM_DEFAULT,SORT_DEFAULT))
#define LOCALE_USER_DEFAULT (MAKELCID(LANG_USER_DEFAULT,SORT_DEFAULT))
#define LOCALE_NEUTRAL (MAKELCID(MAKELANGID(LANG_NEUTRAL,SUBLANG_NEUTRAL),SORT_DEFAULT))
#define LOCALE_CUSTOM_DEFAULT (MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_CUSTOM_DEFAULT), SORT_DEFAULT))
#define LOCALE_CUSTOM_UNSPECIFIED (MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_CUSTOM_UNSPECIFIED), SORT_DEFAULT))
#define LOCALE_CUSTOM_UI_DEFAULT (MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_UI_CUSTOM_DEFAULT), SORT_DEFAULT))
#define LOCALE_INVARIANT (MAKELCID(MAKELANGID(LANG_INVARIANT,SUBLANG_NEUTRAL),SORT_DEFAULT))
#define UNREFERENCED_PARAMETER(P) {(P) = (P);}
#define UNREFERENCED_LOCAL_VARIABLE(V) {(V) = (V);}
#define DBG_UNREFERENCED_PARAMETER(P) (P)
#define DBG_UNREFERENCED_LOCAL_VARIABLE(V) (V)
#define DEFAULT_UNREACHABLE
#ifndef UMDF_USING_NTSTATUS
#ifndef WIN32_NO_STATUS
#define STATUS_WAIT_0 ((DWORD)0x00000000)
#define STATUS_ABANDONED_WAIT_0 ((DWORD)0x00000080)
#define STATUS_USER_APC ((DWORD)0x000000C0)
#define STATUS_TIMEOUT ((DWORD)0x00000102)
#define STATUS_PENDING ((DWORD)0x00000103)
#define DBG_EXCEPTION_HANDLED ((DWORD)0x00010001)
#define DBG_CONTINUE ((DWORD)0x00010002)
#define STATUS_SEGMENT_NOTIFICATION ((DWORD)0x40000005)
#define STATUS_FATAL_APP_EXIT ((DWORD)0x40000015)
#define DBG_TERMINATE_THREAD ((DWORD)0x40010003)
#define DBG_TERMINATE_PROCESS ((DWORD)0x40010004)
#define DBG_CONTROL_C ((DWORD)0x40010005)
#define DBG_PRINTEXCEPTION_C ((DWORD)0x40010006)
#define DBG_RIPEXCEPTION ((DWORD)0x40010007)
#define DBG_CONTROL_BREAK ((DWORD)0x40010008)
#define DBG_COMMAND_EXCEPTION ((DWORD)0x40010009)
#define DBG_PRINTEXCEPTION_WIDE_C ((DWORD)0x4001000A)
#define STATUS_GUARD_PAGE_VIOLATION ((DWORD)0x80000001)
#define STATUS_DATATYPE_MISALIGNMENT ((DWORD)0x80000002)
#define STATUS_BREAKPOINT ((DWORD)0x80000003)
#define STATUS_SINGLE_STEP ((DWORD)0x80000004)
#define STATUS_LONGJUMP ((DWORD)0x80000026)
#define STATUS_UNWIND_CONSOLIDATE ((DWORD)0x80000029)
#define DBG_EXCEPTION_NOT_HANDLED ((DWORD)0x80010001)
#define STATUS_ACCESS_VIOLATION ((DWORD)0xC0000005)
#define STATUS_IN_PAGE_ERROR ((DWORD)0xC0000006)
#define STATUS_INVALID_HANDLE ((DWORD)0xC0000008)
#define STATUS_INVALID_PARAMETER ((DWORD)0xC000000D)
#define STATUS_NO_MEMORY ((DWORD)0xC0000017)
#define STATUS_ILLEGAL_INSTRUCTION ((DWORD)0xC000001D)
#define STATUS_NONCONTINUABLE_EXCEPTION ((DWORD)0xC0000025)
#define STATUS_INVALID_DISPOSITION ((DWORD)0xC0000026)
#define STATUS_ARRAY_BOUNDS_EXCEEDED ((DWORD)0xC000008C)
#define STATUS_FLOAT_DENORMAL_OPERAND ((DWORD)0xC000008D)
#define STATUS_FLOAT_DIVIDE_BY_ZERO ((DWORD)0xC000008E)
#define STATUS_FLOAT_INEXACT_RESULT ((DWORD)0xC000008F)
#define STATUS_FLOAT_INVALID_OPERATION ((DWORD)0xC0000090)
#define STATUS_FLOAT_OVERFLOW ((DWORD)0xC0000091)
#define STATUS_FLOAT_STACK_CHECK ((DWORD)0xC0000092)
#define STATUS_FLOAT_UNDERFLOW ((DWORD)0xC0000093)
#define STATUS_INTEGER_DIVIDE_BY_ZERO ((DWORD)0xC0000094)
#define STATUS_INTEGER_OVERFLOW ((DWORD)0xC0000095)
#define STATUS_PRIVILEGED_INSTRUCTION ((DWORD)0xC0000096)
#define STATUS_STACK_OVERFLOW ((DWORD)0xC00000FD)
#define STATUS_DLL_NOT_FOUND ((DWORD)0xC0000135)
#define STATUS_ORDINAL_NOT_FOUND ((DWORD)0xC0000138)
#define STATUS_ENTRYPOINT_NOT_FOUND ((DWORD)0xC0000139)
#define STATUS_CONTROL_C_EXIT ((DWORD)0xC000013A)
#define STATUS_DLL_INIT_FAILED ((DWORD)0xC0000142)
#define STATUS_FLOAT_MULTIPLE_FAULTS ((DWORD)0xC00002B4)
#define STATUS_FLOAT_MULTIPLE_TRAPS ((DWORD)0xC00002B5)
#define STATUS_REG_NAT_CONSUMPTION ((DWORD)0xC00002C9)
#define STATUS_HEAP_CORRUPTION ((DWORD)0xC0000374)
#define STATUS_STACK_BUFFER_OVERRUN ((DWORD)0xC0000409)
#define STATUS_INVALID_CRUNTIME_PARAMETER ((DWORD)0xC0000417)
#define STATUS_ASSERTION_FAILURE ((DWORD)0xC0000420)
#define STATUS_SXS_EARLY_DEACTIVATION ((DWORD)0xC015000F)
#define STATUS_SXS_INVALID_DEACTIVATION ((DWORD)0xC0150010)
#endif
#endif
#define MAXIMUM_WAIT_OBJECTS 64
#define MAXIMUM_SUSPEND_COUNT MAXCHAR
typedef ULONG_PTR KSPIN_LOCK;
typedef KSPIN_LOCK *PKSPIN_LOCK;
typedef struct DECLSPEC_ALIGN (16) _M128A {
ULONGLONG Low;
LONGLONG High;
} M128A,*PM128A;
typedef struct DECLSPEC_ALIGN (16) _XSAVE_FORMAT {
WORD ControlWord;
WORD StatusWord;
BYTE TagWord;
BYTE Reserved1;
WORD ErrorOpcode;
DWORD ErrorOffset;
WORD ErrorSelector;
WORD Reserved2;
DWORD DataOffset;
WORD DataSelector;
WORD Reserved3;
DWORD MxCsr;
DWORD MxCsr_Mask;
M128A FloatRegisters[8];
#ifdef _WIN64
M128A XmmRegisters[16];
BYTE Reserved4[96];
#else
M128A XmmRegisters[8];
BYTE Reserved4[220];
DWORD Cr0NpxState;
#endif
} XSAVE_FORMAT,*PXSAVE_FORMAT;
typedef struct DECLSPEC_ALIGN (8) _XSAVE_AREA_HEADER {
DWORD64 Mask;
DWORD64 Reserved[7];
} XSAVE_AREA_HEADER,*PXSAVE_AREA_HEADER;
typedef struct DECLSPEC_ALIGN (16) _XSAVE_AREA {
XSAVE_FORMAT LegacyState;
XSAVE_AREA_HEADER Header;
} XSAVE_AREA,*PXSAVE_AREA;
typedef struct _XSTATE_CONTEXT {
DWORD64 Mask;
DWORD Length;
DWORD Reserved1;
PXSAVE_AREA Area;
#if defined (__i386__)
DWORD Reserved2;
#endif
PVOID Buffer;
#if defined (__i386__)
DWORD Reserved3;
#endif
} XSTATE_CONTEXT,*PXSTATE_CONTEXT;
typedef struct _SCOPE_TABLE_AMD64 {
DWORD Count;
struct {
DWORD BeginAddress;
DWORD EndAddress;
DWORD HandlerAddress;
DWORD JumpTarget;
} ScopeRecord[1];
} SCOPE_TABLE_AMD64,*PSCOPE_TABLE_AMD64;
#ifdef _AMD64_
#if defined(__x86_64) && !defined(RC_INVOKED)
#ifdef __cplusplus
extern "C" {
#endif
#define BitTest _bittest
#define BitTestAndComplement _bittestandcomplement
#define BitTestAndSet _bittestandset
#define BitTestAndReset _bittestandreset
#define BitTest64 _bittest64
#define BitTestAndComplement64 _bittestandcomplement64
#define BitTestAndSet64 _bittestandset64
#define BitTestAndReset64 _bittestandreset64
/* BOOLEAN _bittest(LONG const *Base,LONG Offset); moved to psdk_inc/intrin-impl.h */
/* BOOLEAN _bittestandcomplement(LONG *Base,LONG Offset); moved to psdk_inc/intrin-impl.h */
/* BOOLEAN _bittestandset(LONG *Base,LONG Offset); moved to psdk_inc/intrin-impl.h */
/* BOOLEAN _bittestandreset(LONG *Base,LONG Offset); moved to psdk_inc/intrin-impl.h */
/* BOOLEAN _bittest64(LONG64 const *Base,LONG64 Offset); moved to psdk_inc/intrin-impl.h */
/* BOOLEAN _bittestandcomplement64(LONG64 *Base,LONG64 Offset); moved to psdk_inc/intrin-impl.h */
/* BOOLEAN _bittestandset64(LONG64 *Base,LONG64 Offset); moved to psdk_inc/intrin-impl.h */
/* BOOLEAN _bittestandreset64(LONG64 *Base,LONG64 Offset); moved to psdk_inc/intrin-impl.h */
#define BitScanForward _BitScanForward
#define BitScanReverse _BitScanReverse
#define BitScanForward64 _BitScanForward64
#define BitScanReverse64 _BitScanReverse64
/* BOOLEAN _BitScanForward(DWORD *Index,DWORD Mask); moved to psdk_inc/intrin-impl.h */
/* BOOLEAN _BitScanReverse(DWORD *Index,DWORD Mask); moved to psdk_inc/intrin-impl.h */
/* BOOLEAN _BitScanForward64(DWORD *Index,DWORD64 Mask); moved to psdk_inc/intrin-impl.h */
/* BOOLEAN _BitScanReverse64(DWORD *Index,DWORD64 Mask); moved to psdk_inc/intrin-impl.h */
#define InterlockedIncrement16 _InterlockedIncrement16
#define InterlockedDecrement16 _InterlockedDecrement16
#define InterlockedCompareExchange16 _InterlockedCompareExchange16
#define InterlockedAnd _InterlockedAnd
#define InterlockedOr _InterlockedOr
#define InterlockedXor _InterlockedXor
#define InterlockedIncrement _InterlockedIncrement
#define InterlockedIncrementAcquire InterlockedIncrement
#define InterlockedIncrementRelease InterlockedIncrement
#define InterlockedDecrement _InterlockedDecrement
#define InterlockedDecrementAcquire InterlockedDecrement
#define InterlockedDecrementRelease InterlockedDecrement
#define InterlockedAdd _InterlockedAdd
#define InterlockedExchange _InterlockedExchange
#define InterlockedExchangeAdd _InterlockedExchangeAdd
#define InterlockedCompareExchange _InterlockedCompareExchange
#define InterlockedCompareExchangeAcquire InterlockedCompareExchange
#define InterlockedCompareExchangeRelease InterlockedCompareExchange
#define InterlockedAnd64 _InterlockedAnd64
#define InterlockedAndAffinity InterlockedAnd64
#define InterlockedOr64 _InterlockedOr64
#define InterlockedOrAffinity InterlockedOr64
#define InterlockedXor64 _InterlockedXor64
#define InterlockedIncrement64 _InterlockedIncrement64
#define InterlockedDecrement64 _InterlockedDecrement64
#define InterlockedAdd64 _InterlockedAdd64
#define InterlockedExchange64 _InterlockedExchange64
#define InterlockedExchangeAcquire64 InterlockedExchange64
#define InterlockedExchangeAdd64 _InterlockedExchangeAdd64
#define InterlockedCompareExchange64 _InterlockedCompareExchange64
#define InterlockedCompareExchangeAcquire64 InterlockedCompareExchange64
#define InterlockedCompareExchangeRelease64 InterlockedCompareExchange64
#define InterlockedExchangePointer _InterlockedExchangePointer
#define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer
#define InterlockedCompareExchangePointerAcquire _InterlockedCompareExchangePointer
#define InterlockedCompareExchangePointerRelease _InterlockedCompareExchangePointer
#define InterlockedExchangeAddSizeT(a,b) InterlockedExchangeAdd64((LONG64 *)a,b)
#define InterlockedIncrementSizeT(a) InterlockedIncrement64((LONG64 *)a)
#define InterlockedDecrementSizeT(a) InterlockedDecrement64((LONG64 *)a)
/* SHORT InterlockedIncrement16(SHORT volatile *Addend); moved to psdk_inc/intrin-impl.h */
/* SHORT InterlockedDecrement16(SHORT volatile *Addend); moved to psdk_inc/intrin-impl.h */
/* SHORT InterlockedCompareExchange16(SHORT volatile *Destination,SHORT ExChange,SHORT Comperand); moved to psdk_inc/intrin-impl.h */
/* LONG InterlockedIncrement(LONG volatile *Addend); moved to psdk_inc/intrin-impl.h */
/* LONG InterlockedDecrement(LONG volatile *Addend); moved to psdk_inc/intrin-impl.h */
/* LONG InterlockedExchange(LONG volatile *Target,LONG Value); moved to psdk_inc/intrin-impl.h */
/* LONG InterlockedExchangeAdd(LONG volatile *Addend,LONG Value); moved to psdk_inc/intrin-impl.h */
/* LONG InterlockedCompareExchange(LONG volatile *Destination,LONG ExChange,LONG Comperand); moved to psdk_inc/intrin-impl.h */
/* LONG InterlockedAdd(LONG volatile *Addend,LONG Value); moved to psdk_inc/intrin-impl.h */
/* LONG64 InterlockedIncrement64(LONG64 volatile *Addend); moved to psdk_inc/intrin-impl.h */
/* LONG64 InterlockedDecrement64(LONG64 volatile *Addend); moved to psdk_inc/intrin-impl.h */
/* LONG64 InterlockedExchange64(LONG64 volatile *Target,LONG64 Value); moved to psdk_inc/intrin-impl.h */
/* LONG64 InterlockedExchangeAdd64(LONG64 volatile *Addend,LONG64 Value); moved to psdk_inc/intrin-impl.h */
/* LONG64 InterlockedAdd64(LONG64 volatile *Addend,LONG64 Value); moved to psdk_inc/intrin-impl.h */
/* LONG64 InterlockedCompareExchange64(LONG64 volatile *Destination,LONG64 ExChange,LONG64 Comperand); moved to psdk_inc/intrin-impl.h */
/* PVOID InterlockedCompareExchangePointer(PVOID volatile *Destination,PVOID ExChange,PVOID Comperand); moved to psdk_inc/intrin-impl.h */
/* PVOID InterlockedExchangePointer(PVOID volatile *Target,PVOID Value); moved to psdk_inc/intrin-impl.h */
#define CacheLineFlush(Address) _mm_clflush(Address)
# if defined(__cplusplus)
extern "C" {
# endif
# include <x86intrin.h>
# if defined(__cplusplus)
}
# endif
#include <emmintrin.h>
#define FastFence __faststorefence
#define LoadFence _mm_lfence
#define MemoryFence _mm_mfence
#define StoreFence _mm_sfence
#define YieldProcessor _mm_pause
#define MemoryBarrier _mm_mfence
#define PreFetchCacheLine(l,a) _mm_prefetch((CHAR CONST *) a,l)
#define PrefetchForWrite(p) _m_prefetchw(p)
#define ReadForWriteAccess(p) (_m_prefetchw(p),*(p))
#define PF_TEMPORAL_LEVEL_1 _MM_HINT_T0
#define PF_TEMPORAL_LEVEL_2 _MM_HINT_T1
#define PF_TEMPORAL_LEVEL_3 _MM_HINT_T2
#define PF_NON_TEMPORAL_LEVEL_ALL _MM_HINT_NTA
#define ReadMxCsr _mm_getcsr
#define WriteMxCsr _mm_setcsr
#define DbgRaiseAssertionFailure __int2c
#define GetCallersEflags() __getcallerseflags()
unsigned __int32 __getcallerseflags(VOID);
#define GetSegmentLimit __segmentlimit
DWORD __segmentlimit(DWORD Selector);
#define ReadTimeStampCounter() __rdtsc()
/* VOID __movsb(PBYTE Destination,BYTE const *Source,SIZE_T Count); moved to psdk_inc/intrin-impl.h */
/* VOID __movsw(PWORD Destination,WORD const *Source,SIZE_T Count); moved to psdk_inc/intrin-impl.h */
/* VOID __movsd(PDWORD Destination,DWORD const *Source,SIZE_T Count); moved to psdk_inc/intrin-impl.h */
/* VOID __movsq(PDWORD64 Destination,DWORD64 const *Source,SIZE_T Count); moved to psdk_inc/intrin-impl.h */
#define MultiplyHigh __mulh
#define UnsignedMultiplyHigh __umulh
LONGLONG MultiplyHigh(LONGLONG Multiplier,LONGLONG Multiplicand);
ULONGLONG UnsignedMultiplyHigh(ULONGLONG Multiplier,ULONGLONG Multiplicand);
#define ShiftLeft128 __shiftleft128
#define ShiftRight128 __shiftright128
DWORD64 ShiftLeft128(DWORD64 LowPart,DWORD64 HighPart,BYTE Shift);
DWORD64 ShiftRight128(DWORD64 LowPart,DWORD64 HighPart,BYTE Shift);
#define Multiply128 _mul128
LONG64 Multiply128(LONG64 Multiplier,LONG64 Multiplicand,LONG64 *HighProduct);
#define UnsignedMultiply128 _umul128
DWORD64 UnsignedMultiply128(DWORD64 Multiplier,DWORD64 Multiplicand,DWORD64 *HighProduct);
LONG64 MultiplyExtract128(LONG64 Multiplier,LONG64 Multiplicand,BYTE Shift);
DWORD64 UnsignedMultiplyExtract128(DWORD64 Multiplier,DWORD64 Multiplicand,BYTE Shift);
#ifndef __CRT__NO_INLINE
__CRT_INLINE LONG64 MultiplyExtract128(LONG64 Multiplier,LONG64 Multiplicand,BYTE Shift) {
LONG64 extractedProduct;
LONG64 highProduct;
LONG64 lowProduct;
lowProduct = Multiply128(Multiplier,Multiplicand,&highProduct);
extractedProduct = (LONG64)ShiftRight128((LONG64)lowProduct,(LONG64)highProduct,Shift);
return extractedProduct;
}
__CRT_INLINE DWORD64 UnsignedMultiplyExtract128(DWORD64 Multiplier,DWORD64 Multiplicand,BYTE Shift) {
DWORD64 extractedProduct;
DWORD64 highProduct;
DWORD64 lowProduct;
lowProduct = UnsignedMultiply128(Multiplier,Multiplicand,&highProduct);
extractedProduct = ShiftRight128(lowProduct,highProduct,Shift);
return extractedProduct;
}
#endif
/* unsigned char __readgsbyte(unsigned __LONG32 Offset); moved to psdk_inc/intrin-impl.h */
/* unsigned short __readgsword(unsigned __LONG32 Offset); moved to psdk_inc/intrin-impl.h */
/* unsigned __LONG32 __readgsdword(unsigned __LONG32 Offset); moved to psdk_inc/intrin-impl.h */
/* __MINGW_EXTENSION unsigned __int64 __readgsqword(unsigned __LONG32 Offset); moved to psdk_inc/intrin-impl.h */
/* void __writegsbyte(unsigned __LONG32 Offset,unsigned char Data); moved to psdk_inc/intrin-impl.h */
/* void __writegsword(unsigned __LONG32 Offset,unsigned short Data); moved to psdk_inc/intrin-impl.h */
/* void __writegsdword(unsigned __LONG32 Offset,unsigned __LONG32 Data); moved to psdk_inc/intrin-impl.h */
#ifdef __cplusplus
}
#endif
#endif /* defined(__x86_64) && !defined(RC_INVOKED) */
#define EXCEPTION_READ_FAULT 0
#define EXCEPTION_WRITE_FAULT 1
#define EXCEPTION_EXECUTE_FAULT 8
#if !defined(RC_INVOKED)
#define CONTEXT_AMD64 0x100000
#define CONTEXT_CONTROL (CONTEXT_AMD64 | __MSABI_LONG(0x1))
#define CONTEXT_INTEGER (CONTEXT_AMD64 | __MSABI_LONG(0x2))
#define CONTEXT_SEGMENTS (CONTEXT_AMD64 | __MSABI_LONG(0x4))
#define CONTEXT_FLOATING_POINT (CONTEXT_AMD64 | __MSABI_LONG(0x8))
#define CONTEXT_DEBUG_REGISTERS (CONTEXT_AMD64 | __MSABI_LONG(0x10))
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT)
#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS | CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS)
#define CONTEXT_EXCEPTION_ACTIVE 0x8000000
#define CONTEXT_SERVICE_ACTIVE 0x10000000
#define CONTEXT_EXCEPTION_REQUEST 0x40000000
#define CONTEXT_EXCEPTION_REPORTING 0x80000000
#endif /* !defined(RC_INVOKED) */
#define INITIAL_MXCSR 0x1f80
#define INITIAL_FPCSR 0x027f
typedef struct _XMM_SAVE_AREA32 {
WORD ControlWord;
WORD StatusWord;
BYTE TagWord;
BYTE Reserved1;
WORD ErrorOpcode;
DWORD ErrorOffset;
WORD ErrorSelector;
WORD Reserved2;
DWORD DataOffset;
WORD DataSelector;
WORD Reserved3;
DWORD MxCsr;
DWORD MxCsr_Mask;
M128A FloatRegisters[8];
M128A XmmRegisters[16];
BYTE Reserved4[96];
} XMM_SAVE_AREA32,*PXMM_SAVE_AREA32;
#define LEGACY_SAVE_AREA_LENGTH sizeof(XMM_SAVE_AREA32)
typedef struct DECLSPEC_ALIGN(16) _CONTEXT {
DWORD64 P1Home;
DWORD64 P2Home;
DWORD64 P3Home;
DWORD64 P4Home;
DWORD64 P5Home;
DWORD64 P6Home;
DWORD ContextFlags;
DWORD MxCsr;
WORD SegCs;
WORD SegDs;
WORD SegEs;
WORD SegFs;
WORD SegGs;
WORD SegSs;
DWORD EFlags;
DWORD64 Dr0;
DWORD64 Dr1;
DWORD64 Dr2;
DWORD64 Dr3;
DWORD64 Dr6;
DWORD64 Dr7;
DWORD64 Rax;
DWORD64 Rcx;
DWORD64 Rdx;
DWORD64 Rbx;
DWORD64 Rsp;
DWORD64 Rbp;
DWORD64 Rsi;
DWORD64 Rdi;
DWORD64 R8;
DWORD64 R9;
DWORD64 R10;
DWORD64 R11;
DWORD64 R12;
DWORD64 R13;
DWORD64 R14;
DWORD64 R15;
DWORD64 Rip;
__C89_NAMELESS union {
XMM_SAVE_AREA32 FltSave;
XMM_SAVE_AREA32 FloatSave;
__C89_NAMELESS struct {
M128A Header[2];
M128A Legacy[8];
M128A Xmm0;
M128A Xmm1;
M128A Xmm2;
M128A Xmm3;
M128A Xmm4;
M128A Xmm5;
M128A Xmm6;
M128A Xmm7;
M128A Xmm8;
M128A Xmm9;
M128A Xmm10;
M128A Xmm11;
M128A Xmm12;
M128A Xmm13;
M128A Xmm14;
M128A Xmm15;
};
};
M128A VectorRegister[26];
DWORD64 VectorControl;
DWORD64 DebugControl;
DWORD64 LastBranchToRip;
DWORD64 LastBranchFromRip;
DWORD64 LastExceptionToRip;
DWORD64 LastExceptionFromRip;
} CONTEXT,*PCONTEXT;
#define RUNTIME_FUNCTION_INDIRECT 0x1
typedef struct _RUNTIME_FUNCTION {
DWORD BeginAddress;
DWORD EndAddress;
DWORD UnwindData;
} RUNTIME_FUNCTION,*PRUNTIME_FUNCTION;
typedef PRUNTIME_FUNCTION (*PGET_RUNTIME_FUNCTION_CALLBACK)(DWORD64 ControlPc,PVOID Context);
typedef DWORD (*POUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK)(HANDLE Process,PVOID TableAddress,PDWORD Entries,PRUNTIME_FUNCTION *Functions);
#define OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK_EXPORT_NAME "OutOfProcessFunctionTableCallback"
#define UNW_FLAG_NHANDLER 0x0
#define UNW_FLAG_EHANDLER 0x1
#define UNW_FLAG_UHANDLER 0x2
#define UNW_FLAG_CHAININFO 0x4
#endif /* end of _AMD64_ */
#ifdef _ARM_
#if defined(__arm__) && !defined(RC_INVOKED)
#ifdef __cplusplus
extern "C" {
#endif
#define BitTest _bittest
#define BitTestAndComplement _bittestandcomplement
#define BitTestAndSet _bittestandset
#define BitTestAndReset _bittestandreset
#define BitScanForward _BitScanForward
#define BitScanReverse _BitScanReverse
#define InterlockedIncrement16 _InterlockedIncrement16
#define InterlockedDecrement16 _InterlockedDecrement16
#define InterlockedCompareExchange16 _InterlockedCompareExchange16
#define InterlockedAnd _InterlockedAnd
#define InterlockedOr _InterlockedOr
#define InterlockedXor _InterlockedXor
#define InterlockedIncrement _InterlockedIncrement
#define InterlockedIncrementAcquire InterlockedIncrement
#define InterlockedIncrementRelease InterlockedIncrement
#define InterlockedDecrement _InterlockedDecrement
#define InterlockedDecrementAcquire InterlockedDecrement
#define InterlockedDecrementRelease InterlockedDecrement
#define InterlockedAdd _InterlockedAdd
#define InterlockedExchange _InterlockedExchange
#define InterlockedExchangeAdd _InterlockedExchangeAdd
#define InterlockedCompareExchange _InterlockedCompareExchange
#define InterlockedCompareExchangeAcquire InterlockedCompareExchange
#define InterlockedCompareExchangeRelease InterlockedCompareExchange
#define InterlockedAnd64 _InterlockedAnd64
#define InterlockedAndAffinity InterlockedAnd64
#define InterlockedOr64 _InterlockedOr64
#define InterlockedOrAffinity InterlockedOr64
#define InterlockedXor64 _InterlockedXor64
#define InterlockedIncrement64 _InterlockedIncrement64
#define InterlockedDecrement64 _InterlockedDecrement64
#define InterlockedAdd64 _InterlockedAdd64
#define InterlockedExchange64 _InterlockedExchange64
#define InterlockedExchangeAcquire64 InterlockedExchange64
#define InterlockedExchangeAdd64 _InterlockedExchangeAdd64
#define InterlockedCompareExchange64 _InterlockedCompareExchange64
#define InterlockedCompareExchangeAcquire64 InterlockedCompareExchange64
#define InterlockedCompareExchangeRelease64 InterlockedCompareExchange64
#define InterlockedExchangePointer _InterlockedExchangePointer
#define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer
#define InterlockedCompareExchangePointerAcquire _InterlockedCompareExchangePointer
#define InterlockedCompareExchangePointerRelease _InterlockedCompareExchangePointer
#define YieldProcessor() __asm__ __volatile__("dmb ishst\n\tyield":::"memory")
#define MemoryBarrier() __asm__ __volatile__("dmb":::"memory")
#ifdef __cplusplus
}
#endif
#endif /* defined(__arm__) && !defined(RC_INVOKED) */
#define EXCEPTION_READ_FAULT 0
#define EXCEPTION_WRITE_FAULT 1
#define EXCEPTION_EXECUTE_FAULT 8
#if !defined(RC_INVOKED)
#define CONTEXT_ARM 0x0200000
#define CONTEXT_CONTROL (CONTEXT_ARM | 0x00000001)
#define CONTEXT_INTEGER (CONTEXT_ARM | 0x00000002)
#define CONTEXT_FLOATING_POINT (CONTEXT_ARM | 0x00000004)
#define CONTEXT_DEBUG_REGISTERS (CONTEXT_ARM | 0x00000008)
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT)
#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS)
#define CONTEXT_EXCEPTION_ACTIVE 0x08000000
#define CONTEXT_SERVICE_ACTIVE 0x10000000
#define CONTEXT_EXCEPTION_REQUEST 0x40000000
#define CONTEXT_EXCEPTION_REPORTING 0x80000000
#define CONTEXT_UNWOUND_TO_CALL 0x20000000
#endif /* !defined(RC_INVOKED) */
#define INITIAL_CPSR 0x10
#define INITIAL_FPSCR 0x00
#define ARM_MAX_BREAKPOINTS 8
#define ARM_MAX_WATCHPOINTS 1
typedef struct _NEON128 {
ULONGLONG Low;
LONGLONG High;
} NEON128, *PNEON128;
typedef struct DECLSPEC_ALIGN(8) _CONTEXT {
DWORD ContextFlags;
DWORD R0;
DWORD R1;
DWORD R2;
DWORD R3;
DWORD R4;
DWORD R5;
DWORD R6;
DWORD R7;
DWORD R8;
DWORD R9;
DWORD R10;
DWORD R11;
DWORD R12;
DWORD Sp;
DWORD Lr;
DWORD Pc;
DWORD Cpsr;
DWORD Fpscr;
DWORD Padding;
union {
NEON128 Q[16];
ULONGLONG D[32];
DWORD S[32];
} DUMMYUNIONNAME;
DWORD Bvr[ARM_MAX_BREAKPOINTS];
DWORD Bcr[ARM_MAX_BREAKPOINTS];
DWORD Wvr[ARM_MAX_WATCHPOINTS];
DWORD Wcr[ARM_MAX_WATCHPOINTS];
DWORD Padding2[2];
} CONTEXT, *PCONTEXT;
typedef struct _IMAGE_ARM_RUNTIME_FUNCTION_ENTRY RUNTIME_FUNCTION, *PRUNTIME_FUNCTION;
typedef PRUNTIME_FUNCTION (*PGET_RUNTIME_FUNCTION_CALLBACK)(DWORD ControlPc,PVOID Context);
#define UNW_FLAG_NHANDLER 0x0
#define UNW_FLAG_EHANDLER 0x1
#define UNW_FLAG_UHANDLER 0x2
#define UNWIND_HISTORY_TABLE_SIZE 12
typedef struct _UNWIND_HISTORY_TABLE_ENTRY {
DWORD ImageBase;
PRUNTIME_FUNCTION FunctionEntry;
} UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY;
typedef struct _UNWIND_HISTORY_TABLE {
DWORD Count;
BYTE LocalHint;
BYTE GlobalHint;
BYTE Search;
BYTE Once;
DWORD LowAddress;
DWORD HighAddress;
UNWIND_HISTORY_TABLE_ENTRY Entry[UNWIND_HISTORY_TABLE_SIZE];
} UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE;
struct _DISPATCHER_CONTEXT;
typedef struct _DISPATCHER_CONTEXT DISPATCHER_CONTEXT;
typedef struct _DISPATCHER_CONTEXT *PDISPATCHER_CONTEXT;
struct _DISPATCHER_CONTEXT {
ULONG ControlPc;
ULONG ImageBase;
PRUNTIME_FUNCTION FunctionEntry;
ULONG EstablisherFrame;
ULONG TargetPc;
PCONTEXT ContextRecord;
PEXCEPTION_ROUTINE LanguageHandler;
PVOID HandlerData;
PUNWIND_HISTORY_TABLE HistoryTable;
ULONG ScopeIndex;
BOOLEAN ControlPcIsUnwound;
PBYTE NonVolatileRegisters;
ULONG VirtualVfpHead;
};
typedef struct _KNONVOLATILE_CONTEXT_POINTERS {
PDWORD R4;
PDWORD R5;
PDWORD R6;
PDWORD R7;
PDWORD R8;
PDWORD R9;
PDWORD R10;
PDWORD R11;
PDWORD Lr;
PULONGLONG D8;
PULONGLONG D9;
PULONGLONG D10;
PULONGLONG D11;
PULONGLONG D12;
PULONGLONG D13;
PULONGLONG D14;
PULONGLONG D15;
} KNONVOLATILE_CONTEXT_POINTERS, *PKNONVOLATILE_CONTEXT_POINTERS;
#define OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK_EXPORT_NAME "OutOfProcessFunctionTableCallback"
#endif /* _ARM_ */
#ifdef _ARM64_
#if defined(__aarch64__) && !defined(RC_INVOKED)
#ifdef __cplusplus
extern "C" {
#endif
#define BitTest _bittest
#define BitTestAndComplement _bittestandcomplement
#define BitTestAndSet _bittestandset
#define BitTestAndReset _bittestandreset
#define BitScanForward _BitScanForward
#define BitScanReverse _BitScanReverse
#define BitScanForward64 _BitScanForward64
#define BitScanReverse64 _BitScanReverse64
#define InterlockedIncrement16 _InterlockedIncrement16
#define InterlockedDecrement16 _InterlockedDecrement16
#define InterlockedCompareExchange16 _InterlockedCompareExchange16
#define InterlockedAnd _InterlockedAnd
#define InterlockedOr _InterlockedOr
#define InterlockedXor _InterlockedXor
#define InterlockedIncrement _InterlockedIncrement
#define InterlockedIncrementAcquire InterlockedIncrement
#define InterlockedIncrementRelease InterlockedIncrement
#define InterlockedDecrement _InterlockedDecrement
#define InterlockedDecrementAcquire InterlockedDecrement
#define InterlockedDecrementRelease InterlockedDecrement
#define InterlockedAdd _InterlockedAdd
#define InterlockedExchange _InterlockedExchange
#define InterlockedExchangeAdd _InterlockedExchangeAdd
#define InterlockedCompareExchange _InterlockedCompareExchange
#define InterlockedCompareExchangeAcquire InterlockedCompareExchange
#define InterlockedCompareExchangeRelease InterlockedCompareExchange
#define InterlockedAnd64 _InterlockedAnd64
#define InterlockedAndAffinity InterlockedAnd64
#define InterlockedOr64 _InterlockedOr64
#define InterlockedOrAffinity InterlockedOr64
#define InterlockedXor64 _InterlockedXor64
#define InterlockedIncrement64 _InterlockedIncrement64
#define InterlockedDecrement64 _InterlockedDecrement64
#define InterlockedAdd64 _InterlockedAdd64
#define InterlockedExchange64 _InterlockedExchange64
#define InterlockedExchangeAcquire64 InterlockedExchange64
#define InterlockedExchangeAdd64 _InterlockedExchangeAdd64
#define InterlockedCompareExchange64 _InterlockedCompareExchange64
#define InterlockedCompareExchangeAcquire64 InterlockedCompareExchange64
#define InterlockedCompareExchangeRelease64 InterlockedCompareExchange64
#define InterlockedExchangePointer _InterlockedExchangePointer
#define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer
#define InterlockedCompareExchangePointerAcquire _InterlockedCompareExchangePointer
#define InterlockedCompareExchangePointerRelease _InterlockedCompareExchangePointer
#define YieldProcessor() __asm__ __volatile__("dmb ishst\n\tyield":::"memory")
#define MemoryBarrier() __asm__ __volatile__("dmb sy":::"memory")
#ifdef __cplusplus
}
#endif
#endif /* defined(__aarch64__) && !defined(RC_INVOKED) */
#define EXCEPTION_READ_FAULT 0
#define EXCEPTION_WRITE_FAULT 1
#define EXCEPTION_EXECUTE_FAULT 8
#if !defined(RC_INVOKED)
#define CONTEXT_ARM64 0x400000
#define CONTEXT_CONTROL (CONTEXT_ARM64 | 0x00000001)
#define CONTEXT_INTEGER (CONTEXT_ARM64 | 0x00000002)
#define CONTEXT_FLOATING_POINT (CONTEXT_ARM64 | 0x00000004)
#define CONTEXT_DEBUG_REGISTERS (CONTEXT_ARM64 | 0x00000008)
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER)
#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS)
#define EXCEPTION_READ_FAULT 0
#define EXCEPTION_WRITE_FAULT 1
#define EXCEPTION_EXECUTE_FAULT 8
#define ARM64_MAX_BREAKPOINTS 8
#define ARM64_MAX_WATCHPOINTS 2
#endif /* !defined(RC_INVOKED) */
typedef union _NEON128 {
struct
{
ULONGLONG Low;
LONGLONG High;
} DUMMYSTRUCTNAME;
double D[2];
float S[4];
WORD H[8];
BYTE B[16];
} NEON128, *PNEON128;
typedef struct DECLSPEC_ALIGN(16) _CONTEXT {
ULONG ContextFlags; /* 000 */
/* CONTEXT_INTEGER */
ULONG Cpsr; /* 004 */
union
{
struct
{
DWORD64 X0; /* 008 */
DWORD64 X1; /* 010 */
DWORD64 X2; /* 018 */
DWORD64 X3; /* 020 */
DWORD64 X4; /* 028 */
DWORD64 X5; /* 030 */
DWORD64 X6; /* 038 */
DWORD64 X7; /* 040 */
DWORD64 X8; /* 048 */
DWORD64 X9; /* 050 */
DWORD64 X10; /* 058 */
DWORD64 X11; /* 060 */
DWORD64 X12; /* 068 */
DWORD64 X13; /* 070 */
DWORD64 X14; /* 078 */
DWORD64 X15; /* 080 */
DWORD64 X16; /* 088 */
DWORD64 X17; /* 090 */
DWORD64 X18; /* 098 */
DWORD64 X19; /* 0a0 */
DWORD64 X20; /* 0a8 */
DWORD64 X21; /* 0b0 */
DWORD64 X22; /* 0b8 */
DWORD64 X23; /* 0c0 */
DWORD64 X24; /* 0c8 */
DWORD64 X25; /* 0d0 */
DWORD64 X26; /* 0d8 */
DWORD64 X27; /* 0e0 */
DWORD64 X28; /* 0e8 */
DWORD64 Fp; /* 0f0 */
DWORD64 Lr; /* 0f8 */
} DUMMYSTRUCTNAME;
DWORD64 X[31]; /* 008 */
} DUMMYUNIONNAME;
/* CONTEXT_CONTROL */
DWORD64 Sp; /* 100 */
DWORD64 Pc; /* 108 */
/* CONTEXT_FLOATING_POINT */
NEON128 V[32]; /* 110 */
DWORD Fpcr; /* 310 */
DWORD Fpsr; /* 314 */
/* CONTEXT_DEBUG_REGISTERS */
DWORD Bcr[ARM64_MAX_BREAKPOINTS]; /* 318 */
DWORD64 Bvr[ARM64_MAX_BREAKPOINTS]; /* 338 */
DWORD Wcr[ARM64_MAX_WATCHPOINTS]; /* 378 */
DWORD64 Wvr[ARM64_MAX_WATCHPOINTS]; /* 380 */
} CONTEXT, *PCONTEXT;
typedef struct _IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY RUNTIME_FUNCTION, *PRUNTIME_FUNCTION;
typedef PRUNTIME_FUNCTION (*PGET_RUNTIME_FUNCTION_CALLBACK)(DWORD64 ControlPc,PVOID Context);
#define UNW_FLAG_NHANDLER 0x0
#define UNW_FLAG_EHANDLER 0x1
#define UNW_FLAG_UHANDLER 0x2
#define UNWIND_HISTORY_TABLE_SIZE 12
typedef struct _UNWIND_HISTORY_TABLE_ENTRY {
DWORD64 ImageBase;
PRUNTIME_FUNCTION FunctionEntry;
} UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY;
typedef struct _UNWIND_HISTORY_TABLE {
DWORD Count;
BYTE LocalHint;
BYTE GlobalHint;
BYTE Search;
BYTE Once;
DWORD64 LowAddress;
DWORD64 HighAddress;
UNWIND_HISTORY_TABLE_ENTRY Entry[UNWIND_HISTORY_TABLE_SIZE];
} UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE;
struct _DISPATCHER_CONTEXT;
typedef struct _DISPATCHER_CONTEXT DISPATCHER_CONTEXT;
typedef struct _DISPATCHER_CONTEXT *PDISPATCHER_CONTEXT;
struct _DISPATCHER_CONTEXT {
ULONG_PTR ControlPc;
ULONG_PTR ImageBase;
PRUNTIME_FUNCTION FunctionEntry;
ULONG_PTR EstablisherFrame;
ULONG_PTR TargetPc;
PCONTEXT ContextRecord;
PEXCEPTION_ROUTINE LanguageHandler;
PVOID HandlerData;
PUNWIND_HISTORY_TABLE HistoryTable;
ULONG ScopeIndex;
BOOLEAN ControlPcIsUnwound;
PBYTE NonVolatileRegisters;
};
typedef struct _KNONVOLATILE_CONTEXT_POINTERS {
PDWORD64 X19;
PDWORD64 X20;
PDWORD64 X21;
PDWORD64 X22;
PDWORD64 X23;
PDWORD64 X24;
PDWORD64 X25;
PDWORD64 X26;
PDWORD64 X27;
PDWORD64 X28;
PDWORD64 Fp;
PDWORD64 Lr;
PDWORD64 D8;
PDWORD64 D9;
PDWORD64 D10;
PDWORD64 D11;
PDWORD64 D12;
PDWORD64 D13;
PDWORD64 D14;
PDWORD64 D15;
} KNONVOLATILE_CONTEXT_POINTERS, *PKNONVOLATILE_CONTEXT_POINTERS;
#define OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK_EXPORT_NAME "OutOfProcessFunctionTableCallback"
#endif /* _ARM64_ */
#ifdef _X86_
#if defined(__i386__) && !defined(__x86_64) && !defined(RC_INVOKED)
#ifdef __cplusplus
extern "C" {
#endif
#define BitTest _bittest
#define BitTestAndComplement _bittestandcomplement
#define BitTestAndSet _bittestandset
#define BitTestAndReset _bittestandreset
#define BitScanForward _BitScanForward
#define BitScanReverse _BitScanReverse
#define InterlockedIncrement16 _InterlockedIncrement16
#define InterlockedDecrement16 _InterlockedDecrement16
#define InterlockedCompareExchange16 _InterlockedCompareExchange16
#define InterlockedAnd _InterlockedAnd
#define InterlockedOr _InterlockedOr
#define InterlockedXor _InterlockedXor
#define InterlockedIncrement _InterlockedIncrement
#define InterlockedIncrementAcquire InterlockedIncrement
#define InterlockedIncrementRelease InterlockedIncrement
#define InterlockedDecrement _InterlockedDecrement
#define InterlockedDecrementAcquire InterlockedDecrement
#define InterlockedDecrementRelease InterlockedDecrement
#define InterlockedAdd _InterlockedAdd
#define InterlockedExchange _InterlockedExchange
#define InterlockedExchangeAdd _InterlockedExchangeAdd
#define InterlockedCompareExchange _InterlockedCompareExchange
#define InterlockedCompareExchangeAcquire InterlockedCompareExchange
#define InterlockedCompareExchangeRelease InterlockedCompareExchange
#define InterlockedAnd64 _InterlockedAnd64
#define InterlockedAndAffinity InterlockedAnd64
#define InterlockedOr64 _InterlockedOr64
#define InterlockedOrAffinity InterlockedOr64
#define InterlockedXor64 _InterlockedXor64
#define InterlockedIncrement64 _InterlockedIncrement64
#define InterlockedDecrement64 _InterlockedDecrement64
#define InterlockedAdd64 _InterlockedAdd64
#define InterlockedExchange64 _InterlockedExchange64
#define InterlockedExchangeAcquire64 InterlockedExchange64
#define InterlockedExchangeAdd64 _InterlockedExchangeAdd64
#define InterlockedCompareExchange64 _InterlockedCompareExchange64
#define InterlockedCompareExchangeAcquire64 InterlockedCompareExchange64
#define InterlockedCompareExchangeRelease64 InterlockedCompareExchange64
#define InterlockedExchangePointer _InterlockedExchangePointer
#define InterlockedCompareExchangePointer(Destination, ExChange, Comperand) (PVOID) (LONG_PTR)InterlockedCompareExchange ((LONG volatile *) (Destination),(LONG) (LONG_PTR) (ExChange),(LONG) (LONG_PTR) (Comperand))
#define InterlockedCompareExchangePointerAcquire InterlockedCompareExchangePointer
#define InterlockedCompareExchangePointerRelease InterlockedCompareExchangePointer
#ifdef _PREFIX_
/* BYTE __readfsbyte(DWORD Offset); moved to psdk_inc/intrin-impl.h */
/* WORD __readfsword(DWORD Offset); moved to psdk_inc/intrin-impl.h */
/* DWORD __readfsdword(DWORD Offset); moved to psdk_inc/intrin-impl.h */
/* VOID __writefsbyte(DWORD Offset,BYTE Data); moved to psdk_inc/intrin-impl.h */
/* VOID __writefsword(DWORD Offset,WORD Data); moved to psdk_inc/intrin-impl.h */
/* VOID __writefsdword(DWORD Offset,DWORD Data); moved to psdk_inc/intrin-impl.h */
#endif
#ifdef __cplusplus
}
#endif
#endif /* defined(__i386__) && !defined(__x86_64) && !defined(RC_INVOKED) */
#if defined(__i386__) && !defined(__x86_64)
#ifdef __SSE2__
#include <emmintrin.h>
#define YieldProcessor _mm_pause
#define MemoryBarrier _mm_mfence
#else
#define YieldProcessor __buildpause
VOID MemoryBarrier(VOID);
FORCEINLINE VOID MemoryBarrier(VOID)
__buildmemorybarrier()
#endif
#define PreFetchCacheLine(l,a)
#define ReadForWriteAccess(p) (*(p))
#define PF_TEMPORAL_LEVEL_1
#define PF_NON_TEMPORAL_LEVEL_ALL
#define PcTeb 0x18
struct _TEB *NtCurrentTeb(void);
PVOID GetCurrentFiber(void);
PVOID GetFiberData(void);
#define DbgRaiseAssertionFailure __int2c
FORCEINLINE struct _TEB *NtCurrentTeb(void)
{
return (struct _TEB *)__readfsdword(PcTeb);
}
FORCEINLINE PVOID GetCurrentFiber(void)
{
return(PVOID)__readfsdword(0x10);
}
FORCEINLINE PVOID GetFiberData(void)
{
return *(PVOID *)GetCurrentFiber();
}
#endif /* defined(__i386__) && !defined(__x86_64) */
#define EXCEPTION_READ_FAULT 0
#define EXCEPTION_WRITE_FAULT 1
#define EXCEPTION_EXECUTE_FAULT 8
#define SIZE_OF_80387_REGISTERS 80
#if !defined(RC_INVOKED)
#define CONTEXT_i386 0x00010000
#define CONTEXT_i486 0x00010000
#define CONTEXT_CONTROL (CONTEXT_i386 | __MSABI_LONG(0x00000001))
#define CONTEXT_INTEGER (CONTEXT_i386 | __MSABI_LONG(0x00000002))
#define CONTEXT_SEGMENTS (CONTEXT_i386 | __MSABI_LONG(0x00000004))
#define CONTEXT_FLOATING_POINT (CONTEXT_i386 | __MSABI_LONG(0x00000008))
#define CONTEXT_DEBUG_REGISTERS (CONTEXT_i386 | __MSABI_LONG(0x00000010))
#define CONTEXT_EXTENDED_REGISTERS (CONTEXT_i386 | __MSABI_LONG(0x00000020))
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS)
#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS | CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS | CONTEXT_EXTENDED_REGISTERS)
#endif /* !defined(RC_INVOKED) */
#define MAXIMUM_SUPPORTED_EXTENSION 512
typedef struct _FLOATING_SAVE_AREA {
DWORD ControlWord;
DWORD StatusWord;
DWORD TagWord;
DWORD ErrorOffset;
DWORD ErrorSelector;
DWORD DataOffset;
DWORD DataSelector;
BYTE RegisterArea[SIZE_OF_80387_REGISTERS];
DWORD Cr0NpxState;
} FLOATING_SAVE_AREA;
typedef FLOATING_SAVE_AREA *PFLOATING_SAVE_AREA;
typedef struct _CONTEXT {
DWORD ContextFlags;
DWORD Dr0;
DWORD Dr1;
DWORD Dr2;
DWORD Dr3;
DWORD Dr6;
DWORD Dr7;
FLOATING_SAVE_AREA FloatSave;
DWORD SegGs;
DWORD SegFs;
DWORD SegEs;
DWORD SegDs;
DWORD Edi;
DWORD Esi;
DWORD Ebx;
DWORD Edx;
DWORD Ecx;
DWORD Eax;
DWORD Ebp;
DWORD Eip;
DWORD SegCs;
DWORD EFlags;
DWORD Esp;
DWORD SegSs;
BYTE ExtendedRegisters[MAXIMUM_SUPPORTED_EXTENSION];
} CONTEXT;
typedef CONTEXT *PCONTEXT;
#endif /* end of _X86_ */
/* LONG WINAPI InterlockedIncrement(LONG volatile *); moved to psdk_inc/intrin-impl.h */
/* LONG WINAPI InterlockedDecrement(LONG volatile *); moved to psdk_inc/intrin-impl.h */
/* LONG WINAPI InterlockedExchange(LONG volatile *, LONG); moved to psdk_inc/intrin-impl.h */
#ifndef _LDT_ENTRY_DEFINED
#define _LDT_ENTRY_DEFINED
typedef struct _LDT_ENTRY {
WORD LimitLow;
WORD BaseLow;
union {
struct {
BYTE BaseMid;
BYTE Flags1;
BYTE Flags2;
BYTE BaseHi;
} Bytes;
struct {
DWORD BaseMid : 8;
DWORD Type : 5;
DWORD Dpl : 2;
DWORD Pres : 1;
DWORD LimitHi : 4;
DWORD Sys : 1;
DWORD Reserved_0 : 1;
DWORD Default_Big : 1;
DWORD Granularity : 1;
DWORD BaseHi : 8;
} Bits;
} HighWord;
} LDT_ENTRY,*PLDT_ENTRY;
#endif /* _LDT_ENTRY_DEFINED */
#if defined(__ia64__) && !defined(RC_INVOKED)
#ifdef __cplusplus
extern "C" {
#endif
BOOLEAN BitScanForward64(DWORD *Index,DWORD64 Mask);
BOOLEAN BitScanReverse64(DWORD *Index,DWORD64 Mask);
#ifdef __cplusplus
}
#endif
#endif /* defined(__ia64__) && !defined(RC_INVOKED) */
#if !defined(GENUTIL) && !defined(_GENIA64_) && defined(_IA64_)
void *_cdecl _rdteb(void);
#ifdef __ia64__
#define NtCurrentTeb() ((struct _TEB *)_rdteb())
#define GetCurrentFiber() (((PNT_TIB)NtCurrentTeb())->FiberData)
#define GetFiberData() (*(PVOID *)(GetCurrentFiber()))
#ifdef __cplusplus
extern "C" {
#endif
void __break(int);
void __yield(void);
void __mf(void);
void __lfetch(int Level,VOID CONST *Address);
void __lfetchfault(int Level,VOID CONST *Address);
void __lfetch_excl(int Level,VOID CONST *Address);
void __lfetchfault_excl(int Level,VOID CONST *Address);
#define MD_LFHINT_NONE 0x00
#define MD_LFHINT_NT1 0x01
#define MD_LFHINT_NT2 0x02
#define MD_LFHINT_NTA 0x03
#ifdef __cplusplus
}
#endif
#define YieldProcessor __yield
#define MemoryBarrier __mf
#define PreFetchCacheLine __lfetch
#define ReadForWriteAccess(p) (*(p))
#define DbgRaiseAssertionFailure() __break(ASSERT_BREAKPOINT)
#define PF_TEMPORAL_LEVEL_1 MD_LFHINT_NONE
#define PF_NON_TEMPORAL_LEVEL_ALL MD_LFHINT_NTA
#define UnsignedMultiplyHigh __UMULH
ULONGLONG UnsignedMultiplyHigh(ULONGLONG Multiplier,ULONGLONG Multiplicand);
#else /* __ia64__ */
struct _TEB *NtCurrentTeb(void);
#endif /* __ia64__ */
#endif /* !defined(GENUTIL) && !defined(_GENIA64_) && defined(_IA64_) */
#ifdef _IA64_
#define EXCEPTION_READ_FAULT 0
#define EXCEPTION_WRITE_FAULT 1
#define EXCEPTION_EXECUTE_FAULT 2
#if !defined(RC_INVOKED)
#define CONTEXT_IA64 0x00080000
#define CONTEXT_CONTROL (CONTEXT_IA64 | __MSABI_LONG(0x00000001))
#define CONTEXT_LOWER_FLOATING_POINT (CONTEXT_IA64 | __MSABI_LONG(0x00000002))
#define CONTEXT_HIGHER_FLOATING_POINT (CONTEXT_IA64 | __MSABI_LONG(0x00000004))
#define CONTEXT_INTEGER (CONTEXT_IA64 | __MSABI_LONG(0x00000008))
#define CONTEXT_DEBUG (CONTEXT_IA64 | __MSABI_LONG(0x00000010))
#define CONTEXT_IA32_CONTROL (CONTEXT_IA64 | __MSABI_LONG(0x00000020))
#define CONTEXT_FLOATING_POINT (CONTEXT_LOWER_FLOATING_POINT | CONTEXT_HIGHER_FLOATING_POINT)
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER | CONTEXT_IA32_CONTROL)
#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER | CONTEXT_DEBUG | CONTEXT_IA32_CONTROL)
#define CONTEXT_EXCEPTION_ACTIVE 0x8000000
#define CONTEXT_SERVICE_ACTIVE 0x10000000
#define CONTEXT_EXCEPTION_REQUEST 0x40000000
#define CONTEXT_EXCEPTION_REPORTING 0x80000000
#endif /* !defined(RC_INVOKED) */
typedef struct _CONTEXT {
DWORD ContextFlags;
DWORD Fill1[3];
ULONGLONG DbI0;
ULONGLONG DbI1;
ULONGLONG DbI2;
ULONGLONG DbI3;
ULONGLONG DbI4;
ULONGLONG DbI5;
ULONGLONG DbI6;
ULONGLONG DbI7;
ULONGLONG DbD0;
ULONGLONG DbD1;
ULONGLONG DbD2;
ULONGLONG DbD3;
ULONGLONG DbD4;
ULONGLONG DbD5;
ULONGLONG DbD6;
ULONGLONG DbD7;
FLOAT128 FltS0;
FLOAT128 FltS1;
FLOAT128 FltS2;
FLOAT128 FltS3;
FLOAT128 FltT0;
FLOAT128 FltT1;
FLOAT128 FltT2;
FLOAT128 FltT3;
FLOAT128 FltT4;
FLOAT128 FltT5;
FLOAT128 FltT6;
FLOAT128 FltT7;
FLOAT128 FltT8;
FLOAT128 FltT9;
FLOAT128 FltS4;
FLOAT128 FltS5;
FLOAT128 FltS6;
FLOAT128 FltS7;
FLOAT128 FltS8;
FLOAT128 FltS9;
FLOAT128 FltS10;
FLOAT128 FltS11;
FLOAT128 FltS12;
FLOAT128 FltS13;
FLOAT128 FltS14;
FLOAT128 FltS15;
FLOAT128 FltS16;
FLOAT128 FltS17;
FLOAT128 FltS18;
FLOAT128 FltS19;
FLOAT128 FltF32;
FLOAT128 FltF33;
FLOAT128 FltF34;
FLOAT128 FltF35;
FLOAT128 FltF36;
FLOAT128 FltF37;
FLOAT128 FltF38;
FLOAT128 FltF39;
FLOAT128 FltF40;
FLOAT128 FltF41;
FLOAT128 FltF42;
FLOAT128 FltF43;
FLOAT128 FltF44;
FLOAT128 FltF45;
FLOAT128 FltF46;
FLOAT128 FltF47;
FLOAT128 FltF48;
FLOAT128 FltF49;
FLOAT128 FltF50;
FLOAT128 FltF51;
FLOAT128 FltF52;
FLOAT128 FltF53;
FLOAT128 FltF54;
FLOAT128 FltF55;
FLOAT128 FltF56;
FLOAT128 FltF57;
FLOAT128 FltF58;
FLOAT128 FltF59;
FLOAT128 FltF60;
FLOAT128 FltF61;
FLOAT128 FltF62;
FLOAT128 FltF63;
FLOAT128 FltF64;
FLOAT128 FltF65;
FLOAT128 FltF66;
FLOAT128 FltF67;
FLOAT128 FltF68;
FLOAT128 FltF69;
FLOAT128 FltF70;
FLOAT128 FltF71;
FLOAT128 FltF72;
FLOAT128 FltF73;
FLOAT128 FltF74;
FLOAT128 FltF75;
FLOAT128 FltF76;
FLOAT128 FltF77;
FLOAT128 FltF78;
FLOAT128 FltF79;
FLOAT128 FltF80;
FLOAT128 FltF81;
FLOAT128 FltF82;
FLOAT128 FltF83;
FLOAT128 FltF84;
FLOAT128 FltF85;
FLOAT128 FltF86;
FLOAT128 FltF87;
FLOAT128 FltF88;
FLOAT128 FltF89;
FLOAT128 FltF90;
FLOAT128 FltF91;
FLOAT128 FltF92;
FLOAT128 FltF93;
FLOAT128 FltF94;
FLOAT128 FltF95;
FLOAT128 FltF96;
FLOAT128 FltF97;
FLOAT128 FltF98;
FLOAT128 FltF99;
FLOAT128 FltF100;
FLOAT128 FltF101;
FLOAT128 FltF102;
FLOAT128 FltF103;
FLOAT128 FltF104;
FLOAT128 FltF105;
FLOAT128 FltF106;
FLOAT128 FltF107;
FLOAT128 FltF108;
FLOAT128 FltF109;
FLOAT128 FltF110;
FLOAT128 FltF111;
FLOAT128 FltF112;
FLOAT128 FltF113;
FLOAT128 FltF114;
FLOAT128 FltF115;
FLOAT128 FltF116;
FLOAT128 FltF117;
FLOAT128 FltF118;
FLOAT128 FltF119;
FLOAT128 FltF120;
FLOAT128 FltF121;
FLOAT128 FltF122;
FLOAT128 FltF123;
FLOAT128 FltF124;
FLOAT128 FltF125;
FLOAT128 FltF126;
FLOAT128 FltF127;
ULONGLONG StFPSR;
ULONGLONG IntGp;
ULONGLONG IntT0;
ULONGLONG IntT1;
ULONGLONG IntS0;
ULONGLONG IntS1;
ULONGLONG IntS2;
ULONGLONG IntS3;
ULONGLONG IntV0;
ULONGLONG IntT2;
ULONGLONG IntT3;
ULONGLONG IntT4;
ULONGLONG IntSp;
ULONGLONG IntTeb;
ULONGLONG IntT5;
ULONGLONG IntT6;
ULONGLONG IntT7;
ULONGLONG IntT8;
ULONGLONG IntT9;
ULONGLONG IntT10;
ULONGLONG IntT11;
ULONGLONG IntT12;
ULONGLONG IntT13;
ULONGLONG IntT14;
ULONGLONG IntT15;
ULONGLONG IntT16;
ULONGLONG IntT17;
ULONGLONG IntT18;
ULONGLONG IntT19;
ULONGLONG IntT20;
ULONGLONG IntT21;
ULONGLONG IntT22;
ULONGLONG IntNats;
ULONGLONG Preds;
ULONGLONG BrRp;
ULONGLONG BrS0;
ULONGLONG BrS1;
ULONGLONG BrS2;
ULONGLONG BrS3;
ULONGLONG BrS4;
ULONGLONG BrT0;
ULONGLONG BrT1;
ULONGLONG ApUNAT;
ULONGLONG ApLC;
ULONGLONG ApEC;
ULONGLONG ApCCV;
ULONGLONG ApDCR;
ULONGLONG RsPFS;
ULONGLONG RsBSP;
ULONGLONG RsBSPSTORE;
ULONGLONG RsRSC;
ULONGLONG RsRNAT;
ULONGLONG StIPSR;
ULONGLONG StIIP;
ULONGLONG StIFS;
ULONGLONG StFCR;
ULONGLONG Eflag;
ULONGLONG SegCSD;
ULONGLONG SegSSD;
ULONGLONG Cflag;
ULONGLONG StFSR;
ULONGLONG StFIR;
ULONGLONG StFDR;
ULONGLONG UNUSEDPACK;
} CONTEXT,*PCONTEXT;
typedef struct _PLABEL_DESCRIPTOR {
ULONGLONG EntryPoint;
ULONGLONG GlobalPointer;
} PLABEL_DESCRIPTOR,*PPLABEL_DESCRIPTOR;
typedef struct _RUNTIME_FUNCTION {
DWORD BeginAddress;
DWORD EndAddress;
DWORD UnwindInfoAddress;
} RUNTIME_FUNCTION,*PRUNTIME_FUNCTION;
typedef PRUNTIME_FUNCTION (*PGET_RUNTIME_FUNCTION_CALLBACK)(DWORD64 ControlPc,PVOID Context);
typedef DWORD (*POUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK)(HANDLE Process,PVOID TableAddress,PDWORD Entries,PRUNTIME_FUNCTION *Functions);
#define OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK_EXPORT_NAME "OutOfProcessFunctionTableCallback"
VOID __jump_unwind(ULONGLONG TargetMsFrame,ULONGLONG TargetBsFrame,ULONGLONG TargetPc);
#endif /* end of _IA64_ */
/* http://www.nynaeve.net/?p=99 */
#define EXCEPTION_NONCONTINUABLE 0x1
#define EXCEPTION_UNWINDING 0x2
#define EXCEPTION_EXIT_UNWIND 0x4
#define EXCEPTION_STACK_INVALID 0x8
#define EXCEPTION_NESTED_CALL 0x10
#define EXCEPTION_TARGET_UNWIND 0x20
#define EXCEPTION_COLLIDED_UNWIND 0x40
#define EXCEPTION_UNWIND 0x66
#define IS_UNWINDING(f) ((f & EXCEPTION_UNWIND) != 0)
#define IS_DISPATCHING(f) ((f & EXCEPTION_UNWIND) == 0)
#define IS_TARGET_UNWIND(f) ((f & EXCEPTION_TARGET_UNWIND) != 0)
#define EXCEPTION_MAXIMUM_PARAMETERS 15
typedef struct _EXCEPTION_RECORD {
DWORD ExceptionCode;
DWORD ExceptionFlags;
struct _EXCEPTION_RECORD *ExceptionRecord;
PVOID ExceptionAddress;
DWORD NumberParameters;
ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
} EXCEPTION_RECORD;
typedef EXCEPTION_RECORD *PEXCEPTION_RECORD;
typedef struct _EXCEPTION_RECORD32 {
DWORD ExceptionCode;
DWORD ExceptionFlags;
DWORD ExceptionRecord;
DWORD ExceptionAddress;
DWORD NumberParameters;
DWORD ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
} EXCEPTION_RECORD32,*PEXCEPTION_RECORD32;
typedef struct _EXCEPTION_RECORD64 {
DWORD ExceptionCode;
DWORD ExceptionFlags;
DWORD64 ExceptionRecord;
DWORD64 ExceptionAddress;
DWORD NumberParameters;
DWORD __unusedAlignment;
DWORD64 ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
} EXCEPTION_RECORD64,*PEXCEPTION_RECORD64;
typedef struct _EXCEPTION_POINTERS {
PEXCEPTION_RECORD ExceptionRecord;
PCONTEXT ContextRecord;
} EXCEPTION_POINTERS,*PEXCEPTION_POINTERS;
#ifdef __ia64__
NTSYSAPI VOID NTAPI RtlUnwind2 (FRAME_POINTERS TargetFrame, PVOID TargetIp, PEXCEPTION_RECORD ExceptionRecord, PVOID ReturnValue, PCONTEXT ContextRecord);
#endif
#ifdef __x86_64__
/* http://msdn.microsoft.com/en-us/library/ms680597(VS.85).aspx */
#define UNWIND_HISTORY_TABLE_SIZE 12
typedef struct _UNWIND_HISTORY_TABLE_ENTRY {
ULONG64 ImageBase;
PRUNTIME_FUNCTION FunctionEntry;
} UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY;
#define UNWIND_HISTORY_TABLE_NONE 0
#define UNWIND_HISTORY_TABLE_GLOBAL 1
#define UNWIND_HISTORY_TABLE_LOCAL 2
typedef struct _UNWIND_HISTORY_TABLE {
ULONG Count;
BYTE LocalHint;
BYTE GlobalHint;
BYTE Search;
BYTE Once;
ULONG64 LowAddress;
ULONG64 HighAddress;
UNWIND_HISTORY_TABLE_ENTRY Entry[UNWIND_HISTORY_TABLE_SIZE];
} UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE;
/* http://msdn.microsoft.com/en-us/library/b6sf5kbd(VS.80).aspx */
struct _DISPATCHER_CONTEXT;
typedef struct _DISPATCHER_CONTEXT DISPATCHER_CONTEXT;
typedef struct _DISPATCHER_CONTEXT *PDISPATCHER_CONTEXT;
struct _DISPATCHER_CONTEXT {
ULONG64 ControlPc;
ULONG64 ImageBase;
PRUNTIME_FUNCTION FunctionEntry;
ULONG64 EstablisherFrame;
ULONG64 TargetIp;
PCONTEXT ContextRecord;
PEXCEPTION_ROUTINE LanguageHandler;
PVOID HandlerData;
/* http://www.nynaeve.net/?p=99 */
PUNWIND_HISTORY_TABLE HistoryTable;
ULONG ScopeIndex;
ULONG Fill0;
};
/* http://msdn.microsoft.com/en-us/library/ms680617(VS.85).aspx */
typedef struct _KNONVOLATILE_CONTEXT_POINTERS
{
PM128A FloatingContext[16];
PULONG64 IntegerContext[16];
} KNONVOLATILE_CONTEXT_POINTERS, *PKNONVOLATILE_CONTEXT_POINTERS;
#endif /* defined(__x86_64__) */
typedef PVOID PACCESS_TOKEN;
typedef PVOID PSECURITY_DESCRIPTOR;
typedef PVOID PSID;
typedef PVOID PCLAIMS_BLOB;
typedef DWORD ACCESS_MASK;
typedef ACCESS_MASK *PACCESS_MASK;
#define DELETE (__MSABI_LONG(0x00010000))
#define READ_CONTROL (__MSABI_LONG(0x00020000))
#define WRITE_DAC (__MSABI_LONG(0x00040000))
#define WRITE_OWNER (__MSABI_LONG(0x00080000))
#define SYNCHRONIZE (__MSABI_LONG(0x00100000))
#define STANDARD_RIGHTS_REQUIRED (__MSABI_LONG(0x000F0000))
#define STANDARD_RIGHTS_READ (READ_CONTROL)
#define STANDARD_RIGHTS_WRITE (READ_CONTROL)
#define STANDARD_RIGHTS_EXECUTE (READ_CONTROL)
#define STANDARD_RIGHTS_ALL (__MSABI_LONG(0x001F0000))
#define SPECIFIC_RIGHTS_ALL (__MSABI_LONG(0x0000FFFF))
#define ACCESS_SYSTEM_SECURITY (__MSABI_LONG(0x01000000))
#define MAXIMUM_ALLOWED (__MSABI_LONG(0x02000000))
#define GENERIC_READ (__MSABI_LONG(0x80000000))
#define GENERIC_WRITE (__MSABI_LONG(0x40000000))
#define GENERIC_EXECUTE (__MSABI_LONG(0x20000000))
#define GENERIC_ALL (__MSABI_LONG(0x10000000))
typedef struct _GENERIC_MAPPING {
ACCESS_MASK GenericRead;
ACCESS_MASK GenericWrite;
ACCESS_MASK GenericExecute;
ACCESS_MASK GenericAll;
} GENERIC_MAPPING;
typedef GENERIC_MAPPING *PGENERIC_MAPPING;
#include <pshpack4.h>
typedef struct _LUID_AND_ATTRIBUTES {
LUID Luid;
DWORD Attributes;
} LUID_AND_ATTRIBUTES,*PLUID_AND_ATTRIBUTES;
typedef LUID_AND_ATTRIBUTES LUID_AND_ATTRIBUTES_ARRAY[ANYSIZE_ARRAY];
typedef LUID_AND_ATTRIBUTES_ARRAY *PLUID_AND_ATTRIBUTES_ARRAY;
#include <poppack.h>
#ifndef SID_IDENTIFIER_AUTHORITY_DEFINED
#define SID_IDENTIFIER_AUTHORITY_DEFINED
typedef struct _SID_IDENTIFIER_AUTHORITY {
BYTE Value[6];
} SID_IDENTIFIER_AUTHORITY,*PSID_IDENTIFIER_AUTHORITY;
#endif /* SID_IDENTIFIER_AUTHORITY_DEFINED */
#ifndef SID_DEFINED
#define SID_DEFINED
typedef struct _SID {
BYTE Revision;
BYTE SubAuthorityCount;
SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
DWORD SubAuthority[ANYSIZE_ARRAY];
} SID,*PISID;
#endif /* SID_DEFINED */
#define SID_REVISION (1)
#define SID_MAX_SUB_AUTHORITIES (15)
#define SID_RECOMMENDED_SUB_AUTHORITIES (1)
#ifndef __WIDL__
#define SECURITY_MAX_SID_SIZE (sizeof (SID) - sizeof (DWORD) + (