[PSDK]
authorAmine Khaldi <amine.khaldi@reactos.org>
Sun, 16 May 2010 22:15:24 +0000 (22:15 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sun, 16 May 2010 22:15:24 +0000 (22:15 +0000)
- winnt.h : ULONG -> DWORD and UCHAR-> BYTE in several structures, update SLIST_HEADER and co, add proper packing of RTL_CRITICAL_SECTION, update IMAGE_AUX_SYMBOL, ReplacesCorHdrNumericDefines, IMAGE_COR20_HEADER, IMAGE_RESOURCE_DIRECTORY_ENTRY, IMAGE_RUNTIME_FUNCTION_ENTRY, SYSTEM_POWER_CAPABILITIES, ACTIVATION_CONTEXT_INFO_CLASS and HEAP_INFORMATION_CLASS, replace IMAGE_LOAD_CONFIG_DIRECTORY with IMAGE_LOAD_CONFIG_DIRECTORY{32,64} with the appropriate conditional and apply consistent formatting for the rest.

svn path=/branches/header-work/; revision=47245

include/psdk/winnt.h

index d199f4a..d0e203f 100644 (file)
@@ -3227,64 +3227,73 @@ typedef struct _FILE_NOTIFY_INFORMATION {
 } FILE_NOTIFY_INFORMATION,*PFILE_NOTIFY_INFORMATION;
 
 typedef struct _TAPE_ERASE {
-       DWORD Type;
-       BOOLEAN Immediate;
-} TAPE_ERASE,*PTAPE_ERASE;
+  DWORD Type;
+  BOOLEAN Immediate;
+} TAPE_ERASE, *PTAPE_ERASE;
+
 typedef struct _TAPE_GET_DRIVE_PARAMETERS {
-       BOOLEAN ECC;
-       BOOLEAN Compression;
-       BOOLEAN DataPadding;
-       BOOLEAN ReportSetmarks;
-       DWORD DefaultBlockSize;
-       DWORD MaximumBlockSize;
-       DWORD MinimumBlockSize;
-       DWORD MaximumPartitionCount;
-       DWORD FeaturesLow;
-       DWORD FeaturesHigh;
-       DWORD EOTWarningZoneSize;
-} TAPE_GET_DRIVE_PARAMETERS,*PTAPE_GET_DRIVE_PARAMETERS;
+  BOOLEAN ECC;
+  BOOLEAN Compression;
+  BOOLEAN DataPadding;
+  BOOLEAN ReportSetmarks;
+  DWORD DefaultBlockSize;
+  DWORD MaximumBlockSize;
+  DWORD MinimumBlockSize;
+  DWORD MaximumPartitionCount;
+  DWORD FeaturesLow;
+  DWORD FeaturesHigh;
+  DWORD EOTWarningZoneSize;
+} TAPE_GET_DRIVE_PARAMETERS, *PTAPE_GET_DRIVE_PARAMETERS;
+
 typedef struct _TAPE_GET_MEDIA_PARAMETERS {
-       LARGE_INTEGER Capacity;
-       LARGE_INTEGER Remaining;
-       DWORD BlockSize;
-       DWORD PartitionCount;
-       BOOLEAN WriteProtected;
-} TAPE_GET_MEDIA_PARAMETERS,*PTAPE_GET_MEDIA_PARAMETERS;
+  LARGE_INTEGER Capacity;
+  LARGE_INTEGER Remaining;
+  DWORD BlockSize;
+  DWORD PartitionCount;
+  BOOLEAN WriteProtected;
+} TAPE_GET_MEDIA_PARAMETERS, *PTAPE_GET_MEDIA_PARAMETERS;
+
 typedef struct _TAPE_GET_POSITION {
-       ULONG Type;
-       ULONG Partition;
-       LARGE_INTEGER Offset;
-} TAPE_GET_POSITION,*PTAPE_GET_POSITION;
+  ULONG Type;
+  ULONG Partition;
+  LARGE_INTEGER Offset;
+} TAPE_GET_POSITION, *PTAPE_GET_POSITION;
+
 typedef struct _TAPE_PREPARE {
-       DWORD Operation;
-       BOOLEAN Immediate;
-} TAPE_PREPARE,*PTAPE_PREPARE;
+  DWORD Operation;
+  BOOLEAN Immediate;
+} TAPE_PREPARE, *PTAPE_PREPARE;
+
 typedef struct _TAPE_SET_DRIVE_PARAMETERS {
-       BOOLEAN ECC;
-       BOOLEAN Compression;
-       BOOLEAN DataPadding;
-       BOOLEAN ReportSetmarks;
-       ULONG EOTWarningZoneSize;
-} TAPE_SET_DRIVE_PARAMETERS,*PTAPE_SET_DRIVE_PARAMETERS;
+  BOOLEAN ECC;
+  BOOLEAN Compression;
+  BOOLEAN DataPadding;
+  BOOLEAN ReportSetmarks;
+  DWORD EOTWarningZoneSize;
+} TAPE_SET_DRIVE_PARAMETERS, *PTAPE_SET_DRIVE_PARAMETERS;
+
 typedef struct _TAPE_SET_MEDIA_PARAMETERS {
-       ULONG BlockSize;
+  DWORD BlockSize;
 } TAPE_SET_MEDIA_PARAMETERS,*PTAPE_SET_MEDIA_PARAMETERS;
