Added more wtypes definitions, particularly for GDI/USER handles.
[wine] / include / winnt.h
index 2a26fea..9858433 100644 (file)
@@ -18,8 +18,8 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#ifndef __WINE_WINNT_H
-#define __WINE_WINNT_H
+#ifndef _WINNT_
+#define _WINNT_
 
 #include <basetsd.h>
 
 
 #define NTAPI __stdcall
 
-/* Macro for structure packing and more. */
-
-#ifdef __GNUC__
-#define WINE_UNUSED   __attribute__((unused))
-#else
-#define WINE_UNUSED    /* nothing */
-#endif
-
 #if (defined(_M_IX86) || defined(_M_IA64) || defined(_M_AMD64) || defined(__MINGW32__)) && !defined(MIDL_PASS)
 # if defined(_MSC_VER)
 #  define DECLSPEC_IMPORT __declspec(dllimport)
 #define VOID void
 #endif
 typedef VOID           *PVOID;
+typedef VOID           *PVOID64;
 typedef BYTE            BOOLEAN,    *PBOOLEAN;
 typedef char            CHAR,       *PCHAR;
 typedef short           SHORT,      *PSHORT;
@@ -318,14 +311,23 @@ typedef unsigned short  WCHAR,      *PWCHAR;
 
 /* 'Extended/Wide' numerical types */
 #ifndef _ULONGLONG_
-#define _ULONGLONG_
+# define _ULONGLONG_
+# ifdef _MSC_VER
+typedef signed __int64   LONGLONG,  *PLONGLONG;
+typedef unsigned __int64 ULONGLONG, *PULONGLONG;
+# else
 typedef signed __int64   DECLSPEC_ALIGN(8) LONGLONG,   *PLONGLONG;
 typedef unsigned __int64 DECLSPEC_ALIGN(8) ULONGLONG,  *PULONGLONG;
+# endif
 #endif
 
 #ifndef _DWORDLONG_
-#define _DWORDLONG_
-typedef ULONGLONG DECLSPEC_ALIGN(8) DWORDLONG,  *PDWORDLONG;
+# define _DWORDLONG_
+# ifdef _MSC_VER
+typedef ULONGLONG DWORDLONG, *PDWORDLONG;
+# else
+typedef ULONGLONG   DECLSPEC_ALIGN(8) DWORDLONG,   *PDWORDLONG;
+# endif
 #endif
 
 /* ANSI string types */
@@ -384,6 +386,10 @@ typedef HANDLE *PHANDLE, *LPHANDLE;
 #define DECLARE_HANDLE(a) typedef HANDLE a
 #endif /*STRICT*/
 
+typedef BYTE  FCHAR;
+typedef WORD  FSHORT;
+typedef DWORD FLONG;
+
 /* Defines */
 
 #ifndef WIN32_NO_STATUS
@@ -450,6 +456,10 @@ typedef HANDLE *PHANDLE, *LPHANDLE;
 #define PROCESSOR_ARCHITECTURE_PPC     3
 #define PROCESSOR_ARCHITECTURE_SHX     4
 #define PROCESSOR_ARCHITECTURE_ARM     5
+#define PROCESSOR_ARCHITECTURE_IA64     6
+#define PROCESSOR_ARCHITECTURE_ALPHA64  7
+#define PROCESSOR_ARCHITECTURE_MSIL     8
+#define PROCESSOR_ARCHITECTURE_AMD64    9
 #define PROCESSOR_ARCHITECTURE_UNKNOWN 0xFFFF
 
 /* dwProcessorType */
@@ -457,6 +467,8 @@ typedef HANDLE *PHANDLE, *LPHANDLE;
 #define PROCESSOR_INTEL_486      486
 #define PROCESSOR_INTEL_PENTIUM  586
 #define PROCESSOR_INTEL_860      860
+#define PROCESSOR_INTEL_IA64     2200
+#define PROCESSOR_AMD_X8664      8664
 #define PROCESSOR_MIPS_R2000     2000
 #define PROCESSOR_MIPS_R3000     3000
 #define PROCESSOR_MIPS_R4000     4000
@@ -483,7 +495,7 @@ typedef struct _MEMORY_BASIC_INFORMATION
     LPVOID   BaseAddress;
     LPVOID   AllocationBase;
     DWORD    AllocationProtect;
-    DWORD    RegionSize;
+    SIZE_T   RegionSize;
     DWORD    State;
     DWORD    Protect;
     DWORD    Type;
@@ -509,6 +521,7 @@ typedef struct _MEMORY_BASIC_INFORMATION
 #define MEM_MAPPED              0x00040000
 #define MEM_RESET               0x00080000
 #define MEM_TOP_DOWN            0x00100000
+#define MEM_PHYSICAL            0x00400000
 #ifdef __WINESRC__
 #define MEM_SYSTEM              0x80000000
 #endif