+
 typedef struct _TAPE_SET_POSITION {
-       DWORD Method;
-       DWORD Partition;
-       LARGE_INTEGER Offset;
-       BOOLEAN Immediate;
-} TAPE_SET_POSITION,*PTAPE_SET_POSITION;
+  DWORD Method;
+  DWORD Partition;
+  LARGE_INTEGER Offset;
+  BOOLEAN Immediate;
+} TAPE_SET_POSITION, *PTAPE_SET_POSITION;
+
 typedef struct _TAPE_WRITE_MARKS {
-       DWORD Type;
-       DWORD Count;
-       BOOLEAN Immediate;
-} TAPE_WRITE_MARKS,*PTAPE_WRITE_MARKS;
+  DWORD Type;
+  DWORD Count;
+  BOOLEAN Immediate;
+} TAPE_WRITE_MARKS, *PTAPE_WRITE_MARKS;
+
 typedef struct _TAPE_CREATE_PARTITION {
-       DWORD Method;
-       DWORD Count;
-       DWORD Size;
-} TAPE_CREATE_PARTITION,*PTAPE_CREATE_PARTITION;
+  DWORD Method;
+  DWORD Count;
+  DWORD Size;
+} TAPE_CREATE_PARTITION, *PTAPE_CREATE_PARTITION;
 
 typedef struct _MEMORY_BASIC_INFORMATION {
   PVOID BaseAddress;
@@ -3294,21 +3303,23 @@ typedef struct _MEMORY_BASIC_INFORMATION {
   DWORD State;
   DWORD Protect;
   DWORD Type;
-} MEMORY_BASIC_INFORMATION,*PMEMORY_BASIC_INFORMATION;
+} MEMORY_BASIC_INFORMATION, *PMEMORY_BASIC_INFORMATION;
 
 typedef struct _MESSAGE_RESOURCE_ENTRY {
-       WORD Length;
-       WORD Flags;
-       BYTE Text[1];
-} MESSAGE_RESOURCE_ENTRY,*PMESSAGE_RESOURCE_ENTRY;
+  WORD Length;
+  WORD Flags;
+  BYTE Text[1];
+} MESSAGE_RESOURCE_ENTRY, *PMESSAGE_RESOURCE_ENTRY;
+
 typedef struct _MESSAGE_RESOURCE_BLOCK {
-       DWORD LowId;
-       DWORD HighId;
-       DWORD OffsetToEntries;
-} MESSAGE_RESOURCE_BLOCK,*PMESSAGE_RESOURCE_BLOCK;
+  DWORD LowId;
+  DWORD HighId;
+  DWORD OffsetToEntries;
+} MESSAGE_RESOURCE_BLOCK, *PMESSAGE_RESOURCE_BLOCK;
+
 typedef struct _MESSAGE_RESOURCE_DATA {
-       DWORD NumberOfBlocks;
-       MESSAGE_RESOURCE_BLOCK Blocks[1];
+  DWORD NumberOfBlocks;
+  MESSAGE_RESOURCE_BLOCK Blocks[1];
 } MESSAGE_RESOURCE_DATA,*PMESSAGE_RESOURCE_DATA;
 
 typedef struct _LIST_ENTRY {
@@ -3337,49 +3348,79 @@ typedef struct _SINGLE_LIST_ENTRY {
 #define _SLIST_HEADER_
 
 #if defined(_WIN64)
-typedef struct _SLIST_ENTRY *PSLIST_ENTRY;
+
+typedef struct DECLSPEC_ALIGN(16) _SLIST_ENTRY *PSLIST_ENTRY;
+
 typedef struct DECLSPEC_ALIGN(16) _SLIST_ENTRY {
-       PSLIST_ENTRY Next;
+  PSLIST_ENTRY Next;
 } SLIST_ENTRY;
+
+typedef struct _SLIST_ENTRY32 {
+  DWORD Next;
+} SLIST_ENTRY32, *PSLIST_ENTRY32;
+
 typedef union DECLSPEC_ALIGN(16) _SLIST_HEADER {
-    struct {
-        ULONGLONG Alignment;
-        ULONGLONG Region;
-    } DUMMYSTRUCTNAME;
-    struct {
-        ULONGLONG Depth:16;
-        ULONGLONG Sequence:9;
-        ULONGLONG NextEntry:39;
-        ULONGLONG HeaderType:1;
-        ULONGLONG Init:1;
-        ULONGLONG Reserved:59;
-        ULONGLONG Region:3;
-    } Header8;
-    struct {
-        ULONGLONG Depth:16;
-        ULONGLONG Sequence:48;
-        ULONGLONG HeaderType:1;
-        ULONGLONG Init:1;
-        ULONGLONG Reserved:2;
-        ULONGLONG NextEntry:60;
-    } Header16;
+  _ANONYMOUS_STRUCT struct {
+    ULONGLONG Alignment;
+    ULONGLONG Region;
+  } DUMMYSTRUCTNAME;
+  struct {
+    ULONGLONG Depth:16;
+    ULONGLONG Sequence:9;
+    ULONGLONG NextEntry:39;
+    ULONGLONG HeaderType:1;
+    ULONGLONG Init:1;
+    ULONGLONG Reserved:59;
+    ULONGLONG Region:3;
+  } Header8;
+  struct {
+    ULONGLONG Depth:16;
+    ULONGLONG Sequence:48;
+    ULONGLONG HeaderType:1;
+    ULONGLONG Init:1;
+    ULONGLONG Reserved:2;
+    ULONGLONG NextEntry:60;
+  } Header16;
+  struct {
+    ULONGLONG Depth:16;
+    ULONGLONG Sequence:48;
+    ULONGLONG HeaderType:1;
+    ULONGLONG Reserved:3;
+    ULONGLONG NextEntry:60;
+  } HeaderX64;
 } SLIST_HEADER, *PSLIST_HEADER;
+
+typedef union _SLIST_HEADER32{
+  ULONGLONG Alignment;
+  _ANONYMOUS_STRUCT struct {
+    SLIST_ENTRY32 Next;
+    WORD Depth;
+    WORD Sequence;
+  } DUMMYSTRUCTNAME;
+} SLIST_HEADER32, *PSLIST_HEADER32;
+
 #else
+
 #define SLIST_ENTRY SINGLE_LIST_ENTRY
 #define _SLIST_ENTRY _SINGLE_LIST_ENTRY
 #define PSLIST_ENTRY PSINGLE_LIST_ENTRY
+
+typedef SLIST_ENTRY SLIST_ENTRY32, *PSLIST_ENTRY32;
+
 typedef union _SLIST_HEADER {
-    ULONGLONG Alignment;
-    struct {
-        SLIST_ENTRY Next;
-        USHORT Depth;
-        USHORT Sequence;
-    } DUMMYSTRUCTNAME;
+  ULONGLONG Alignment;
+  _ANONYMOUS_STRUCT struct {
+    SLIST_ENTRY Next;
+    WORD Depth;
+    WORD Sequence;
+  } DUMMYSTRUCTNAME;
 } SLIST_HEADER, *PSLIST_HEADER;
-#endif
 
-#endif /* _SLIST_HEADER_ */
+typedef SLIST_HEADER SLIST_HEADER32, *PSLIST_HEADER32;
 
+#endif /* defined(_WIN64) */
+
+#endif /* _SLIST_HEADER_ */
 
 NTSYSAPI
 VOID
@@ -3425,24 +3466,27 @@ RtlQueryDepthSList (
     );
 
 typedef struct _RTL_CRITICAL_SECTION_DEBUG {
-       WORD Type;
-       WORD CreatorBackTraceIndex;
-       struct _RTL_CRITICAL_SECTION *CriticalSection;
-       LIST_ENTRY ProcessLocksList;
-       DWORD EntryCount;
-       DWORD ContentionCount;
-    DWORD Flags;
-    WORD CreatorBackTraceIndexHigh;
-    WORD SpareWORD;
+  WORD Type;
+  WORD CreatorBackTraceIndex;
+  struct _RTL_CRITICAL_SECTION *CriticalSection;
+  LIST_ENTRY ProcessLocksList;
+  DWORD EntryCount;
+  DWORD ContentionCount;
+  DWORD Flags;
+  WORD CreatorBackTraceIndexHigh;
+  WORD SpareWORD;
 } RTL_CRITICAL_SECTION_DEBUG, *PRTL_CRITICAL_SECTION_DEBUG, RTL_RESOURCE_DEBUG, *PRTL_RESOURCE_DEBUG;
+
+#include "pshpack8.h"
 typedef struct _RTL_CRITICAL_SECTION {
-       PRTL_CRITICAL_SECTION_DEBUG DebugInfo;
-       LONG LockCount;
-       LONG RecursionCount;
-       HANDLE OwningThread;
-       HANDLE LockSemaphore;
-       ULONG_PTR SpinCount;
-} RTL_CRITICAL_SECTION,*PRTL_CRITICAL_SECTION;
+  PRTL_CRITICAL_SECTION_DEBUG DebugInfo;
+  LONG LockCount;
+  LONG RecursionCount;
+  HANDLE OwningThread;
+  HANDLE LockSemaphore;
+  ULONG_PTR SpinCount;
+} RTL_CRITICAL_SECTION, *PRTL_CRITICAL_SECTION;
+#include "poppack.h"
 
 NTSYSAPI
 WORD
@@ -3480,16 +3524,16 @@ RtlUnwind (
     );
 
 #define RTL_SRWLOCK_INIT {0}
-typedef struct _RTL_SRWLOCK
-{
-    PVOID Ptr;
+
+typedef struct _RTL_SRWLOCK {
+  PVOID Ptr;
 } RTL_SRWLOCK, *PRTL_SRWLOCK;
 
 #define RTL_CONDITION_VARIABLE_INIT {0}
 #define RTL_CONDITION_VARIABLE_LOCKMODE_SHARED  0x1
-typedef struct _RTL_CONDITION_VARIABLE
-{
-    PVOID Ptr;
+
+typedef struct _RTL_CONDITION_VARIABLE {
+  PVOID Ptr;
 } RTL_CONDITION_VARIABLE, *PRTL_CONDITION_VARIABLE;
 
 typedef LONG
@@ -3510,292 +3554,292 @@ typedef struct _GROUP_AFFINITY {
 } GROUP_AFFINITY, *PGROUP_AFFINITY;
 
 typedef struct _EVENTLOGRECORD {
-       DWORD Length;
-       DWORD Reserved;
-       DWORD RecordNumber;
-       DWORD TimeGenerated;
-       DWORD TimeWritten;
-       DWORD EventID;
-       WORD EventType;
-       WORD NumStrings;
-       WORD EventCategory;
-       WORD ReservedFlags;
-       DWORD ClosingRecordNumber;
-       DWORD StringOffset;
-       DWORD UserSidLength;
-       DWORD UserSidOffset;
-       DWORD DataLength;
-       DWORD DataOffset;
-} EVENTLOGRECORD,*PEVENTLOGRECORD;
+  DWORD Length;
+  DWORD Reserved;
+  DWORD RecordNumber;
+  DWORD TimeGenerated;
+  DWORD TimeWritten;
+  DWORD EventID;
+  WORD EventType;
+  WORD NumStrings;
+  WORD EventCategory;
+  WORD ReservedFlags;
+  DWORD ClosingRecordNumber;
+  DWORD StringOffset;
+  DWORD UserSidLength;
+  DWORD UserSidOffset;
+  DWORD DataLength;
+  DWORD DataOffset;
+} EVENTLOGRECORD, *PEVENTLOGRECORD;
 
 typedef struct _OSVERSIONINFOA {
-       DWORD dwOSVersionInfoSize;
-       DWORD dwMajorVersion;
-       DWORD dwMinorVersion;
-       DWORD dwBuildNumber;
-       DWORD dwPlatformId;
-       CHAR szCSDVersion[128];
-} OSVERSIONINFOA,*POSVERSIONINFOA,*LPOSVERSIONINFOA;
+  DWORD dwOSVersionInfoSize;
+  DWORD dwMajorVersion;
+  DWORD dwMinorVersion;
+  DWORD dwBuildNumber;
+  DWORD dwPlatformId;
+  CHAR szCSDVersion[128];
+} OSVERSIONINFOA, *POSVERSIONINFOA, *LPOSVERSIONINFOA;
 
 typedef struct _OSVERSIONINFOW {
-       DWORD dwOSVersionInfoSize;
-       DWORD dwMajorVersion;
-       DWORD dwMinorVersion;
-       DWORD dwBuildNumber;
-       DWORD dwPlatformId;
-       WCHAR szCSDVersion[128];
+  DWORD dwOSVersionInfoSize;
+  DWORD dwMajorVersion;
+  DWORD dwMinorVersion;
+  DWORD dwBuildNumber;
+  DWORD dwPlatformId;
+  WCHAR szCSDVersion[128];
 } OSVERSIONINFOW, *POSVERSIONINFOW, *LPOSVERSIONINFOW, RTL_OSVERSIONINFOW, *PRTL_OSVERSIONINFOW;
 
 typedef struct _OSVERSIONINFOEXA {
-       DWORD dwOSVersionInfoSize;
-       DWORD dwMajorVersion;
-       DWORD dwMinorVersion;
-       DWORD dwBuildNumber;
-       DWORD dwPlatformId;
-       CHAR szCSDVersion[128];
-       WORD wServicePackMajor;
-       WORD wServicePackMinor;
-       WORD wSuiteMask;
-       BYTE wProductType;
-       BYTE wReserved;
+  DWORD dwOSVersionInfoSize;
+  DWORD dwMajorVersion;
+  DWORD dwMinorVersion;
+  DWORD dwBuildNumber;
+  DWORD dwPlatformId;
+  CHAR szCSDVersion[128];
+  WORD wServicePackMajor;
+  WORD wServicePackMinor;
+  WORD wSuiteMask;
+  BYTE wProductType;
+  BYTE wReserved;
 } OSVERSIONINFOEXA, *POSVERSIONINFOEXA, *LPOSVERSIONINFOEXA;
 
 typedef struct _OSVERSIONINFOEXW {
-       DWORD dwOSVersionInfoSize;
-       DWORD dwMajorVersion;
-       DWORD dwMinorVersion;
-       DWORD dwBuildNumber;
-       DWORD dwPlatformId;
-       WCHAR szCSDVersion[128];
-       WORD wServicePackMajor;
-       WORD wServicePackMinor;
-       WORD wSuiteMask;
-       BYTE wProductType;
-       BYTE wReserved;
+  DWORD dwOSVersionInfoSize;
+  DWORD dwMajorVersion;
+  DWORD dwMinorVersion;
+  DWORD dwBuildNumber;
+  DWORD dwPlatformId;
+  WCHAR szCSDVersion[128];
+  WORD wServicePackMajor;
+  WORD wServicePackMinor;
+  WORD wSuiteMask;
+  BYTE wProductType;
+  BYTE wReserved;
 } OSVERSIONINFOEXW, *POSVERSIONINFOEXW, *LPOSVERSIONINFOEXW, RTL_OSVERSIONINFOEXW, *PRTL_OSVERSIONINFOEXW;
 
 #include <pshpack2.h>
+
 typedef struct _IMAGE_VXD_HEADER {
-       WORD e32_magic;
-       BYTE e32_border;
-       BYTE e32_worder;
-       DWORD e32_level;
-       WORD e32_cpu;
-       WORD e32_os;
-       DWORD e32_ver;
-       DWORD e32_mflags;
-       DWORD e32_mpages;
-       DWORD e32_startobj;
-       DWORD e32_eip;
-       DWORD e32_stackobj;
-       DWORD e32_esp;
-       DWORD e32_pagesize;
-       DWORD e32_lastpagesize;
-       DWORD e32_fixupsize;
-       DWORD e32_fixupsum;
-       DWORD e32_ldrsize;
-       DWORD e32_ldrsum;
-       DWORD e32_objtab;
-       DWORD e32_objcnt;
-       DWORD e32_objmap;
-       DWORD e32_itermap;
-       DWORD e32_rsrctab;
-       DWORD e32_rsrccnt;
-       DWORD e32_restab;
-       DWORD e32_enttab;
-       DWORD e32_dirtab;
-       DWORD e32_dircnt;
-       DWORD e32_fpagetab;
-       DWORD e32_frectab;
-       DWORD e32_impmod;
-       DWORD e32_impmodcnt;
-       DWORD e32_impproc;
-       DWORD e32_pagesum;
-       DWORD e32_datapage;
-       DWORD e32_preload;
-       DWORD e32_nrestab;
-       DWORD e32_cbnrestab;
-       DWORD e32_nressum;
-       DWORD e32_autodata;
-       DWORD e32_debuginfo;
-       DWORD e32_debuglen;
-       DWORD e32_instpreload;
-       DWORD e32_instdemand;
-       DWORD e32_heapsize;
-       BYTE e32_res3[12];
-       DWORD e32_winresoff;
-       DWORD e32_winreslen;
-       WORD e32_devid;
-       WORD e32_ddkver;
-} IMAGE_VXD_HEADER,*PIMAGE_VXD_HEADER;
+  WORD e32_magic;
+  BYTE e32_border;
+  BYTE e32_worder;
+  DWORD e32_level;
+  WORD e32_cpu;
+  WORD e32_os;
+  DWORD e32_ver;
+  DWORD e32_mflags;
+  DWORD e32_mpages;
+  DWORD e32_startobj;
+  DWORD e32_eip;
+  DWORD e32_stackobj;
+  DWORD e32_esp;
+  DWORD e32_pagesize;
+  DWORD e32_lastpagesize;
+  DWORD e32_fixupsize;
+  DWORD e32_fixupsum;
+  DWORD e32_ldrsize;
+  DWORD e32_ldrsum;
+  DWORD e32_objtab;
+  DWORD e32_objcnt;
+  DWORD e32_objmap;
+  DWORD e32_itermap;
+  DWORD e32_rsrctab;
+  DWORD e32_rsrccnt;
+  DWORD e32_restab;
+  DWORD e32_enttab;
+  DWORD e32_dirtab;
+  DWORD e32_dircnt;
+  DWORD e32_fpagetab;
+  DWORD e32_frectab;
+  DWORD e32_impmod;
+  DWORD e32_impmodcnt;
+  DWORD e32_impproc;
+  DWORD e32_pagesum;
+  DWORD e32_datapage;
+  DWORD e32_preload;
+  DWORD e32_nrestab;
+  DWORD e32_cbnrestab;
+  DWORD e32_nressum;
+  DWORD e32_autodata;
+  DWORD e32_debuginfo;
+  DWORD e32_debuglen;
+  DWORD e32_instpreload;
+  DWORD e32_instdemand;
+  DWORD e32_heapsize;
+  BYTE e32_res3[12];
+  DWORD e32_winresoff;
+  DWORD e32_winreslen;
+  WORD e32_devid;
+  WORD e32_ddkver;
+} IMAGE_VXD_HEADER, *PIMAGE_VXD_HEADER;
+
+typedef struct _IMAGE_DOS_HEADER {
+  WORD e_magic;
+  WORD e_cblp;
+  WORD e_cp;
+  WORD e_crlc;
+  WORD e_cparhdr;
+  WORD e_minalloc;
+  WORD e_maxalloc;
+  WORD e_ss;
+  WORD e_sp;
+  WORD e_csum;
+  WORD e_ip;
+  WORD e_cs;
+  WORD e_lfarlc;
+  WORD e_ovno;
+  WORD e_res[4];
+  WORD e_oemid;
+  WORD e_oeminfo;
+  WORD e_res2[10];
+  LONG e_lfanew;
+} IMAGE_DOS_HEADER, *PIMAGE_DOS_HEADER;
+
+typedef struct _IMAGE_OS2_HEADER {
+  WORD ne_magic;
+  CHAR ne_ver;
+  CHAR ne_rev;
+  WORD ne_enttab;
+  WORD ne_cbenttab;
+  LONG ne_crc;
+  WORD ne_flags;
+  WORD ne_autodata;
+  WORD ne_heap;
+  WORD ne_stack;
+  LONG ne_csip;
+  LONG ne_sssp;
+  WORD ne_cseg;
+  WORD ne_cmod;
+  WORD ne_cbnrestab;
+  WORD ne_segtab;
+  WORD ne_rsrctab;
+  WORD ne_restab;
+  WORD ne_modtab;
+  WORD ne_imptab;
+  LONG ne_nrestab;
+  WORD ne_cmovent;
+  WORD ne_align;
+  WORD ne_cres;
+  BYTE ne_exetyp;
+  BYTE ne_flagsothers;
+  WORD ne_pretthunks;
+  WORD ne_psegrefbytes;
+  WORD ne_swaparea;
+  WORD ne_expver;
+} IMAGE_OS2_HEADER, *PIMAGE_OS2_HEADER;
+
 #include <poppack.h>
 
 typedef struct _IMAGE_FILE_HEADER {
-       WORD Machine;
-       WORD NumberOfSections;
-       DWORD TimeDateStamp;
-       DWORD PointerToSymbolTable;
-       DWORD NumberOfSymbols;
-       WORD SizeOfOptionalHeader;
-       WORD Characteristics;
+  WORD Machine;
+  WORD NumberOfSections;
+  DWORD TimeDateStamp;
+  DWORD PointerToSymbolTable;
+  DWORD NumberOfSymbols;
+  WORD SizeOfOptionalHeader;
+  WORD Characteristics;
 } IMAGE_FILE_HEADER, *PIMAGE_FILE_HEADER;
 
 typedef struct _IMAGE_DATA_DIRECTORY {
-       DWORD VirtualAddress;
-       DWORD Size;
-} IMAGE_DATA_DIRECTORY,*PIMAGE_DATA_DIRECTORY;
+  DWORD VirtualAddress;
+  DWORD Size;
+} IMAGE_DATA_DIRECTORY, *PIMAGE_DATA_DIRECTORY;
 
 typedef struct _IMAGE_OPTIONAL_HEADER32 {
-       WORD Magic;
-       BYTE MajorLinkerVersion;
-       BYTE MinorLinkerVersion;
-       DWORD SizeOfCode;
-       DWORD SizeOfInitializedData;
-       DWORD SizeOfUninitializedData;
-       DWORD AddressOfEntryPoint;
-       DWORD BaseOfCode;
-       DWORD BaseOfData;
-       DWORD 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;
-       DWORD SizeOfStackReserve;
-       DWORD SizeOfStackCommit;
-       DWORD SizeOfHeapReserve;
-       DWORD SizeOfHeapCommit;
-       DWORD LoaderFlags;
-       DWORD NumberOfRvaAndSizes;
-       IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
-} IMAGE_OPTIONAL_HEADER32,*PIMAGE_OPTIONAL_HEADER32;
+  WORD Magic;
+  BYTE MajorLinkerVersion;
+  BYTE MinorLinkerVersion;
+  DWORD SizeOfCode;
+  DWORD SizeOfInitializedData;
+  DWORD SizeOfUninitializedData;
+  DWORD AddressOfEntryPoint;
+  DWORD BaseOfCode;
+  DWORD BaseOfData;
+  DWORD 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;
+  DWORD SizeOfStackReserve;
+  DWORD SizeOfStackCommit;
+  DWORD SizeOfHeapReserve;
+  DWORD SizeOfHeapCommit;
+  DWORD LoaderFlags;
+  DWORD NumberOfRvaAndSizes;
+  IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
+} IMAGE_OPTIONAL_HEADER32, *PIMAGE_OPTIONAL_HEADER32;
 
 typedef struct _IMAGE_OPTIONAL_HEADER64 {
-       WORD Magic;
-       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;
+  WORD Magic;
+  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_ROM_OPTIONAL_HEADER {
-       WORD Magic;
-       BYTE MajorLinkerVersion;
-       BYTE MinorLinkerVersion;
-       DWORD SizeOfCode;
-       DWORD SizeOfInitializedData;
-       DWORD SizeOfUninitializedData;
-       DWORD AddressOfEntryPoint;
-       DWORD BaseOfCode;
-       DWORD BaseOfData;
-       DWORD BaseOfBss;
-       DWORD GprMask;
-       DWORD CprMask[4];
-       DWORD GpValue;
-} IMAGE_ROM_OPTIONAL_HEADER,*PIMAGE_ROM_OPTIONAL_HEADER;
-
-#include <pshpack2.h>
-typedef struct _IMAGE_DOS_HEADER {
-       WORD e_magic;
-       WORD e_cblp;
-       WORD e_cp;
-       WORD e_crlc;
-       WORD e_cparhdr;
-       WORD e_minalloc;
-       WORD e_maxalloc;
-       WORD e_ss;
-       WORD e_sp;
-       WORD e_csum;
-       WORD e_ip;
-       WORD e_cs;
-       WORD e_lfarlc;
-       WORD e_ovno;
-       WORD e_res[4];
-       WORD e_oemid;
-       WORD e_oeminfo;
-       WORD e_res2[10];
-       LONG e_lfanew;
-} IMAGE_DOS_HEADER,*PIMAGE_DOS_HEADER;
-
-typedef struct _IMAGE_OS2_HEADER {
-       WORD ne_magic;
-       CHAR ne_ver;
-       CHAR ne_rev;
-       WORD ne_enttab;
-       WORD ne_cbenttab;
-       LONG ne_crc;
-       WORD ne_flags;
-       WORD ne_autodata;
-       WORD ne_heap;
-       WORD ne_stack;
-       LONG ne_csip;
-       LONG ne_sssp;
-       WORD ne_cseg;
-       WORD ne_cmod;
-       WORD ne_cbnrestab;
-       WORD ne_segtab;
-       WORD ne_rsrctab;
-       WORD ne_restab;
-       WORD ne_modtab;
-       WORD ne_imptab;
-       LONG ne_nrestab;
-       WORD ne_cmovent;
-       WORD ne_align;
-       WORD ne_cres;
-       BYTE ne_exetyp;
-       BYTE ne_flagsothers;
-       WORD ne_pretthunks;
-       WORD ne_psegrefbytes;
-       WORD ne_swaparea;
-       WORD ne_expver;
-} IMAGE_OS2_HEADER,*PIMAGE_OS2_HEADER;
-#include <poppack.h>
+  WORD Magic;
+  BYTE MajorLinkerVersion;
+  BYTE MinorLinkerVersion;
+  DWORD SizeOfCode;
+  DWORD SizeOfInitializedData;
+  DWORD SizeOfUninitializedData;
+  DWORD AddressOfEntryPoint;
+  DWORD BaseOfCode;
+  DWORD BaseOfData;
+  DWORD BaseOfBss;
+  DWORD GprMask;
+  DWORD CprMask[4];
+  DWORD GpValue;
+} IMAGE_ROM_OPTIONAL_HEADER, *PIMAGE_ROM_OPTIONAL_HEADER;
 
 typedef struct _IMAGE_NT_HEADERS32 {
-       DWORD Signature;
-       IMAGE_FILE_HEADER FileHeader;
-       IMAGE_OPTIONAL_HEADER32 OptionalHeader;
-} IMAGE_NT_HEADERS32,*PIMAGE_NT_HEADERS32;
+  DWORD Signature;
+  IMAGE_FILE_HEADER FileHeader;
+  IMAGE_OPTIONAL_HEADER32 OptionalHeader;
+} IMAGE_NT_HEADERS32, *PIMAGE_NT_HEADERS32;
 
 typedef struct _IMAGE_NT_HEADERS64 {
-       DWORD Signature;
-       IMAGE_FILE_HEADER FileHeader;
-       IMAGE_OPTIONAL_HEADER64 OptionalHeader;
-} IMAGE_NT_HEADERS64,*PIMAGE_NT_HEADERS64;
+  DWORD Signature;
+  IMAGE_FILE_HEADER FileHeader;
+  IMAGE_OPTIONAL_HEADER64 OptionalHeader;
+} IMAGE_NT_HEADERS64, *PIMAGE_NT_HEADERS64;
 
 #ifdef _WIN64
 typedef IMAGE_OPTIONAL_HEADER64 IMAGE_OPTIONAL_HEADER;