@@ -577,6 +590,7 @@ typedef struct _SINGLE_LIST_ENTRY {
 #define PF_RDTSC_INSTRUCTION_AVAILABLE         8
 #define PF_PAE_ENABLED                         9
 #define PF_XMMI64_INSTRUCTIONS_AVAILABLE       10
+#define PF_NX_ENABLED                          12
 
 
 /* Execution state flags */
@@ -678,8 +692,159 @@ typedef CONTEXT86 CONTEXT;
 
 #endif  /* __i386__ */
 
+typedef struct _LDT_ENTRY {
+    WORD       LimitLow;
+    WORD       BaseLow;
+    union {
+        struct {
+            BYTE    BaseMid;
+            BYTE    Flags1;
+            BYTE    Flags2;
+            BYTE    BaseHi;
+        } Bytes;
+        struct {
+            unsigned    BaseMid: 8;
+            unsigned    Type : 5;
+            unsigned    Dpl : 2;
+            unsigned    Pres : 1;
+            unsigned    LimitHi : 4;
+            unsigned    Sys : 1;
+            unsigned    Reserved_0 : 1;
+            unsigned    Default_Big : 1;
+            unsigned    Granularity : 1;
+            unsigned    BaseHi : 8;
+        } Bits;
+    } HighWord;
+} LDT_ENTRY, *PLDT_ENTRY;
+
+/* x86-64 context definitions */
+#if defined(__x86_64__)
+
+#define CONTEXT_AMD64   0x00100000
+
+#define CONTEXT_CONTROL   (CONTEXT_AMD64 | 0x0001)
+#define CONTEXT_INTEGER   (CONTEXT_AMD64 | 0x0002)
+#define CONTEXT_SEGMENTS  (CONTEXT_AMD64 | 0x0004)
+#define CONTEXT_FLOATING_POINT  (CONTEXT_AMD64 | 0x0008L)
+#define CONTEXT_DEBUG_REGISTERS (CONTEXT_AMD64 | 0x0010L)
+#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)
+
+typedef struct DECLSPEC_ALIGN(16) _M128A {
+    ULONGLONG Low;
+    LONGLONG High;
+} M128A, *PM128A;
+
+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;
+
+typedef struct DECLSPEC_ALIGN(16) _CONTEXT {
+    DWORD64 P1Home;
+    DWORD64 P2Home;
+    DWORD64 P3Home;
+    DWORD64 P4Home;
+    DWORD64 P5Home;
+    DWORD64 P6Home;
+
+    /* Control flags */
+    DWORD ContextFlags;
+    DWORD MxCsr;
+
+    /* Segment */
+    WORD SegCs;
+    WORD SegDs;
+    WORD SegEs;
+    WORD SegFs;
+    WORD SegGs;
+    WORD SegSs;
+    DWORD EFlags;
+
+    /* Debug */
+    DWORD64 Dr0;
+    DWORD64 Dr1;
+    DWORD64 Dr2;
+    DWORD64 Dr3;
+    DWORD64 Dr6;
+    DWORD64 Dr7;
+
+    /* Integer */
+    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;
+
+    /* Counter */
+    DWORD64 Rip;
+
+    /* Floating point */
+    union {
+        XMM_SAVE_AREA32 FltSave;
+        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;
+        } DUMMYSTRUCTNAME;
+    } DUMMYUNIONNAME;
+
+    /* Vector */
+    M128A VectorRegister[26];
+    DWORD64 VectorControl;
+
+    /* Debug control */
+    DWORD64 DebugControl;
+    DWORD64 LastBranchToRip;
+    DWORD64 LastBranchFromRip;
+    DWORD64 LastExceptionToRip;
+    DWORD64 LastExceptionFromRip;
+} CONTEXT;
+
+#endif /* __x86_64__ */
+
 /* Alpha context definitions */
-#ifdef _ALPHA_
+#if defined(_ALPHA_) || defined(__ALPHA__) || defined(__alpha__)
 
 #define CONTEXT_ALPHA   0x00020000
 
@@ -774,6 +939,60 @@ typedef struct _CONTEXT
 
 #endif  /* _ALPHA_ */
 
+#ifdef __arm__
+
+/* The following flags control the contents of the CONTEXT structure. */
+
+#define CONTEXT_ARM    0x0000040
+#define CONTEXT_CONTROL         (CONTEXT_ARM | 0x00000001L)
+#define CONTEXT_INTEGER         (CONTEXT_ARM | 0x00000002L)
+
+#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER)
+
+typedef struct _CONTEXT {
+       /* The flags values within this flag control the contents of
+          a CONTEXT record.
+
+          If the context record is used as an input parameter, then
+          for each portion of the context record controlled by a flag
+          whose value is set, it is assumed that that portion of the
+          context record contains valid context. If the context record
+          is being used to modify a thread's context, then only that
+          portion of the threads context will be modified.
+
+          If the context record is used as an IN OUT parameter to capture
+          the context of a thread, then only those portions of the thread's
+          context corresponding to set flags will be returned.
+
+          The context record is never used as an OUT only parameter. */
+
+       ULONG ContextFlags;
+
+       /* This section is specified/returned if the ContextFlags word contains
+          the flag CONTEXT_INTEGER. */
+       ULONG R0;
+       ULONG R1;
+       ULONG R2;
+       ULONG R3;
+       ULONG R4;
+       ULONG R5;
+       ULONG R6;
+       ULONG R7;
+       ULONG R8;
+       ULONG R9;
+       ULONG R10;
+       ULONG R11;
+       ULONG R12;
+
+       ULONG Sp;
+       ULONG Lr;
+       ULONG Pc;
+       ULONG Psr;
+} CONTEXT;
+
+#endif /* __arm__ */
+
+
 /* Mips context definitions */
 #ifdef _MIPS_
 
@@ -998,96 +1217,6 @@ typedef struct _STACK_FRAME_HEADER
 
 #endif  /* __powerpc__ */
 
-#ifdef __ALPHA__
-
-/*
- * FIXME:
- *
- * I have no idea if any of this is right as I just ripped 
- * it from mingw-win32api.
- *
- */
-
-#define CONTEXT_ALPHA 0x20000
-#define CONTEXT_CONTROL (CONTEXT_ALPHA|1L)
-#define CONTEXT_FLOATING_POINT (CONTEXT_ALPHA|2L)
-#define CONTEXT_INTEGER (CONTEXT_ALPHA|4L)
-#define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_FLOATING_POINT|CONTEXT_INTEGER)
-typedef struct _CONTEXT {
-       ULONGLONG FltF0;
-       ULONGLONG FltF1;
-       ULONGLONG FltF2;
-       ULONGLONG FltF3;
-       ULONGLONG FltF4;
-       ULONGLONG FltF5;
-       ULONGLONG FltF6;
-       ULONGLONG FltF7;
-       ULONGLONG FltF8;
-       ULONGLONG FltF9;
-       ULONGLONG FltF10;
-       ULONGLONG FltF11;
-       ULONGLONG FltF12;
-       ULONGLONG FltF13;
-       ULONGLONG FltF14;
-       ULONGLONG FltF15;
-       ULONGLONG FltF16;
-       ULONGLONG FltF17;
-       ULONGLONG FltF18;
-       ULONGLONG FltF19;
-       ULONGLONG FltF20;
-       ULONGLONG FltF21;
-       ULONGLONG FltF22;
-       ULONGLONG FltF23;
-       ULONGLONG FltF24;
-       ULONGLONG FltF25;
-       ULONGLONG FltF26;
-       ULONGLONG FltF27;
-       ULONGLONG FltF28;
-       ULONGLONG FltF29;
-       ULONGLONG FltF30;
-       ULONGLONG FltF31;
-       ULONGLONG IntV0;
-       ULONGLONG IntT0;
-       ULONGLONG IntT1;
-       ULONGLONG IntT2;
-       ULONGLONG IntT3;
-       ULONGLONG IntT4;
-       ULONGLONG IntT5;
-       ULONGLONG IntT6;
-       ULONGLONG IntT7;
-       ULONGLONG IntS0;
-       ULONGLONG IntS1;
-       ULONGLONG IntS2;
-       ULONGLONG IntS3;
-       ULONGLONG IntS4;
-       ULONGLONG IntS5;
-       ULONGLONG IntFp;
-       ULONGLONG IntA0;
-       ULONGLONG IntA1;
-       ULONGLONG IntA2;
-       ULONGLONG IntA3;
-       ULONGLONG IntA4;
-       ULONGLONG IntA5;
-       ULONGLONG IntT8;
-       ULONGLONG IntT9;
-       ULONGLONG IntT10;
-       ULONGLONG IntT11;
-       ULONGLONG IntRa;
-       ULONGLONG IntT12;
-       ULONGLONG IntAt;
-       ULONGLONG IntGp;
-       ULONGLONG IntSp;
-       ULONGLONG IntZero;
-       ULONGLONG Fpcr;
-       ULONGLONG SoftFpcr;
-       ULONGLONG Fir;
-       DWORD Psr;
-       DWORD ContextFlags;
-       DWORD Fill[4];
-} CONTEXT;
-
-#endif  /* __ALPHA__ */
-
 #ifdef __sparc__
 
 /*
@@ -1467,15 +1596,15 @@ typedef CONTEXT *PCONTEXT;
 
 #define EXCEPTION_MAXIMUM_PARAMETERS 15
 
-typedef struct __EXCEPTION_RECORD
+typedef struct _EXCEPTION_RECORD
 {
     DWORD    ExceptionCode;
     DWORD    ExceptionFlags;
-    struct __EXCEPTION_RECORD *ExceptionRecord;
+    struct  _EXCEPTION_RECORD *ExceptionRecord;
 
-    LPVOID   ExceptionAddress;
+    PVOID    ExceptionAddress;
     DWORD    NumberParameters;
-    DWORD    ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
+    ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
 } EXCEPTION_RECORD, *PEXCEPTION_RECORD;
 
 /*
@@ -1508,7 +1637,7 @@ typedef struct _EXCEPTION_REGISTRATION_RECORD
 } EXCEPTION_REGISTRATION_RECORD;
 
 /*
- * function pointer to a exception filter
+ * function pointer to an exception filter
  */
 
 typedef LONG (CALLBACK *PVECTORED_EXCEPTION_HANDLER)(PEXCEPTION_POINTERS ExceptionInfo);
@@ -1562,6 +1691,8 @@ extern struct _TEB * WINAPI NtCurrentTeb(void);
 #endif
 #define GetFiberData()     (*(void **)GetCurrentFiber())
 
+#define TLS_MINIMUM_AVAILABLE 64
+
 /*
  * File formats definitions
  */