@@ -3810,219 +3854,225 @@ typedef PIMAGE_NT_HEADERS32 PIMAGE_NT_HEADERS;
 #endif
 
 typedef struct _IMAGE_ROM_HEADERS {
-       IMAGE_FILE_HEADER FileHeader;
-       IMAGE_ROM_OPTIONAL_HEADER OptionalHeader;
-} IMAGE_ROM_HEADERS,*PIMAGE_ROM_HEADERS;
+  IMAGE_FILE_HEADER FileHeader;
+  IMAGE_ROM_OPTIONAL_HEADER OptionalHeader;
+} IMAGE_ROM_HEADERS, *PIMAGE_ROM_HEADERS;
 
 typedef struct _IMAGE_SECTION_HEADER {
-       BYTE Name[IMAGE_SIZEOF_SHORT_NAME];
-       union {
-               DWORD PhysicalAddress;
-               DWORD VirtualSize;
-       } Misc;
-       DWORD VirtualAddress;
-       DWORD SizeOfRawData;
-       DWORD PointerToRawData;
-       DWORD PointerToRelocations;
-       DWORD PointerToLinenumbers;
-       WORD NumberOfRelocations;
-       WORD NumberOfLinenumbers;
-       DWORD Characteristics;
-} IMAGE_SECTION_HEADER,*PIMAGE_SECTION_HEADER;
+  BYTE Name[IMAGE_SIZEOF_SHORT_NAME];
+  union {
+    DWORD PhysicalAddress;
+    DWORD VirtualSize;
+  } Misc;
+  DWORD VirtualAddress;
+  DWORD SizeOfRawData;
+  DWORD PointerToRawData;
+  DWORD PointerToRelocations;
+  DWORD PointerToLinenumbers;
+  WORD NumberOfRelocations;
+  WORD NumberOfLinenumbers;
+  DWORD Characteristics;
+} IMAGE_SECTION_HEADER, *PIMAGE_SECTION_HEADER;
 
 #include <pshpack2.h>
 
 typedef struct _IMAGE_SYMBOL {
-       union {
-               BYTE ShortName[8];
-               struct {
-                       DWORD Short;
-                       DWORD Long;
-               } Name;
-               PBYTE LongName[2];
-       } N;
-       DWORD Value;
-       SHORT SectionNumber;
-       WORD Type;
-       BYTE StorageClass;
-       BYTE NumberOfAuxSymbols;
-} IMAGE_SYMBOL,*PIMAGE_SYMBOL;
+  union {
+    BYTE ShortName[8];
+    struct {
+      DWORD Short;
+      DWORD Long;
+    } Name;
+    PBYTE LongName[2];
+  } N;
+  DWORD Value;
+  SHORT SectionNumber;
+  WORD Type;
+  BYTE StorageClass;
+  BYTE NumberOfAuxSymbols;
+} IMAGE_SYMBOL, *PIMAGE_SYMBOL;
 
 typedef struct _IMAGE_LINENUMBER {
-       union {
-               DWORD SymbolTableIndex;
-               DWORD VirtualAddress;
-       } Type;
-       WORD Linenumber;
-} IMAGE_LINENUMBER,*PIMAGE_LINENUMBER;
+  union {
+    DWORD SymbolTableIndex;
+    DWORD VirtualAddress;
+  } Type;
+  WORD Linenumber;
+} IMAGE_LINENUMBER, UNALIGNED *PIMAGE_LINENUMBER;
+
+typedef struct IMAGE_AUX_SYMBOL_TOKEN_DEF {
+  BYTE bAuxType;
+  BYTE bReserved;
+  DWORD SymbolTableIndex;
+  BYTE rgbReserved[12];
+} IMAGE_AUX_SYMBOL_TOKEN_DEF, UNALIGNED *PIMAGE_AUX_SYMBOL_TOKEN_DEF;
 
 typedef union _IMAGE_AUX_SYMBOL {
-       struct {
-               DWORD TagIndex;
-               union {
-                       struct {
-                               WORD Linenumber;
-                               WORD Size;
-                       } LnSz;
-                       DWORD TotalSize;
-               } Misc;
-               union {
-                       struct {
-                               DWORD PointerToLinenumber;
-                               DWORD PointerToNextFunction;
-                       } Function;
-                       struct {
-                               WORD Dimension[4];
-                       } Array;
-               } FcnAry;
-               WORD TvIndex;
-       } Sym;
-       struct {
-               BYTE Name[IMAGE_SIZEOF_SYMBOL];
-       } File;
-       struct {
-               DWORD Length;
-               WORD NumberOfRelocations;
-               WORD NumberOfLinenumbers;
-               DWORD CheckSum;
-               SHORT Number;
-               BYTE Selection;
-       } Section;
-} IMAGE_AUX_SYMBOL,*PIMAGE_AUX_SYMBOL;
+  struct {
+    DWORD TagIndex;
+    union {
+      struct {
+        WORD Linenumber;
+        WORD Size;
+      } LnSz;
+      DWORD TotalSize;
+    } Misc;
+    union {
+      struct {
+        DWORD PointerToLinenumber;
+        DWORD PointerToNextFunction;
+      } Function;
+      struct {
+        WORD Dimension[4];
+      } Array;
+    } FcnAry;
+    WORD TvIndex;
+  } Sym;
+  struct {
+    BYTE Name[IMAGE_SIZEOF_SYMBOL];
+  } File;
+  struct {
+    DWORD Length;
+    WORD NumberOfRelocations;
+    WORD NumberOfLinenumbers;
+    DWORD CheckSum;
+    SHORT Number;
+    BYTE Selection;
+    BYTE bReserved;
+    SHORT HighNumber;
+  } Section;
+  IMAGE_AUX_SYMBOL_TOKEN_DEF TokenDef;
+  struct {
+    DWORD crc;
+    BYTE rgbReserved[14];
+  } CRC;
+} IMAGE_AUX_SYMBOL, *PIMAGE_AUX_SYMBOL;
 
 typedef struct _IMAGE_RELOCATION {
-       _ANONYMOUS_UNION union {
-               DWORD VirtualAddress;
-               DWORD RelocCount;
-       } DUMMYUNIONNAME;
-       DWORD SymbolTableIndex;
-       WORD Type;
-} IMAGE_RELOCATION,*PIMAGE_RELOCATION;
+  _ANONYMOUS_UNION union {
+    DWORD VirtualAddress;
+    DWORD RelocCount;
+  } DUMMYUNIONNAME;
+  DWORD SymbolTableIndex;
+  WORD Type;
+} IMAGE_RELOCATION, UNALIGNED *PIMAGE_RELOCATION;
 
 #include <poppack.h>
 
 #ifndef __IMAGE_COR20_HEADER_DEFINED__
 #define __IMAGE_COR20_HEADER_DEFINED__
 
-typedef enum ReplacesCorHdrNumericDefines
-{
-    COMIMAGE_FLAGS_ILONLY           = 0x00000001,
-    COMIMAGE_FLAGS_32BITREQUIRED    = 0x00000002,
-    COMIMAGE_FLAGS_IL_LIBRARY       = 0x00000004,
-    COMIMAGE_FLAGS_STRONGNAMESIGNED = 0x00000008,
-    COMIMAGE_FLAGS_TRACKDEBUGDATA   = 0x00010000,
-
-    COR_VERSION_MAJOR_V2       = 2,
-    COR_VERSION_MAJOR          = COR_VERSION_MAJOR_V2,
-    COR_VERSION_MINOR          = 0,
-    COR_DELETED_NAME_LENGTH    = 8,
-    COR_VTABLEGAP_NAME_LENGTH  = 8,
-
-    NATIVE_TYPE_MAX_CB = 1,
-    COR_ILMETHOD_SECT_SMALL_MAX_DATASIZE = 0xff,
-
-    IMAGE_COR_MIH_METHODRVA  = 0x01,
-    IMAGE_COR_MIH_EHRVA      = 0x02,
-    IMAGE_COR_MIH_BASICBLOCK = 0x08,
-
-    COR_VTABLE_32BIT             = 0x01,
-    COR_VTABLE_64BIT             = 0x02,
-    COR_VTABLE_FROM_UNMANAGED    = 0x04,
-    COR_VTABLE_CALL_MOST_DERIVED = 0x10,
-
-    IMAGE_COR_EATJ_THUNK_SIZE = 32,
-
-    MAX_CLASS_NAME   = 1024,
-    MAX_PACKAGE_NAME = 1024,
+typedef enum ReplacesCorHdrNumericDefines {
+  COMIMAGE_FLAGS_ILONLY = 0x00000001,
+  COMIMAGE_FLAGS_32BITREQUIRED = 0x00000002,
+  COMIMAGE_FLAGS_IL_LIBRARY = 0x00000004,
+  COMIMAGE_FLAGS_STRONGNAMESIGNED = 0x00000008,
+  COMIMAGE_FLAGS_NATIVE_ENTRYPOINT = 0x00000010,
+  COMIMAGE_FLAGS_TRACKDEBUGDATA = 0x00010000,
+  COR_VERSION_MAJOR_V2 = 2,
+  COR_VERSION_MAJOR = COR_VERSION_MAJOR_V2,
+  COR_VERSION_MINOR = 0,
+  COR_DELETED_NAME_LENGTH = 8,
+  COR_VTABLEGAP_NAME_LENGTH = 8,
+  NATIVE_TYPE_MAX_CB = 1,
+  COR_ILMETHOD_SECT_SMALL_MAX_DATASIZE = 0xFF,
+  IMAGE_COR_MIH_METHODRVA = 0x01,
+  IMAGE_COR_MIH_EHRVA = 0x02,
+  IMAGE_COR_MIH_BASICBLOCK = 0x08,
+  COR_VTABLE_32BIT = 0x01,
+  COR_VTABLE_64BIT = 0x02,
+  COR_VTABLE_FROM_UNMANAGED = 0x04,
+  COR_VTABLE_FROM_UNMANAGED_RETAIN_APPDOMAIN = 0x08,
+  COR_VTABLE_CALL_MOST_DERIVED = 0x10,
+  IMAGE_COR_EATJ_THUNK_SIZE = 32,
+  MAX_CLASS_NAME = 1024,
+  MAX_PACKAGE_NAME = 1024
 } ReplacesCorHdrNumericDefines;
 
-typedef struct IMAGE_COR20_HEADER
-{
-    DWORD cb;
-    WORD  MajorRuntimeVersion;
-    WORD  MinorRuntimeVersion;
-
-    IMAGE_DATA_DIRECTORY MetaData;
-    DWORD Flags;
+typedef struct IMAGE_COR20_HEADER {
+  DWORD cb;
+  WORD MajorRuntimeVersion;
+  WORD MinorRuntimeVersion;
+  IMAGE_DATA_DIRECTORY MetaData;
+  DWORD Flags;
+  _ANONYMOUS_UNION union {
     DWORD EntryPointToken;
-
-    IMAGE_DATA_DIRECTORY Resources;
-    IMAGE_DATA_DIRECTORY StrongNameSignature;
-    IMAGE_DATA_DIRECTORY CodeManagerTable;
-    IMAGE_DATA_DIRECTORY VTableFixups;
-    IMAGE_DATA_DIRECTORY ExportAddressTableJumps;
-    IMAGE_DATA_DIRECTORY ManagedNativeHeader;
-
+    DWORD EntryPointRVA;
+  } DUMMYUNIONNAME;
+  IMAGE_DATA_DIRECTORY Resources;
+  IMAGE_DATA_DIRECTORY StrongNameSignature;
+  IMAGE_DATA_DIRECTORY CodeManagerTable;
+  IMAGE_DATA_DIRECTORY VTableFixups;
+  IMAGE_DATA_DIRECTORY ExportAddressTableJumps;
+  IMAGE_DATA_DIRECTORY ManagedNativeHeader;
 } IMAGE_COR20_HEADER, *PIMAGE_COR20_HEADER;
 
-#endif
+#endif /* __IMAGE_COR20_HEADER_DEFINED__ */
 
 typedef struct _IMAGE_COFF_SYMBOLS_HEADER {
-       DWORD NumberOfSymbols;
-       DWORD LvaToFirstSymbol;
-       DWORD NumberOfLinenumbers;
-       DWORD LvaToFirstLinenumber;
-       DWORD RvaToFirstByteOfCode;
-       DWORD RvaToLastByteOfCode;
-       DWORD RvaToFirstByteOfData;
-       DWORD RvaToLastByteOfData;
-} IMAGE_COFF_SYMBOLS_HEADER,*PIMAGE_COFF_SYMBOLS_HEADER;
+  DWORD NumberOfSymbols;
+  DWORD LvaToFirstSymbol;
+  DWORD NumberOfLinenumbers;
+  DWORD LvaToFirstLinenumber;
+  DWORD RvaToFirstByteOfCode;
+  DWORD RvaToLastByteOfCode;
+  DWORD RvaToFirstByteOfData;
+  DWORD RvaToLastByteOfData;
+} IMAGE_COFF_SYMBOLS_HEADER, *PIMAGE_COFF_SYMBOLS_HEADER;
 
 typedef struct _IMAGE_BASE_RELOCATION {
-       DWORD VirtualAddress;
-       DWORD SizeOfBlock;
-} IMAGE_BASE_RELOCATION,*PIMAGE_BASE_RELOCATION;
+  DWORD VirtualAddress;
+  DWORD SizeOfBlock;
+} IMAGE_BASE_RELOCATION, UNALIGNED *PIMAGE_BASE_RELOCATION;
 
 typedef struct _IMAGE_ARCHIVE_MEMBER_HEADER {
-       BYTE Name[16];
-       BYTE Date[12];
-       BYTE UserID[6];
-       BYTE GroupID[6];
-       BYTE Mode[8];
-       BYTE Size[10];
-       BYTE EndHeader[2];
-} IMAGE_ARCHIVE_MEMBER_HEADER,*PIMAGE_ARCHIVE_MEMBER_HEADER;
+  BYTE Name[16];
+  BYTE Date[12];
+  BYTE UserID[6];
+  BYTE GroupID[6];
+  BYTE Mode[8];
+  BYTE Size[10];
+  BYTE EndHeader[2];
+} IMAGE_ARCHIVE_MEMBER_HEADER, *PIMAGE_ARCHIVE_MEMBER_HEADER;
 
 typedef struct _IMAGE_EXPORT_DIRECTORY {
-       DWORD Characteristics;
-       DWORD TimeDateStamp;
-       WORD MajorVersion;
-       WORD MinorVersion;
-       DWORD Name;
-       DWORD Base;
-       DWORD NumberOfFunctions;
-       DWORD NumberOfNames;
-       DWORD AddressOfFunctions;
-       DWORD AddressOfNames;
-       DWORD AddressOfNameOrdinals;
-} IMAGE_EXPORT_DIRECTORY,*PIMAGE_EXPORT_DIRECTORY;
+  DWORD Characteristics;
+  DWORD TimeDateStamp;
+  WORD MajorVersion;
+  WORD MinorVersion;
+  DWORD Name;
+  DWORD Base;
+  DWORD NumberOfFunctions;
+  DWORD NumberOfNames;
+  DWORD AddressOfFunctions;
+  DWORD AddressOfNames;
+  DWORD AddressOfNameOrdinals;
+} IMAGE_EXPORT_DIRECTORY, *PIMAGE_EXPORT_DIRECTORY;
 
 typedef struct _IMAGE_IMPORT_BY_NAME {
-       WORD Hint;
-       BYTE Name[1];
-} IMAGE_IMPORT_BY_NAME,*PIMAGE_IMPORT_BY_NAME;
+  WORD Hint;
+  BYTE Name[1];
+} IMAGE_IMPORT_BY_NAME, *PIMAGE_IMPORT_BY_NAME;
 
 #include <pshpack8.h>
 typedef struct _IMAGE_THUNK_DATA64 {
-    union {
-        ULONGLONG ForwarderString;
-        ULONGLONG Function;
-        ULONGLONG Ordinal;
-        ULONGLONG AddressOfData;
-    } u1;
-} IMAGE_THUNK_DATA64;
-typedef IMAGE_THUNK_DATA64 *PIMAGE_THUNK_DATA64;
+  union {
+    ULONGLONG ForwarderString;
+    ULONGLONG Function;
+    ULONGLONG Ordinal;
+    ULONGLONG AddressOfData;
+  } u1;
+} IMAGE_THUNK_DATA64, *PIMAGE_THUNK_DATA64;
 #include <poppack.h>
 
 typedef struct _IMAGE_THUNK_DATA32 {
-    union {
-        DWORD ForwarderString;
-        DWORD Function;
-        DWORD Ordinal;
-        DWORD AddressOfData;
-    } u1;
-} IMAGE_THUNK_DATA32;
-typedef IMAGE_THUNK_DATA32 *PIMAGE_THUNK_DATA32;
+  union {
+    DWORD ForwarderString;
+    DWORD Function;
+    DWORD Ordinal;
+    DWORD AddressOfData;
+  } u1;
+} IMAGE_THUNK_DATA32, *PIMAGE_THUNK_DATA32;
 
 #define IMAGE_ORDINAL_FLAG64 0x8000000000000000ULL
 #define IMAGE_ORDINAL_FLAG32 0x80000000