@@ -1748,7 +1879,8 @@ typedef struct _IMAGE_VXD_HEADER {
 #define        IMAGE_SIZEOF_FILE_HEADER                20
 #define IMAGE_SIZEOF_ROM_OPTIONAL_HEADER       56
 #define IMAGE_SIZEOF_STD_OPTIONAL_HEADER       28
-#define IMAGE_SIZEOF_NT_OPTIONAL_HEADER        224
+#define IMAGE_SIZEOF_NT_OPTIONAL32_HEADER      224
+#define IMAGE_SIZEOF_NT_OPTIONAL64_HEADER      240
 #define IMAGE_SIZEOF_SHORT_NAME                8
 #define IMAGE_SIZEOF_SECTION_HEADER            40
 #define IMAGE_SIZEOF_SYMBOL                    18
@@ -1759,9 +1891,18 @@ typedef struct _IMAGE_VXD_HEADER {
 #define IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR        60
 
 /* Possible Magic values */
-#define IMAGE_NT_OPTIONAL_HDR_MAGIC        0x10b
+#define IMAGE_NT_OPTIONAL_HDR32_MAGIC      0x10b
+#define IMAGE_NT_OPTIONAL_HDR64_MAGIC      0x20b
 #define IMAGE_ROM_OPTIONAL_HDR_MAGIC       0x107
 
+#ifdef _WIN64
+#define IMAGE_SIZEOF_NT_OPTIONAL_HEADER IMAGE_SIZEOF_NT_OPTIONAL64_HEADER
+#define IMAGE_NT_OPTIONAL_HDR_MAGIC     IMAGE_NT_OPTIONAL_HDR64_MAGIC
+#else
+#define IMAGE_SIZEOF_NT_OPTIONAL_HEADER IMAGE_SIZEOF_NT_OPTIONAL32_HEADER
+#define IMAGE_NT_OPTIONAL_HDR_MAGIC     IMAGE_NT_OPTIONAL_HDR32_MAGIC
+#endif
+
 /* These are indexes into the DataDirectory array */
 #define IMAGE_FILE_EXPORT_DIRECTORY            0
 #define IMAGE_FILE_IMPORT_DIRECTORY            1
@@ -1809,6 +1950,13 @@ typedef struct _IMAGE_VXD_HEADER {
 #define        IMAGE_SUBSYSTEM_EFI_ROM                 13
 #define        IMAGE_SUBSYSTEM_XBOX                    14
 
+/* DLL Characteristics */
+#define IMAGE_DLLCHARACTERISTICS_NO_ISOLATION          0x0200
+#define IMAGE_DLLCHARACTERISTICS_NO_SEH                0x0400
+#define IMAGE_DLLCHARACTERISTICS_NO_BIND               0x0800
+#define IMAGE_DLLCHARACTERISTICS_WDM_DRIVER            0x2000
+#define IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE 0x8000
+
 typedef struct _IMAGE_FILE_HEADER {
   WORD  Machine;
   WORD  NumberOfSections;
@@ -1826,6 +1974,45 @@ typedef struct _IMAGE_DATA_DIRECTORY {
 
 #define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
 
+typedef struct _IMAGE_OPTIONAL_HEADER64 {
+  WORD  Magic; /* 0x20b */
+  BYTE MajorLinkerVersion;
+  BYTE MinorLinkerVersion;
+  DWORD SizeOfCode;
+  DWORD SizeOfInitializedData;
+  DWORD SizeOfUninitializedData;
+  DWORD AddressOfEntryPoint;
+  DWORD BaseOfCode;
+  ULONGLONG ImageBase;
+  DWORD SectionAlignment;
+  DWORD FileAlignment;
+  WORD MajorOperatingSystemVersion;
+  WORD MinorOperatingSystemVersion;
+  WORD MajorImageVersion;
+  WORD MinorImageVersion;
+  WORD MajorSubsystemVersion;
+  WORD MinorSubsystemVersion;
+  DWORD Win32VersionValue;
+  DWORD SizeOfImage;
+  DWORD SizeOfHeaders;
+  DWORD CheckSum;
+  WORD Subsystem;
+  WORD DllCharacteristics;
+  ULONGLONG SizeOfStackReserve;
+  ULONGLONG SizeOfStackCommit;
+  ULONGLONG SizeOfHeapReserve;
+  ULONGLONG SizeOfHeapCommit;
+  DWORD LoaderFlags;
+  DWORD NumberOfRvaAndSizes;
+  IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
+} IMAGE_OPTIONAL_HEADER64, *PIMAGE_OPTIONAL_HEADER64;
+
+typedef struct _IMAGE_NT_HEADERS64 {
+  DWORD Signature;
+  IMAGE_FILE_HEADER FileHeader;
+  IMAGE_OPTIONAL_HEADER64 OptionalHeader;
+} IMAGE_NT_HEADERS64, *PIMAGE_NT_HEADERS64;
+
 typedef struct _IMAGE_OPTIONAL_HEADER {
 
   /* Standard fields */
@@ -1865,13 +2052,25 @@ typedef struct _IMAGE_OPTIONAL_HEADER {
   DWORD NumberOfRvaAndSizes;
   IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; /* 0x60 */
   /* 0xE0 */
-} IMAGE_OPTIONAL_HEADER, *PIMAGE_OPTIONAL_HEADER;
+} IMAGE_OPTIONAL_HEADER32, *PIMAGE_OPTIONAL_HEADER32;
 
 typedef struct _IMAGE_NT_HEADERS {
   DWORD Signature; /* "PE"\0\0 */      /* 0x00 */
   IMAGE_FILE_HEADER FileHeader;                /* 0x04 */
-  IMAGE_OPTIONAL_HEADER OptionalHeader;        /* 0x18 */
-} IMAGE_NT_HEADERS, *PIMAGE_NT_HEADERS;
+  IMAGE_OPTIONAL_HEADER32 OptionalHeader;      /* 0x18 */
+} IMAGE_NT_HEADERS32, *PIMAGE_NT_HEADERS32;
+
+#ifdef _WIN64
+typedef IMAGE_NT_HEADERS64  IMAGE_NT_HEADERS;
+typedef PIMAGE_NT_HEADERS64 PIMAGE_NT_HEADERS;
+typedef IMAGE_OPTIONAL_HEADER64 IMAGE_OPTIONAL_HEADER;
+typedef PIMAGE_OPTIONAL_HEADER64 PIMAGE_OPTIONAL_HEADER;
+#else
+typedef IMAGE_NT_HEADERS32  IMAGE_NT_HEADERS;
+typedef PIMAGE_NT_HEADERS32 PIMAGE_NT_HEADERS;
+typedef IMAGE_OPTIONAL_HEADER32 IMAGE_OPTIONAL_HEADER;
+typedef PIMAGE_OPTIONAL_HEADER32 PIMAGE_OPTIONAL_HEADER;
+#endif
 
 #define IMAGE_SIZEOF_SHORT_NAME 8
 
@@ -2147,22 +2346,31 @@ typedef struct _IMAGE_IMPORT_BY_NAME {
 } IMAGE_IMPORT_BY_NAME,*PIMAGE_IMPORT_BY_NAME;
 
 /* Import thunk */
-typedef struct _IMAGE_THUNK_DATA {
+typedef struct _IMAGE_THUNK_DATA64 {
        union {
-               LPBYTE    ForwarderString;
-               PDWORD    Function;
-               DWORD     Ordinal;
-               PIMAGE_IMPORT_BY_NAME   AddressOfData;
+               ULONGLONG ForwarderString;
+               ULONGLONG Function;
+               ULONGLONG Ordinal;
+               ULONGLONG AddressOfData;
        } u1;
-} IMAGE_THUNK_DATA,*PIMAGE_THUNK_DATA;
+} IMAGE_THUNK_DATA64,*PIMAGE_THUNK_DATA64;
+
+typedef struct _IMAGE_THUNK_DATA32 {
+       union {
+               DWORD ForwarderString;
+               DWORD Function;
+               DWORD Ordinal;
+               DWORD AddressOfData;
+       } u1;
+} IMAGE_THUNK_DATA32,*PIMAGE_THUNK_DATA32;
 
 /* Import module directory */
 
 typedef struct _IMAGE_IMPORT_DESCRIPTOR {
        union {
                DWORD   Characteristics; /* 0 for terminating null import descriptor  */
-               PIMAGE_THUNK_DATA OriginalFirstThunk;   /* RVA to original unbound IAT */
-       } u;
+               DWORD   OriginalFirstThunk;     /* RVA to original unbound IAT */
+       } DUMMYUNIONNAME;
        DWORD   TimeDateStamp;  /* 0 if not bound,
                                 * -1 if bound, and real date\time stamp
                                 *    in IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT
@@ -2173,12 +2381,29 @@ typedef struct _IMAGE_IMPORT_DESCRIPTOR {
        DWORD   ForwarderChain; /* -1 if no forwarders */
        DWORD   Name;
        /* RVA to IAT (if bound this IAT has actual addresses) */
-       PIMAGE_THUNK_DATA FirstThunk;
+       DWORD   FirstThunk;
 } IMAGE_IMPORT_DESCRIPTOR,*PIMAGE_IMPORT_DESCRIPTOR;
 
-#define        IMAGE_ORDINAL_FLAG              0x80000000
-#define        IMAGE_SNAP_BY_ORDINAL(Ordinal)  ((Ordinal & IMAGE_ORDINAL_FLAG) != 0)
-#define        IMAGE_ORDINAL(Ordinal)          (Ordinal & 0xffff)
+#define IMAGE_ORDINAL_FLAG64             (((ULONGLONG)0x80000000 << 32) | 0x00000000)
+#define IMAGE_ORDINAL_FLAG32             0x80000000
+#define IMAGE_SNAP_BY_ORDINAL64(ordinal) (((ordinal) & IMAGE_ORDINAL_FLAG64) != 0)
+#define IMAGE_SNAP_BY_ORDINAL32(ordinal) (((ordinal) & IMAGE_ORDINAL_FLAG32) != 0)
+#define IMAGE_ORDINAL64(ordinal)         ((ordinal) & 0xffff)
+#define IMAGE_ORDINAL32(ordinal)         ((ordinal) & 0xffff)
+
+#ifdef _WIN64
+#define IMAGE_ORDINAL_FLAG              IMAGE_ORDINAL_FLAG64
+#define IMAGE_SNAP_BY_ORDINAL(Ordinal)  IMAGE_SNAP_BY_ORDINAL64(Ordinal)
+#define IMAGE_ORDINAL(Ordinal)          IMAGE_ORDINAL64(Ordinal)
+typedef IMAGE_THUNK_DATA64              IMAGE_THUNK_DATA;
+typedef PIMAGE_THUNK_DATA64             PIMAGE_THUNK_DATA;
+#else
+#define IMAGE_ORDINAL_FLAG              IMAGE_ORDINAL_FLAG32
+#define IMAGE_SNAP_BY_ORDINAL(Ordinal)  IMAGE_SNAP_BY_ORDINAL32(Ordinal)
+#define IMAGE_ORDINAL(Ordinal)          IMAGE_ORDINAL32(Ordinal)
+typedef IMAGE_THUNK_DATA32              IMAGE_THUNK_DATA;
+typedef PIMAGE_THUNK_DATA32             PIMAGE_THUNK_DATA;
+#endif
 
 typedef struct _IMAGE_BOUND_IMPORT_DESCRIPTOR
 {
@@ -2467,14 +2692,31 @@ typedef VOID (CALLBACK *PIMAGE_TLS_CALLBACK)(
        LPVOID DllHandle,DWORD Reason,LPVOID Reserved
 );
 
-typedef struct _IMAGE_TLS_DIRECTORY {
-       DWORD   StartAddressOfRawData;
-       DWORD   EndAddressOfRawData;
-       LPDWORD AddressOfIndex;
-       PIMAGE_TLS_CALLBACK *AddressOfCallBacks;
-       DWORD   SizeOfZeroFill;
-       DWORD   Characteristics;
-} IMAGE_TLS_DIRECTORY,*PIMAGE_TLS_DIRECTORY;
+typedef struct _IMAGE_TLS_DIRECTORY64 {
+    ULONGLONG   StartAddressOfRawData;
+    ULONGLONG   EndAddressOfRawData;
+    ULONGLONG   AddressOfIndex;
+    ULONGLONG   AddressOfCallBacks;
+    DWORD       SizeOfZeroFill;
+    DWORD       Characteristics;
+} IMAGE_TLS_DIRECTORY64, *PIMAGE_TLS_DIRECTORY64;
+
+typedef struct _IMAGE_TLS_DIRECTORY32 {
+    DWORD   StartAddressOfRawData;
+    DWORD   EndAddressOfRawData;
+    DWORD   AddressOfIndex;
+    DWORD   AddressOfCallBacks;
+    DWORD   SizeOfZeroFill;
+    DWORD   Characteristics;
+} IMAGE_TLS_DIRECTORY32, *PIMAGE_TLS_DIRECTORY32;
+
+#ifdef _WIN64
+typedef IMAGE_TLS_DIRECTORY64           IMAGE_TLS_DIRECTORY;
+typedef PIMAGE_TLS_DIRECTORY64          PIMAGE_TLS_DIRECTORY;
+#else
+typedef IMAGE_TLS_DIRECTORY32           IMAGE_TLS_DIRECTORY;
+typedef PIMAGE_TLS_DIRECTORY32          PIMAGE_TLS_DIRECTORY;
+#endif
 
 typedef struct _IMAGE_DEBUG_DIRECTORY {
   DWORD Characteristics;
@@ -2520,16 +2762,16 @@ typedef struct _FPO_DATA {
   DWORD cbProcSize;
   DWORD cdwLocals;
   WORD  cdwParams;
-  unsigned cbProlog : 8;
-  unsigned cbRegs   : 3;
-  unsigned fHasSEH  : 1;
-  unsigned fUseBP   : 1;
-  unsigned reserved : 1;
-  unsigned cbFrame  : 2;
+  WORD  cbProlog : 8;
+  WORD  cbRegs   : 3;
+  WORD  fHasSEH  : 1;
+  WORD  fUseBP   : 1;
+  WORD  reserved : 1;
+  WORD  cbFrame  : 2;
 } FPO_DATA, *PFPO_DATA;
 
 typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY {
-  DWORD Characteristics;
+  DWORD Size;
   DWORD TimeDateStamp;
   WORD  MajorVersion;
   WORD  MinorVersion;
@@ -2546,7 +2788,9 @@ typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY {
   WORD  CSDVersion;
   WORD  Reserved1;
   PVOID EditList;
-  DWORD Reserved[1];
+  DWORD SecurityCookie;
+  DWORD SEHandlerTable;
+  DWORD SEHandlerCount;
 } IMAGE_LOAD_CONFIG_DIRECTORY, *PIMAGE_LOAD_CONFIG_DIRECTORY;
 
 typedef struct _IMAGE_FUNCTION_ENTRY {
@@ -2609,7 +2853,7 @@ typedef struct tagMESSAGE_RESOURCE_DATA {
  */
 
 /*
- * First a constant for the following typdefs.
+ * First a constant for the following typedefs.
  */
 
 #define ANYSIZE_ARRAY   1
@@ -2789,8 +3033,11 @@ typedef struct _ACL_SIZE_INFORMATION
 
 #define SE_PRIVILEGE_ENABLED_BY_DEFAULT 0x00000001
 #define SE_PRIVILEGE_ENABLED           0x00000002
+#define SE_PRIVILEGE_REMOVE            0x00000004
 #define SE_PRIVILEGE_USED_FOR_ACCESS   0x80000000
 
+#define PRIVILEGE_SET_ALL_NECESSARY     1
+
 #define SE_OWNER_DEFAULTED             0x00000001
 #define SE_GROUP_DEFAULTED             0x00000002
 #define SE_DACL_PRESENT                        0x00000004
@@ -2901,17 +3148,17 @@ typedef struct _SID_AND_ATTRIBUTES {
  */
 
 typedef struct _TOKEN_USER {
-  SID_AND_ATTRIBUTES User;
-} TOKEN_USER;
+    SID_AND_ATTRIBUTES User;
+} TOKEN_USER, *PTOKEN_USER;
 
 /*
  * TOKEN_GROUPS
  */
 
-typedef struct _TOKEN_GROUPS  {
-  DWORD GroupCount;
-  SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY];
-} TOKEN_GROUPS;
+typedef struct _TOKEN_GROUPS {
+    DWORD GroupCount;
+    SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY];
+} TOKEN_GROUPS, *PTOKEN_GROUPS;
 
 /*
  * LUID_AND_ATTRIBUTES
@@ -3006,7 +3253,7 @@ typedef struct _TOKEN_PRIVILEGES {
 
 typedef struct _TOKEN_OWNER {
   PSID Owner;
-} TOKEN_OWNER;
+} TOKEN_OWNER, *PTOKEN_OWNER;
 
 /*
  * TOKEN_PRIMARY_GROUP
@@ -3014,7 +3261,7 @@ typedef struct _TOKEN_OWNER {
 
 typedef struct _TOKEN_PRIMARY_GROUP {
   PSID PrimaryGroup;
-} TOKEN_PRIMARY_GROUP;
+} TOKEN_PRIMARY_GROUP, *PTOKEN_PRIMARY_GROUP;
 
 
 /*
@@ -3023,7 +3270,7 @@ typedef struct _TOKEN_PRIMARY_GROUP {
 
 typedef struct _TOKEN_DEFAULT_DACL {
   PACL DefaultDacl;
-} TOKEN_DEFAULT_DACL;
+} TOKEN_DEFAULT_DACL, *PTOKEN_DEFAULT_DACL;
 
 /*
  * TOKEN_SOURCEL
@@ -3034,7 +3281,7 @@ typedef struct _TOKEN_DEFAULT_DACL {
 typedef struct _TOKEN_SOURCE {
   char SourceName[TOKEN_SOURCE_LENGTH];
   LUID SourceIdentifier;
-} TOKEN_SOURCE;
+} TOKEN_SOURCE, *PTOKEN_SOURCE;
 
 /*
  * TOKEN_TYPE
@@ -3074,6 +3321,7 @@ typedef struct _SECURITY_QUALITY_OF_SERVICE {
  * TOKEN_STATISTICS
  */
 
+#include <pshpack4.h>
 typedef struct _TOKEN_STATISTICS {
   LUID  TokenId;
   LUID  AuthenticationId;
@@ -3086,6 +3334,7 @@ typedef struct _TOKEN_STATISTICS {
   DWORD PrivilegeCount;
   LUID  ModifiedId;
 } TOKEN_STATISTICS;
+#include <poppack.h>
 
 /*
  *     ACLs of NT
@@ -3190,6 +3439,7 @@ typedef enum tagSID_NAME_USE {
 #define MAXIMUM_ALLOWED            0x02000000
 #define ACCESS_SYSTEM_SECURITY     0x01000000
 
+#define EVENT_QUERY_STATE          0x0001
 #define EVENT_MODIFY_STATE         0x0002
 #define EVENT_ALL_ACCESS           (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
 
@@ -3236,6 +3486,7 @@ typedef enum tagSID_NAME_USE {
 #define SECTION_MAP_READ           0x0004
 #define SECTION_MAP_EXECUTE        0x0008
 #define SECTION_EXTEND_SIZE        0x0010
+#define SECTION_MAP_EXECUTE_EXPLICIT 0x0020
 #define SECTION_ALL_ACCESS         (STANDARD_RIGHTS_REQUIRED|0x01f)
 
 #define FILE_READ_DATA            0x0001    /* file & pipe */
@@ -3265,6 +3516,8 @@ typedef enum tagSID_NAME_USE {
 #define FILE_GENERIC_EXECUTE      (STANDARD_RIGHTS_EXECUTE | FILE_EXECUTE | \
                                    FILE_READ_ATTRIBUTES | SYNCHRONIZE)
 
+#define DUPLICATE_CLOSE_SOURCE     0x00000001
+#define DUPLICATE_SAME_ACCESS      0x00000002
 
 /* File attribute flags */
 #define FILE_SHARE_READ                        0x00000001L
@@ -3351,6 +3604,231 @@ typedef enum _LATENCY_TIME {
        LT_LOWEST_LATENCY
 } LATENCY_TIME, *PLATENCY_TIME;
 
+#define DISCHARGE_POLICY_CRITICAL      0
+#define DISCHARGE_POLICY_LOW           1
+#define NUM_DISCHARGE_POLICIES         4
+
+#define PO_THROTTLE_NONE               0
+#define PO_THROTTLE_CONSTANT           1
+#define PO_THROTTLE_DEGRADE            2
+#define PO_THROTTLE_ADAPTIVE           3
+
+typedef enum _POWER_ACTION {
+       PowerActionNone = 0,
+       PowerActionReserved,
+       PowerActionSleep,
+       PowerActionHibernate,
+       PowerActionShutdown,
+       PowerActionShutdownReset,
+       PowerActionShutdownOff,
+       PowerActionWarmEject
+} POWER_ACTION,
+*PPOWER_ACTION;
+
+typedef enum _SYSTEM_POWER_STATE {
+       PowerSystemUnspecified = 0,
+       PowerSystemWorking = 1,
+       PowerSystemSleeping1 = 2,
+       PowerSystemSleeping2 = 3,
+       PowerSystemSleeping3 = 4,
+       PowerSystemHibernate = 5,
+       PowerSystemShutdown = 6,
+       PowerSystemMaximum = 7
+} SYSTEM_POWER_STATE,
+*PSYSTEM_POWER_STATE;
+
+typedef enum _DEVICE_POWER_STATE {
+    PowerDeviceUnspecified,
+    PowerDeviceD0,
+    PowerDeviceD1,
+    PowerDeviceD2,
+    PowerDeviceD3,
+    PowerDeviceMaximum
+} DEVICE_POWER_STATE, *PDEVICE_POWER_STATE;
+
+typedef enum _POWER_INFORMATION_LEVEL {
+        SystemPowerPolicyAc,
+        SystemPowerPolicyDc,
+        VerifySystemPolicyAc,
+        VerifySystemPolicyDc,
+        SystemPowerCapabilities,
+        SystemBatteryState,
+        SystemPowerStateHandler,
+        ProcessorStateHandler,
+        SystemPowerPolicyCurrent,
+        AdministratorPowerPolicy,
+        SystemReserveHiberFile,
+        ProcessorInformation,
+        SystemPowerInformation,
+        ProcessorStateHandler2,
+        LastWakeTime,
+        LastSleepTime,
+        SystemExecutionState,
+        SystemPowerStateNotifyHandler,
+        ProcessorPowerPolicyAc,
+        ProcessorPowerPolicyDc,
+        VerifyProcessorPowerPolicyAc,
+        VerifyProcessorPowerPolicyDc,
+        ProcessorPowerPolicyCurrent
+} POWER_INFORMATION_LEVEL;
+
+typedef struct _ADMINISTRATOR_POWER_POLICY {
+       SYSTEM_POWER_STATE MinSleep;
+       SYSTEM_POWER_STATE MaxSleep;
+       ULONG MinVideoTimeout;
+       ULONG MaxVideoTimeout;
+       ULONG MinSpindownTimeout;
+       ULONG MaxSpindownTimeout;
+} ADMINISTRATOR_POWER_POLICY, *PADMINISTRATOR_POWER_POLICY;
+
+typedef struct {
+       ULONG Granularity;
+       ULONG Capacity;
+} BATTERY_REPORTING_SCALE,
+*PBATTERY_REPORTING_SCALE;
+
+typedef struct {
+       POWER_ACTION Action;
+       ULONG Flags;
+       ULONG EventCode;
+} POWER_ACTION_POLICY,
+*PPOWER_ACTION_POLICY;
+
+typedef struct _PROCESSOR_POWER_INFORMATION {
+       ULONG Number;
+       ULONG MaxMhz;
+       ULONG CurrentMhz;
+       ULONG MhzLimit;
+       ULONG MaxIdleState;
+       ULONG CurrentIdleState;
+} PROCESSOR_POWER_INFORMATION,
+*PPROCESSOR_POWER_INFORMATION;
+
+typedef struct _PROCESSOR_POWER_POLICY_INFO {
+       ULONG TimeCheck;
+       ULONG DemoteLimit;
+       ULONG PromoteLimit;
+       UCHAR DemotePercent;
+       UCHAR PromotePercent;
+       UCHAR Spare[2];
+       ULONG AllowDemotion:1;
+       ULONG AllowPromotion:1;
+       ULONG Reserved:30;
+} PROCESSOR_POWER_POLICY_INFO,
+*PPROCESSOR_POWER_POLICY_INFO;
+
+typedef struct _PROCESSOR_POWER_POLICY {
+       DWORD Revision;
+       BYTE DynamicThrottle;
+       BYTE Spare[3];
+       DWORD DisableCStates:1;
+       DWORD Reserved:31;
+       DWORD PolicyCount;
+       PROCESSOR_POWER_POLICY_INFO Policy[3];
+} PROCESSOR_POWER_POLICY,
+*PPROCESSOR_POWER_POLICY;
+
+typedef struct {
+       BOOLEAN AcOnLine;
+       BOOLEAN BatteryPresent;
+       BOOLEAN Charging;
+       BOOLEAN Discharging;
+       BOOLEAN Spare1[4];
+       ULONG MaxCapacity;
+       ULONG RemainingCapacity;
+       ULONG Rate;
+       ULONG EstimatedTime;
+       ULONG DefaultAlert1;
+       ULONG DefaultAlert2;
+} SYSTEM_BATTERY_STATE,
+*PSYSTEM_BATTERY_STATE;
+
+typedef struct {
+       BOOLEAN PowerButtonPresent;
+       BOOLEAN SleepButtonPresent;
+       BOOLEAN LidPresent;
+       BOOLEAN SystemS1;
+       BOOLEAN SystemS2;
+       BOOLEAN SystemS3;
+       BOOLEAN SystemS4;
+       BOOLEAN SystemS5;
+       BOOLEAN HiberFilePresent;
+       BOOLEAN FullWake;
+       BOOLEAN VideoDimPresent;
+       BOOLEAN ApmPresent;
+       BOOLEAN UpsPresent;
+       BOOLEAN ThermalControl;
+       BOOLEAN ProcessorThrottle;
+       UCHAR ProcessorMinThrottle;
+       UCHAR ProcessorMaxThrottle;
+       UCHAR spare2[4];
+       BOOLEAN DiskSpinDown;
+       UCHAR spare3[8];
+       BOOLEAN SystemBatteriesPresent;
+       BOOLEAN BatteriesAreShortTerm;
+       BATTERY_REPORTING_SCALE BatteryScale[3];
+       SYSTEM_POWER_STATE AcOnLineWake;
+       SYSTEM_POWER_STATE SoftLidWake;
+       SYSTEM_POWER_STATE RtcWake;
+       SYSTEM_POWER_STATE MinDeviceWakeState;
+       SYSTEM_POWER_STATE DefaultLowLatencyWake;
+} SYSTEM_POWER_CAPABILITIES,
+*PSYSTEM_POWER_CAPABILITIES;
+
+typedef struct _SYSTEM_POWER_INFORMATION {
+       ULONG MaxIdlenessAllowed;
+       ULONG Idleness;
+       ULONG TimeRemaining;
+       UCHAR CoolingMode;
+} SYSTEM_POWER_INFORMATION,
+*PSYSTEM_POWER_INFORMATION;
+
+typedef struct _SYSTEM_POWER_LEVEL {
+       BOOLEAN Enable;
+       UCHAR Spare[3];
+       ULONG BatteryLevel;
+       POWER_ACTION_POLICY PowerPolicy;
+       SYSTEM_POWER_STATE MinSystemState;
+} SYSTEM_POWER_LEVEL,
+*PSYSTEM_POWER_LEVEL;
+
+typedef struct _SYSTEM_POWER_POLICY {
+       ULONG Revision;
+       POWER_ACTION_POLICY PowerButton;
+       POWER_ACTION_POLICY SleepButton;
+       POWER_ACTION_POLICY LidClose;
+       SYSTEM_POWER_STATE LidOpenWake;
+       ULONG Reserved;
+       POWER_ACTION_POLICY Idle;
+       ULONG IdleTimeout;
+       UCHAR IdleSensitivity;
+       UCHAR DynamicThrottle;
+       UCHAR Spare2[2];
+       SYSTEM_POWER_STATE MinSleep;
+       SYSTEM_POWER_STATE MaxSleep;
+       SYSTEM_POWER_STATE ReducedLatencySleep;
+       ULONG WinLogonFlags;
+       ULONG Spare3;
+       ULONG DozeS4Timeout;
+       ULONG BroadcastCapacityResolution;
+       SYSTEM_POWER_LEVEL DischargePolicy[NUM_DISCHARGE_POLICIES];
+       ULONG VideoTimeout;
+       BOOLEAN VideoDimDisplay;
+       ULONG VideoReserved[3];
+       ULONG SpindownTimeout;
+       BOOLEAN OptimizeForPower;
+       UCHAR FanThrottleTolerance;
+       UCHAR ForcedThrottle;
+       UCHAR MinThrottle;
+       POWER_ACTION_POLICY OverThrottled;
+} SYSTEM_POWER_POLICY,
+*PSYSTEM_POWER_POLICY;
+
+typedef union _FILE_SEGMENT_ELEMENT {
+       PVOID64 Buffer;
+       ULONGLONG Alignment;
+} FILE_SEGMENT_ELEMENT, *PFILE_SEGMENT_ELEMENT;
+
 /* ----------------------------- begin registry ----------------------------- */
 
 /* Registry security values */
@@ -3521,15 +3999,16 @@ typedef struct _RTL_CRITICAL_SECTION {
 
 typedef VOID (NTAPI * WAITORTIMERCALLBACKFUNC) (PVOID, BOOLEAN );
 
+#include <pshpack8.h>
 typedef struct _IO_COUNTERS {
-    ULONGLONG   ReadOperationCount;
-    ULONGLONG   WriteOperationCount;
-    ULONGLONG   OtherOperationCount;
-    ULONGLONG   ReadTransferCount;
-    ULONGLONG   WriteTransferCount;
-    ULONGLONG   OtherTransferCount;
-} IO_COUNTERS;
-typedef IO_COUNTERS *PIO_COUNTERS;
+    ULONGLONG DECLSPEC_ALIGN(8) ReadOperationCount;
+    ULONGLONG DECLSPEC_ALIGN(8) WriteOperationCount;
+    ULONGLONG DECLSPEC_ALIGN(8) OtherOperationCount;
+    ULONGLONG DECLSPEC_ALIGN(8) ReadTransferCount;
+    ULONGLONG DECLSPEC_ALIGN(8) WriteTransferCount;
+    ULONGLONG DECLSPEC_ALIGN(8) OtherTransferCount;
+} IO_COUNTERS, *PIO_COUNTERS;
+#include <poppack.h>
 
 typedef struct {
        DWORD dwOSVersionInfoSize;
@@ -3616,6 +4095,7 @@ ULONGLONG WINAPI VerSetConditionMask(ULONGLONG,DWORD,BYTE);
 #define        VER_SUITE_DATACENTER                    0x00000080
 #define        VER_SUITE_SINGLEUSERTS                  0x00000100
 #define        VER_SUITE_PERSONAL                      0x00000200
+#define        VER_SUITE_BLADE                         0x00000400
 
 #define        VER_EQUAL                               1
 #define        VER_GREATER                             2
@@ -3625,4 +4105,4 @@ ULONGLONG WINAPI VerSetConditionMask(ULONGLONG,DWORD,BYTE);
 #define        VER_AND                                 6
 #define        VER_OR                                  7
 
-#endif  /* __WINE_WINNT_H */
+#endif  /* _WINNT_ */