@@ -4035,24 +4085,23 @@ typedef VOID
 (NTAPI *PIMAGE_TLS_CALLBACK)(PVOID DllHandle,DWORD Reason,PVOID Reserved);
 
 typedef struct _IMAGE_TLS_DIRECTORY64 {
-    ULONGLONG StartAddressOfRawData;
-    ULONGLONG EndAddressOfRawData;
-    ULONGLONG AddressOfIndex;
-    ULONGLONG AddressOfCallBacks;
-    DWORD SizeOfZeroFill;
-    DWORD Characteristics;
-} IMAGE_TLS_DIRECTORY64;
-typedef IMAGE_TLS_DIRECTORY64 *PIMAGE_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;
-typedef IMAGE_TLS_DIRECTORY32 *PIMAGE_TLS_DIRECTORY32;
+  DWORD StartAddressOfRawData;
+  DWORD EndAddressOfRawData;
+  DWORD AddressOfIndex;
+  DWORD AddressOfCallBacks;
+  DWORD SizeOfZeroFill;
+  DWORD Characteristics;
+} IMAGE_TLS_DIRECTORY32, *PIMAGE_TLS_DIRECTORY32;
+
 #ifdef _WIN64
 #define IMAGE_ORDINAL_FLAG IMAGE_ORDINAL_FLAG64
 #define IMAGE_ORDINAL(Ordinal) IMAGE_ORDINAL64(Ordinal)
@@ -4072,181 +4121,208 @@ typedef PIMAGE_TLS_DIRECTORY32 PIMAGE_TLS_DIRECTORY;
 #endif
 
 typedef struct _IMAGE_IMPORT_DESCRIPTOR {
-       _ANONYMOUS_UNION union {
-               DWORD Characteristics;
-               ULONG OriginalFirstThunk;
-       } DUMMYUNIONNAME;
-       DWORD TimeDateStamp;
-       DWORD ForwarderChain;
-       DWORD Name;
-       ULONG FirstThunk;
-} IMAGE_IMPORT_DESCRIPTOR,*PIMAGE_IMPORT_DESCRIPTOR;
+  _ANONYMOUS_UNION union {
+    DWORD Characteristics;
+    DWORD OriginalFirstThunk;
+  } DUMMYUNIONNAME;
+  DWORD TimeDateStamp;
+  DWORD ForwarderChain;
+  DWORD Name;
+  DWORD FirstThunk;
+} IMAGE_IMPORT_DESCRIPTOR, UNALIGNED *PIMAGE_IMPORT_DESCRIPTOR;
 
 typedef struct _IMAGE_BOUND_IMPORT_DESCRIPTOR {
-       DWORD TimeDateStamp;
-       WORD OffsetModuleName;
-       WORD NumberOfModuleForwarderRefs;
-} IMAGE_BOUND_IMPORT_DESCRIPTOR,*PIMAGE_BOUND_IMPORT_DESCRIPTOR;
+  DWORD TimeDateStamp;
+  WORD OffsetModuleName;
+  WORD NumberOfModuleForwarderRefs;
+} IMAGE_BOUND_IMPORT_DESCRIPTOR, *PIMAGE_BOUND_IMPORT_DESCRIPTOR;
 
 typedef struct _IMAGE_BOUND_FORWARDER_REF {
-       DWORD TimeDateStamp;
-       WORD OffsetModuleName;
-       WORD Reserved;
-} IMAGE_BOUND_FORWARDER_REF,*PIMAGE_BOUND_FORWARDER_REF;
+  DWORD TimeDateStamp;
+  WORD OffsetModuleName;
+  WORD Reserved;
+} IMAGE_BOUND_FORWARDER_REF, *PIMAGE_BOUND_FORWARDER_REF;
 
 typedef struct _IMAGE_RESOURCE_DIRECTORY {
-       DWORD Characteristics;
-       DWORD TimeDateStamp;
-       WORD MajorVersion;
-       WORD MinorVersion;
-       WORD NumberOfNamedEntries;
-       WORD NumberOfIdEntries;
-} IMAGE_RESOURCE_DIRECTORY,*PIMAGE_RESOURCE_DIRECTORY;
-_ANONYMOUS_STRUCT typedef struct _IMAGE_RESOURCE_DIRECTORY_ENTRY {
-       _ANONYMOUS_UNION union {
-               _ANONYMOUS_STRUCT struct {
-                       DWORD NameOffset:31;
-                       DWORD NameIsString:1;
-               }DUMMYSTRUCTNAME1;
-               DWORD Name;
-               _ANONYMOUS_STRUCT struct {
-                       WORD Id;
-                       WORD __pad;
-               }DUMMYSTRUCTNAME2;
-       } DUMMYUNIONNAME1;
-       _ANONYMOUS_UNION union {
-               DWORD OffsetToData;
-               _ANONYMOUS_STRUCT struct {
-                       DWORD OffsetToDirectory:31;
-                       DWORD DataIsDirectory:1;
-               } DUMMYSTRUCTNAME3;
-       } DUMMYUNIONNAME2;
-} IMAGE_RESOURCE_DIRECTORY_ENTRY,*PIMAGE_RESOURCE_DIRECTORY_ENTRY;
+  DWORD Characteristics;
+  DWORD TimeDateStamp;
+  WORD MajorVersion;
+  WORD MinorVersion;
+  WORD NumberOfNamedEntries;
+  WORD NumberOfIdEntries;
+} IMAGE_RESOURCE_DIRECTORY, *PIMAGE_RESOURCE_DIRECTORY;
+
+typedef struct _IMAGE_RESOURCE_DIRECTORY_ENTRY {
+  _ANONYMOUS_UNION union {
+    _ANONYMOUS_STRUCT struct {
+      DWORD NameOffset:31;
+      DWORD NameIsString:1;
+    } DUMMYSTRUCTNAME;
+    DWORD Name;
+    WORD Id;
+  } DUMMYUNIONNAME;
+  _ANONYMOUS_UNION union {
+    DWORD OffsetToData;
+    _ANONYMOUS_STRUCT struct {
+      DWORD OffsetToDirectory:31;
+      DWORD DataIsDirectory:1;
+    } DUMMYSTRUCTNAME;
+  } DUMMYUNIONNAME2;
+} IMAGE_RESOURCE_DIRECTORY_ENTRY, *PIMAGE_RESOURCE_DIRECTORY_ENTRY;
 
 typedef struct _IMAGE_RESOURCE_DIRECTORY_STRING {
-       WORD Length;
-       CHAR NameString[1];
-} IMAGE_RESOURCE_DIRECTORY_STRING,*PIMAGE_RESOURCE_DIRECTORY_STRING;
+  WORD Length;
+  CHAR NameString[1];
+} IMAGE_RESOURCE_DIRECTORY_STRING, *PIMAGE_RESOURCE_DIRECTORY_STRING;
 
 typedef struct _IMAGE_RESOURCE_DIR_STRING_U {
-       WORD Length;
-       WCHAR NameString[1];
-} IMAGE_RESOURCE_DIR_STRING_U,*PIMAGE_RESOURCE_DIR_STRING_U;
+  WORD Length;
+  WCHAR NameString[1];
+} IMAGE_RESOURCE_DIR_STRING_U, *PIMAGE_RESOURCE_DIR_STRING_U;
 
 typedef struct _IMAGE_RESOURCE_DATA_ENTRY {
-       DWORD OffsetToData;
-       DWORD Size;
-       DWORD CodePage;
-       DWORD Reserved;
-} IMAGE_RESOURCE_DATA_ENTRY,*PIMAGE_RESOURCE_DATA_ENTRY;
-
-typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY {
-    DWORD Size;
-    DWORD TimeDateStamp;
-    WORD MajorVersion;
-    WORD MinorVersion;
-    DWORD GlobalFlagsClear;
-    DWORD GlobalFlagsSet;
-    DWORD CriticalSectionDefaultTimeout;
-    DWORD DeCommitFreeBlockThreshold;
-    DWORD DeCommitTotalFreeThreshold;
-    DWORD LockPrefixTable;
-    DWORD MaximumAllocationSize;
-    DWORD VirtualMemoryThreshold;
-    DWORD ProcessHeapFlags;
-    DWORD ProcessAffinityMask;
-    WORD CSDVersion;
-    WORD Reserved1;
-    DWORD EditList;
-    DWORD SecurityCookie;
-    DWORD SEHandlerTable;
-    DWORD SEHandlerCount;
-} IMAGE_LOAD_CONFIG_DIRECTORY,*PIMAGE_LOAD_CONFIG_DIRECTORY;
+  DWORD OffsetToData;
+  DWORD Size;
+  DWORD CodePage;
+  DWORD Reserved;
+} IMAGE_RESOURCE_DATA_ENTRY, *PIMAGE_RESOURCE_DATA_ENTRY;
+
+typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY32 {
+  DWORD Size;
+  DWORD TimeDateStamp;
+  WORD MajorVersion;
+  WORD MinorVersion;
+  DWORD GlobalFlagsClear;
+  DWORD GlobalFlagsSet;
+  DWORD CriticalSectionDefaultTimeout;
+  DWORD DeCommitFreeBlockThreshold;
+  DWORD DeCommitTotalFreeThreshold;
+  DWORD LockPrefixTable;
+  DWORD MaximumAllocationSize;
+  DWORD VirtualMemoryThreshold;
+  DWORD ProcessHeapFlags;
+  DWORD ProcessAffinityMask;
+  WORD CSDVersion;
+  WORD Reserved1;
+  DWORD EditList;
+  DWORD SecurityCookie;
+  DWORD SEHandlerTable;
+  DWORD SEHandlerCount;
+} IMAGE_LOAD_CONFIG_DIRECTORY32, *PIMAGE_LOAD_CONFIG_DIRECTORY32;
+
+typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY64 {
+  DWORD Size;
+  DWORD TimeDateStamp;
+  WORD MajorVersion;
+  WORD MinorVersion;
+  DWORD GlobalFlagsClear;
+  DWORD GlobalFlagsSet;
+  DWORD CriticalSectionDefaultTimeout;
+  ULONGLONG DeCommitFreeBlockThreshold;
+  ULONGLONG DeCommitTotalFreeThreshold;
+  ULONGLONG LockPrefixTable;
+  ULONGLONG MaximumAllocationSize;
+  ULONGLONG VirtualMemoryThreshold;
+  ULONGLONG ProcessAffinityMask;
+  DWORD ProcessHeapFlags;
+  WORD CSDVersion;
+  WORD Reserved1;
+  ULONGLONG EditList;
+  ULONGLONG SecurityCookie;
+  ULONGLONG SEHandlerTable;
+  ULONGLONG SEHandlerCount;
+} IMAGE_LOAD_CONFIG_DIRECTORY64, *PIMAGE_LOAD_CONFIG_DIRECTORY64;
+
+#ifdef _WIN64
+typedef IMAGE_LOAD_CONFIG_DIRECTORY64 IMAGE_LOAD_CONFIG_DIRECTORY;
+typedef PIMAGE_LOAD_CONFIG_DIRECTORY64 PIMAGE_LOAD_CONFIG_DIRECTORY;
+#else
+typedef IMAGE_LOAD_CONFIG_DIRECTORY32 IMAGE_LOAD_CONFIG_DIRECTORY;
+typedef PIMAGE_LOAD_CONFIG_DIRECTORY32 PIMAGE_LOAD_CONFIG_DIRECTORY;
+#endif
 
 typedef struct _IMAGE_RUNTIME_FUNCTION_ENTRY {
-       DWORD BeginAddress;
-       DWORD EndAddress;
-       PVOID ExceptionHandler;
-       PVOID HandlerData;
-       DWORD PrologEndAddress;
-} IMAGE_RUNTIME_FUNCTION_ENTRY,*PIMAGE_RUNTIME_FUNCTION_ENTRY;
+  DWORD BeginAddress;
+  DWORD EndAddress;
+  DWORD UnwindInfoAddress;
+} IMAGE_RUNTIME_FUNCTION_ENTRY, *PIMAGE_RUNTIME_FUNCTION_ENTRY;
 
 typedef struct _IMAGE_DEBUG_DIRECTORY {
-       DWORD Characteristics;
-       DWORD TimeDateStamp;
-       WORD MajorVersion;
-       WORD MinorVersion;
-       DWORD Type;
-       DWORD SizeOfData;
-       DWORD AddressOfRawData;
-       DWORD PointerToRawData;
-} IMAGE_DEBUG_DIRECTORY,*PIMAGE_DEBUG_DIRECTORY;
+  DWORD Characteristics;
+  DWORD TimeDateStamp;
+  WORD MajorVersion;
+  WORD MinorVersion;
+  DWORD Type;
+  DWORD SizeOfData;
+  DWORD AddressOfRawData;
+  DWORD PointerToRawData;
+} IMAGE_DEBUG_DIRECTORY, *PIMAGE_DEBUG_DIRECTORY;
 
 typedef struct _FPO_DATA {
-       DWORD ulOffStart;
-       DWORD cbProcSize;
-       DWORD cdwLocals;
-       WORD cdwParams;
-       WORD cbProlog:8;
-       WORD cbRegs:3;
-       WORD fHasSEH:1;
-       WORD fUseBP:1;
-       WORD reserved:1;
-       WORD cbFrame:2;
-} FPO_DATA,*PFPO_DATA;
+  DWORD ulOffStart;
+  DWORD cbProcSize;
+  DWORD cdwLocals;
+  WORD cdwParams;
+  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_DEBUG_MISC {
-       DWORD DataType;
-       DWORD Length;
-       BOOLEAN Unicode;
-       BYTE Reserved[3];
-       BYTE Data[1];
-} IMAGE_DEBUG_MISC,*PIMAGE_DEBUG_MISC;
+  DWORD DataType;
+  DWORD Length;
+  BOOLEAN Unicode;
+  BYTE Reserved[3];
+  BYTE Data[1];
+} IMAGE_DEBUG_MISC, *PIMAGE_DEBUG_MISC;
 
 typedef struct _IMAGE_FUNCTION_ENTRY {
-       DWORD StartingAddress;
-       DWORD EndingAddress;
-       DWORD EndOfPrologue;
-} IMAGE_FUNCTION_ENTRY,*PIMAGE_FUNCTION_ENTRY;
+  DWORD StartingAddress;
+  DWORD EndingAddress;
+  DWORD EndOfPrologue;
+} IMAGE_FUNCTION_ENTRY, *PIMAGE_FUNCTION_ENTRY;
 
 typedef struct _IMAGE_SEPARATE_DEBUG_HEADER {
-       WORD Signature;
-       WORD Flags;
-       WORD Machine;
-       WORD Characteristics;
-       DWORD TimeDateStamp;
-       DWORD CheckSum;
-       DWORD ImageBase;
-       DWORD SizeOfImage;
-       DWORD NumberOfSections;
-       DWORD ExportedNamesSize;
-       DWORD DebugDirectorySize;
-       DWORD SectionAlignment;
-       DWORD Reserved[2];
-} IMAGE_SEPARATE_DEBUG_HEADER,*PIMAGE_SEPARATE_DEBUG_HEADER;
+  WORD Signature;
+  WORD Flags;
+  WORD Machine;
+  WORD Characteristics;
+  DWORD TimeDateStamp;
+  DWORD CheckSum;
+  DWORD ImageBase;
+  DWORD SizeOfImage;
+  DWORD NumberOfSections;
+  DWORD ExportedNamesSize;
+  DWORD DebugDirectorySize;
+  DWORD SectionAlignment;
+  DWORD Reserved[2];
+} IMAGE_SEPARATE_DEBUG_HEADER, *PIMAGE_SEPARATE_DEBUG_HEADER;
 
 typedef enum _CM_SERVICE_NODE_TYPE {
-       DriverType=SERVICE_KERNEL_DRIVER,
-       FileSystemType=SERVICE_FILE_SYSTEM_DRIVER,
-       Win32ServiceOwnProcess=SERVICE_WIN32_OWN_PROCESS,
-       Win32ServiceShareProcess=SERVICE_WIN32_SHARE_PROCESS,
-       AdapterType=SERVICE_ADAPTER,
-       RecognizerType=SERVICE_RECOGNIZER_DRIVER
+  DriverType = SERVICE_KERNEL_DRIVER,
+  FileSystemType = SERVICE_FILE_SYSTEM_DRIVER,
+  Win32ServiceOwnProcess = SERVICE_WIN32_OWN_PROCESS,
+  Win32ServiceShareProcess = SERVICE_WIN32_SHARE_PROCESS,
+  AdapterType = SERVICE_ADAPTER,
+  RecognizerType = SERVICE_RECOGNIZER_DRIVER
 } SERVICE_NODE_TYPE;
 
 typedef enum _CM_SERVICE_LOAD_TYPE {
-       BootLoad=SERVICE_BOOT_START,
-       SystemLoad=SERVICE_SYSTEM_START,
-       AutoLoad=SERVICE_AUTO_START,
-       DemandLoad=SERVICE_DEMAND_START,
-       DisableLoad=SERVICE_DISABLED
+  BootLoad = SERVICE_BOOT_START,
+  SystemLoad = SERVICE_SYSTEM_START,
+  AutoLoad = SERVICE_AUTO_START,
+  DemandLoad = SERVICE_DEMAND_START,
+  DisableLoad = SERVICE_DISABLED
 } SERVICE_LOAD_TYPE;
 
 typedef enum _CM_ERROR_CONTROL_TYPE {
-       IgnoreError=SERVICE_ERROR_IGNORE,
-       NormalError=SERVICE_ERROR_NORMAL,
-       SevereError=SERVICE_ERROR_SEVERE,
-       CriticalError=SERVICE_ERROR_CRITICAL
+  IgnoreError = SERVICE_ERROR_IGNORE,
+  NormalError = SERVICE_ERROR_NORMAL,
+  SevereError = SERVICE_ERROR_SEVERE,
+  CriticalError = SERVICE_ERROR_CRITICAL
 } SERVICE_ERROR_TYPE;
 
 typedef struct _NT_TIB {
@@ -4503,9 +4579,9 @@ typedef struct {
 #endif
 
 typedef struct _POWER_ACTION_POLICY {
-       POWER_ACTION  Action;
-       ULONG  Flags;
-       ULONG  EventCode;
+  POWER_ACTION Action;
+  DWORD Flags;
+  DWORD EventCode;
 } POWER_ACTION_POLICY, *PPOWER_ACTION_POLICY;
 
 /* POWER_ACTION_POLICY.Flags constants */
@@ -4536,87 +4612,93 @@ typedef struct _POWER_ACTION_POLICY {
 #define PO_THROTTLE_MAXIMUM    4
 
 typedef struct _SYSTEM_POWER_LEVEL {
-       BOOLEAN  Enable;
-       UCHAR  Spare[3];
-       ULONG  BatteryLevel;
-       POWER_ACTION_POLICY  PowerPolicy;
-       SYSTEM_POWER_STATE  MinSystemState;
+  BOOLEAN Enable;
+  BYTE Spare[3];
+  DWORD 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;
+  DWORD Revision;
+  POWER_ACTION_POLICY PowerButton;
+  POWER_ACTION_POLICY SleepButton;
+  POWER_ACTION_POLICY LidClose;
+  SYSTEM_POWER_STATE LidOpenWake;
+  DWORD Reserved;
+  POWER_ACTION_POLICY Idle;
+  DWORD IdleTimeout;
+  BYTE IdleSensitivity;
+  BYTE DynamicThrottle;
+  BYTE Spare2[2];
+  SYSTEM_POWER_STATE MinSleep;
+  SYSTEM_POWER_STATE MaxSleep;
+  SYSTEM_POWER_STATE ReducedLatencySleep;
+  DWORD WinLogonFlags;
+  DWORD Spare3;
+  DWORD DozeS4Timeout;
+  DWORD BroadcastCapacityResolution;
+  SYSTEM_POWER_LEVEL DischargePolicy[NUM_DISCHARGE_POLICIES];
+  DWORD VideoTimeout;
+  BOOLEAN VideoDimDisplay;
+  DWORD VideoReserved[3];
+  DWORD SpindownTimeout;
+  BOOLEAN OptimizeForPower;
+  BYTE FanThrottleTolerance;
+  BYTE ForcedThrottle;
+  BYTE MinThrottle;
+  POWER_ACTION_POLICY OverThrottled;
 } SYSTEM_POWER_POLICY, *PSYSTEM_POWER_POLICY;
 
 typedef struct _SYSTEM_POWER_CAPABILITIES {
-       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;
+  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;
+  BYTE ProcessorMinThrottle;
+#if (NTDDI_VERSION < NTDDI_WINXP)
+  BYTE ProcessorThrottleScale;
+  BYTE spare2[4];
+#else
+  BYTE ProcessorMaxThrottle;
+  BOOLEAN FastSystemS4;
+  BYTE spare2[3];
+#endif /* (NTDDI_VERSION < NTDDI_WINXP) */
+  BOOLEAN DiskSpinDown;
+  BYTE 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_BATTERY_STATE {
-       BOOLEAN  AcOnLine;
-       BOOLEAN  BatteryPresent;
-       BOOLEAN  Charging;
-       BOOLEAN  Discharging;
-       BOOLEAN  Spare1[4];
-       ULONG  MaxCapacity;
-       ULONG  RemainingCapacity;
-       ULONG  Rate;
-       ULONG  EstimatedTime;
-       ULONG  DefaultAlert1;
-       ULONG  DefaultAlert2;
+  BOOLEAN AcOnLine;
+  BOOLEAN BatteryPresent;
+  BOOLEAN Charging;
+  BOOLEAN Discharging;
+  BOOLEAN Spare1[4];
+  DWORD MaxCapacity;
+  DWORD RemainingCapacity;
+  DWORD Rate;
+  DWORD EstimatedTime;
+  DWORD DefaultAlert1;
+  DWORD DefaultAlert2;
 } SYSTEM_BATTERY_STATE, *PSYSTEM_BATTERY_STATE;
 
 typedef struct _PROCESSOR_POWER_INFORMATION {
@@ -4704,59 +4786,71 @@ typedef enum _AUDIT_EVENT_TYPE {
 #endif
 
 #if (_WIN32_WINNT >= 0x0501)
+
 typedef enum _ACTIVATION_CONTEXT_INFO_CLASS {
-       ActivationContextBasicInformation = 1,
-       ActivationContextDetailedInformation,
-       AssemblyDetailedInformationInActivationContext,
-       FileInformationInAssemblyOfAssemblyInActivationContext
+  ActivationContextBasicInformation = 1,
+  ActivationContextDetailedInformation = 2,
+  AssemblyDetailedInformationInActivationContext = 3,
+  FileInformationInAssemblyOfAssemblyInActivationContext = 4,
+  RunlevelInformationInActivationContext = 5,
+  CompatibilityInformationInActivationContext = 6,
+  ActivationContextManifestResourceName = 7,
+  MaxActivationContextInfoClass,
+/* For compatibility with the old names */
+  AssemblyDetailedInformationInActivationContxt = 3,
+  FileInformationInAssemblyOfAssemblyInActivationContxt = 4
 } ACTIVATION_CONTEXT_INFO_CLASS;
+
 typedef struct _ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION {
-       DWORD ulFlags;
-       DWORD ulEncodedAssemblyIdentityLength;
-       DWORD ulManifestPathType;
-       DWORD ulManifestPathLength;
-       LARGE_INTEGER liManifestLastWriteTime;
-       DWORD ulPolicyPathType;
-       DWORD ulPolicyPathLength;
-       LARGE_INTEGER liPolicyLastWriteTime;
-       DWORD ulMetadataSatelliteRosterIndex;
-       DWORD ulManifestVersionMajor;
-       DWORD ulManifestVersionMinor;
-       DWORD ulPolicyVersionMajor;
-       DWORD ulPolicyVersionMinor;
-       DWORD ulAssemblyDirectoryNameLength;
-       PCWSTR lpAssemblyEncodedAssemblyIdentity;
-       PCWSTR lpAssemblyManifestPath;
-       PCWSTR lpAssemblyPolicyPath;
-       PCWSTR lpAssemblyDirectoryName;
-} ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION,*PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION;
+  DWORD ulFlags;
+  DWORD ulEncodedAssemblyIdentityLength;
+  DWORD ulManifestPathType;
+  DWORD ulManifestPathLength;
+  LARGE_INTEGER liManifestLastWriteTime;
+  DWORD ulPolicyPathType;
+  DWORD ulPolicyPathLength;
+  LARGE_INTEGER liPolicyLastWriteTime;
+  DWORD ulMetadataSatelliteRosterIndex;
+  DWORD ulManifestVersionMajor;
+  DWORD ulManifestVersionMinor;
+  DWORD ulPolicyVersionMajor;
+  DWORD ulPolicyVersionMinor;
+  DWORD ulAssemblyDirectoryNameLength;
+  PCWSTR lpAssemblyEncodedAssemblyIdentity;
+  PCWSTR lpAssemblyManifestPath;
+  PCWSTR lpAssemblyPolicyPath;
+  PCWSTR lpAssemblyDirectoryName;
+} ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION, *PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION;
 typedef const ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION *PCACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION;
+
 typedef struct _ACTIVATION_CONTEXT_DETAILED_INFORMATION {
-       DWORD dwFlags;
-       DWORD ulFormatVersion;
-       DWORD ulAssemblyCount;
-       DWORD ulRootManifestPathType;
-       DWORD ulRootManifestPathChars;
-       DWORD ulRootConfigurationPathType;
-       DWORD ulRootConfigurationPathChars;
-       DWORD ulAppDirPathType;
-       DWORD ulAppDirPathChars;
-       PCWSTR lpRootManifestPath;
-       PCWSTR lpRootConfigurationPath;
-       PCWSTR lpAppDirPath;
-} ACTIVATION_CONTEXT_DETAILED_INFORMATION,*PACTIVATION_CONTEXT_DETAILED_INFORMATION;
+  DWORD dwFlags;
+  DWORD ulFormatVersion;
+  DWORD ulAssemblyCount;
+  DWORD ulRootManifestPathType;
+  DWORD ulRootManifestPathChars;
+  DWORD ulRootConfigurationPathType;
+  DWORD ulRootConfigurationPathChars;
+  DWORD ulAppDirPathType;
+  DWORD ulAppDirPathChars;
+  PCWSTR lpRootManifestPath;
+  PCWSTR lpRootConfigurationPath;
+  PCWSTR lpAppDirPath;
+} ACTIVATION_CONTEXT_DETAILED_INFORMATION, *PACTIVATION_CONTEXT_DETAILED_INFORMATION;
 typedef const ACTIVATION_CONTEXT_DETAILED_INFORMATION *PCACTIVATION_CONTEXT_DETAILED_INFORMATION;
+
 typedef struct _ACTIVATION_CONTEXT_QUERY_INDEX {
-       ULONG ulAssemblyIndex;
-       ULONG ulFileIndexInAssembly;
+  DWORD ulAssemblyIndex;
+  DWORD ulFileIndexInAssembly;
 } ACTIVATION_CONTEXT_QUERY_INDEX,*PACTIVATION_CONTEXT_QUERY_INDEX;
 typedef const ACTIVATION_CONTEXT_QUERY_INDEX *PCACTIVATION_CONTEXT_QUERY_INDEX;
+
 typedef struct _ASSEMBLY_FILE_DETAILED_INFORMATION {
-       DWORD ulFlags;
-       DWORD ulFilenameLength;
-       DWORD ulPathLength;
-       PCWSTR lpFileName;
-       PCWSTR lpFilePath;
+  DWORD ulFlags;
+  DWORD ulFilenameLength;
+  DWORD ulPathLength;
+  PCWSTR lpFileName;
+  PCWSTR lpFilePath;
 } ASSEMBLY_FILE_DETAILED_INFORMATION,*PASSEMBLY_FILE_DETAILED_INFORMATION;
 typedef const ASSEMBLY_FILE_DETAILED_INFORMATION *PCASSEMBLY_FILE_DETAILED_INFORMATION;
 
@@ -4778,32 +4872,36 @@ typedef const ASSEMBLY_FILE_DETAILED_INFORMATION *PCASSEMBLY_FILE_DETAILED_INFOR
 #endif /* (WIN32_WINNT >= 0x0501) */
 
 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;
+  DWORD TimeCheck;
+  DWORD DemoteLimit;
+  DWORD PromoteLimit;
+  BYTE DemotePercent;
+  BYTE PromotePercent;
+  BYTE Spare[2];
+  DWORD AllowDemotion:1;
+  DWORD AllowPromotion:1;
+  DWORD Reserved:30;
 } PROCESSOR_POWER_POLICY_INFO, *PPROCESSOR_POWER_POLICY_INFO;
+
 typedef struct _PROCESSOR_POWER_POLICY {
-       ULONG  Revision;
-       UCHAR  DynamicThrottle;
-       UCHAR  Spare[3];
-       ULONG  Reserved;
-       ULONG  PolicyCount;
-       PROCESSOR_POWER_POLICY_INFO  Policy[3];
+  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 _ADMINISTRATOR_POWER_POLICY {
-       SYSTEM_POWER_STATE  MinSleep;
-       SYSTEM_POWER_STATE  MaxSleep;
-       ULONG  MinVideoTimeout;
-       ULONG  MaxVideoTimeout;
-       ULONG  MinSpindownTimeout;
-       ULONG  MaxSpindownTimeout;
+  SYSTEM_POWER_STATE MinSleep;
+  SYSTEM_POWER_STATE MaxSleep;
+  DWORD MinVideoTimeout;
+  DWORD MaxVideoTimeout;
+  DWORD MinSpindownTimeout;
+  DWORD MaxSpindownTimeout;
 } ADMINISTRATOR_POWER_POLICY, *PADMINISTRATOR_POWER_POLICY;
+
 #endif /* WINVER >= 0x0500 */
 
 typedef VOID (NTAPI *WAITORTIMERCALLBACKFUNC)(PVOID,BOOLEAN);
@@ -4823,9 +4921,8 @@ ULONGLONG WINAPI VerSetConditionMask(ULONGLONG,DWORD,BYTE);
 #endif
 
 typedef enum _HEAP_INFORMATION_CLASS {
-
-    HeapCompatibilityInformation
-
+  HeapCompatibilityInformation,
+  HeapEnableTerminationOnCorruption
 } HEAP_INFORMATION_CLASS;
 
 NTSYSAPI