Sync with trunk (r48545)
[reactos.git] / include / ddk / ntimage.h
index 8df9847..2dac14a 100644 (file)
 #define IMAGE_FILE_MACHINE_CEF        0x0CEF
 
 
-
 //
 // DOS Image Header Format
 //
 #include <pshpack2.h>
 typedef struct _IMAGE_DOS_HEADER {
-    USHORT e_magic;
-    USHORT e_cblp;
-    USHORT e_cp;
-    USHORT e_crlc;
-    USHORT e_cparhdr;
-    USHORT e_minalloc;
-    USHORT e_maxalloc;
-    USHORT e_ss;
-    USHORT e_sp;
-    USHORT e_csum;
-    USHORT e_ip;
-    USHORT e_cs;
-    USHORT e_lfarlc;
-    USHORT e_ovno;
-    USHORT e_res[4];
-    USHORT e_oemid;
-    USHORT e_oeminfo;
-    USHORT e_res2[10];
-    LONG e_lfanew;
+  USHORT e_magic;
+  USHORT e_cblp;
+  USHORT e_cp;
+  USHORT e_crlc;
+  USHORT e_cparhdr;
+  USHORT e_minalloc;
+  USHORT e_maxalloc;
+  USHORT e_ss;
+  USHORT e_sp;
+  USHORT e_csum;
+  USHORT e_ip;
+  USHORT e_cs;
+  USHORT e_lfarlc;
+  USHORT e_ovno;
+  USHORT e_res[4];
+  USHORT e_oemid;
+  USHORT e_oeminfo;
+  USHORT e_res2[10];
+  LONG e_lfanew;
 } IMAGE_DOS_HEADER, *PIMAGE_DOS_HEADER;
 #include <poppack.h>
 
-
-
 //
 // Export/Import Format
 //
 #include <pshpack4.h>
 typedef struct _IMAGE_EXPORT_DIRECTORY {
-    ULONG Characteristics;
-    ULONG TimeDateStamp;
-    USHORT MajorVersion;
-    USHORT MinorVersion;
-    ULONG Name;
-    ULONG Base;
-    ULONG NumberOfFunctions;
-    ULONG NumberOfNames;
-    ULONG AddressOfFunctions;
-    ULONG AddressOfNames;
-    ULONG AddressOfNameOrdinals;
+  ULONG Characteristics;
+  ULONG TimeDateStamp;
+  USHORT MajorVersion;
+  USHORT MinorVersion;
+  ULONG Name;
+  ULONG Base;
+  ULONG NumberOfFunctions;
+  ULONG NumberOfNames;
+  ULONG AddressOfFunctions;
+  ULONG AddressOfNames;
+  ULONG AddressOfNameOrdinals;
 } IMAGE_EXPORT_DIRECTORY, *PIMAGE_EXPORT_DIRECTORY;
 
-
-
 //
 // Resource Data Entry Format
 //
 typedef struct _IMAGE_RESOURCE_DATA_ENTRY {
-    ULONG OffsetToData;
-    ULONG Size;
-    ULONG CodePage;
-    ULONG Reserved;
+  ULONG OffsetToData;
+  ULONG Size;
+  ULONG CodePage;
+  ULONG Reserved;
 } IMAGE_RESOURCE_DATA_ENTRY, *PIMAGE_RESOURCE_DATA_ENTRY;
 
-
-
 //
 // Load Configuration Directory Entry Format
 //
 typedef struct {
-    ULONG   Size;
-    ULONG   TimeDateStamp;
-    USHORT  MajorVersion;
-    USHORT  MinorVersion;
-    ULONG   GlobalFlagsClear;
-    ULONG   GlobalFlagsSet;
-    ULONG   CriticalSectionDefaultTimeout;
-    ULONG   DeCommitFreeBlockThreshold;
-    ULONG   DeCommitTotalFreeThreshold;
-    ULONG   LockPrefixTable;
-    ULONG   MaximumAllocationSize;
-    ULONG   VirtualMemoryThreshold;
-    ULONG   ProcessHeapFlags;
-    ULONG   ProcessAffinityMask;
-    USHORT  CSDVersion;
-    USHORT  Reserved1;
-    ULONG   EditList;
-    ULONG   SecurityCookie;
-    ULONG   SEHandlerTable;
-    ULONG   SEHandlerCount;
+  ULONG Size;
+  ULONG TimeDateStamp;
+  USHORT MajorVersion;
+  USHORT MinorVersion;
+  ULONG GlobalFlagsClear;
+  ULONG GlobalFlagsSet;
+  ULONG CriticalSectionDefaultTimeout;
+  ULONG DeCommitFreeBlockThreshold;
+  ULONG DeCommitTotalFreeThreshold;
+  ULONG LockPrefixTable;
+  ULONG MaximumAllocationSize;
+  ULONG VirtualMemoryThreshold;
+  ULONG ProcessHeapFlags;
+  ULONG ProcessAffinityMask;
+  USHORT CSDVersion;
+  USHORT Reserved1;
+  ULONG EditList;
+  ULONG SecurityCookie;
+  ULONG SEHandlerTable;
+  ULONG SEHandlerCount;
 } IMAGE_LOAD_CONFIG_DIRECTORY32, *PIMAGE_LOAD_CONFIG_DIRECTORY32;
 
 typedef struct {
-    ULONG      Size;
-    ULONG      TimeDateStamp;
-    USHORT     MajorVersion;
-    USHORT     MinorVersion;
-    ULONG      GlobalFlagsClear;
-    ULONG      GlobalFlagsSet;
-    ULONG      CriticalSectionDefaultTimeout;
-    ULONGLONG  DeCommitFreeBlockThreshold;
-    ULONGLONG  DeCommitTotalFreeThreshold;
-    ULONGLONG  LockPrefixTable;
-    ULONGLONG  MaximumAllocationSize;
-    ULONGLONG  VirtualMemoryThreshold;
-    ULONGLONG  ProcessAffinityMask;
-    ULONG      ProcessHeapFlags;
-    USHORT     CSDVersion;
-    USHORT     Reserved1;
-    ULONGLONG  EditList;
-    ULONGLONG  SecurityCookie;
-    ULONGLONG  SEHandlerTable;
-    ULONGLONG  SEHandlerCount;
+  ULONG Size;
+  ULONG TimeDateStamp;
+  USHORT MajorVersion;
+  USHORT MinorVersion;
+  ULONG GlobalFlagsClear;
+  ULONG GlobalFlagsSet;
+  ULONG CriticalSectionDefaultTimeout;
+  ULONGLONG DeCommitFreeBlockThreshold;
+  ULONGLONG DeCommitTotalFreeThreshold;
+  ULONGLONG LockPrefixTable;
+  ULONGLONG MaximumAllocationSize;
+  ULONGLONG VirtualMemoryThreshold;
+  ULONGLONG ProcessAffinityMask;
+  ULONG ProcessHeapFlags;
+  USHORT CSDVersion;
+  USHORT Reserved1;
+  ULONGLONG EditList;
+  ULONGLONG SecurityCookie;
+  ULONGLONG SEHandlerTable;
+  ULONGLONG SEHandlerCount;
 } IMAGE_LOAD_CONFIG_DIRECTORY64, *PIMAGE_LOAD_CONFIG_DIRECTORY64;
 
 #ifdef _WIN64
@@ -162,36 +155,31 @@ typedef IMAGE_LOAD_CONFIG_DIRECTORY32     IMAGE_LOAD_CONFIG_DIRECTORY;
 typedef PIMAGE_LOAD_CONFIG_DIRECTORY32    PIMAGE_LOAD_CONFIG_DIRECTORY;
 #endif
 
-
 //
 // Base Relocation Format
 //
 typedef struct _IMAGE_BASE_RELOCATION {
-       ULONG VirtualAddress;
-       ULONG SizeOfBlock;
+  ULONG VirtualAddress;
+  ULONG SizeOfBlock;
 } IMAGE_BASE_RELOCATION, *PIMAGE_BASE_RELOCATION;
 
-
-
 //
 // Resource Format
 //
 typedef struct _IMAGE_RESOURCE_DIRECTORY {
-    ULONG Characteristics;
-    ULONG TimeDateStamp;
-    USHORT MajorVersion;
-    USHORT MinorVersion;
-    USHORT NumberOfNamedEntries;
-    USHORT NumberOfIdEntries;
+  ULONG Characteristics;
+  ULONG TimeDateStamp;
+  USHORT MajorVersion;
+  USHORT MinorVersion;
+  USHORT NumberOfNamedEntries;
+  USHORT NumberOfIdEntries;
 } IMAGE_RESOURCE_DIRECTORY, *PIMAGE_RESOURCE_DIRECTORY;
 
 typedef struct _IMAGE_RESOURCE_DIRECTORY_STRING {
-    USHORT Length;
-    CHAR NameString[ANYSIZE_ARRAY];
+  USHORT Length;
+  CHAR NameString[ANYSIZE_ARRAY];
 } IMAGE_RESOURCE_DIRECTORY_STRING, *PIMAGE_RESOURCE_DIRECTORY_STRING;
 
-
-
 //
 // Section Header Format
 //
@@ -199,20 +187,19 @@ typedef struct _IMAGE_RESOURCE_DIRECTORY_STRING {
 #define IMAGE_SIZEOF_SECTION_HEADER          40
 
 typedef struct _IMAGE_SECTION_HEADER {
-    UCHAR Name[IMAGE_SIZEOF_SHORT_NAME];
-    union
-    {
-        ULONG PhysicalAddress;
-        ULONG VirtualSize;
-    } Misc;
-    ULONG VirtualAddress;
-    ULONG SizeOfRawData;
-    ULONG PointerToRawData;
-    ULONG PointerToRelocations;
-    ULONG PointerToLinenumbers;
-    USHORT NumberOfRelocations;
-    USHORT NumberOfLinenumbers;
-    ULONG Characteristics;
+  UCHAR Name[IMAGE_SIZEOF_SHORT_NAME];
+  union {
+    ULONG PhysicalAddress;
+    ULONG VirtualSize;
+  } Misc;
+  ULONG VirtualAddress;
+  ULONG SizeOfRawData;
+  ULONG PointerToRawData;
+  ULONG PointerToRelocations;
+  ULONG PointerToLinenumbers;
+  USHORT NumberOfRelocations;
+  USHORT NumberOfLinenumbers;
+  ULONG Characteristics;
 } IMAGE_SECTION_HEADER, *PIMAGE_SECTION_HEADER;
 
 //
@@ -231,21 +218,19 @@ typedef struct _IMAGE_SECTION_HEADER {
 #define IMAGE_SCN_MEM_READ                   0x40000000
 #define IMAGE_SCN_MEM_WRITE                  0x80000000
 
-
-
 //
 // File Header Format
 //
 #define IMAGE_SIZEOF_FILE_HEADER             20
 
 typedef struct _IMAGE_FILE_HEADER {
-    USHORT Machine;
-    USHORT NumberOfSections;
-    ULONG TimeDateStamp;
-    ULONG PointerToSymbolTable;
-    ULONG NumberOfSymbols;
-    USHORT SizeOfOptionalHeader;
-    USHORT Characteristics;
+  USHORT Machine;
+  USHORT NumberOfSections;
+  ULONG TimeDateStamp;
+  ULONG PointerToSymbolTable;
+  ULONG NumberOfSymbols;
+  USHORT SizeOfOptionalHeader;
+  USHORT Characteristics;
 } IMAGE_FILE_HEADER, *PIMAGE_FILE_HEADER;
 
 //
@@ -267,104 +252,100 @@ typedef struct _IMAGE_FILE_HEADER {
 #define IMAGE_FILE_UP_SYSTEM_ONLY            0x4000
 #define IMAGE_FILE_BYTES_REVERSED_HI         0x8000
 
-
-
 //
 // Directory format.
 //
 #define IMAGE_NUMBEROF_DIRECTORY_ENTRIES    16
 
 typedef struct _IMAGE_DATA_DIRECTORY {
-    ULONG   VirtualAddress;
-    ULONG   Size;
+  ULONG VirtualAddress;
+  ULONG Size;
 } IMAGE_DATA_DIRECTORY, *PIMAGE_DATA_DIRECTORY;
 
-
-
 //
 // Optional Header Formats
 //
 typedef struct _IMAGE_OPTIONAL_HEADER {
-    USHORT  Magic;
-    UCHAR   MajorLinkerVersion;
-    UCHAR   MinorLinkerVersion;
-    ULONG   SizeOfCode;
-    ULONG   SizeOfInitializedData;
-    ULONG   SizeOfUninitializedData;
-    ULONG   AddressOfEntryPoint;
-    ULONG   BaseOfCode;
-    ULONG   BaseOfData;
-    ULONG   ImageBase;
-    ULONG   SectionAlignment;
-    ULONG   FileAlignment;
-    USHORT  MajorOperatingSystemVersion;
-    USHORT  MinorOperatingSystemVersion;
-    USHORT  MajorImageVersion;
-    USHORT  MinorImageVersion;
-    USHORT  MajorSubsystemVersion;
-    USHORT  MinorSubsystemVersion;
-    ULONG   Win32VersionValue;
-    ULONG   SizeOfImage;
-    ULONG   SizeOfHeaders;
-    ULONG   CheckSum;
-    USHORT  Subsystem;
-    USHORT  DllCharacteristics;
-    ULONG   SizeOfStackReserve;
-    ULONG   SizeOfStackCommit;
-    ULONG   SizeOfHeapReserve;
-    ULONG   SizeOfHeapCommit;
-    ULONG   LoaderFlags;
-    ULONG   NumberOfRvaAndSizes;
-    IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
+  USHORT Magic;
+  UCHAR MajorLinkerVersion;
+  UCHAR MinorLinkerVersion;
+  ULONG SizeOfCode;
+  ULONG SizeOfInitializedData;
+  ULONG SizeOfUninitializedData;
+  ULONG AddressOfEntryPoint;
+  ULONG BaseOfCode;
+  ULONG BaseOfData;
+  ULONG ImageBase;
+  ULONG SectionAlignment;
+  ULONG FileAlignment;
+  USHORT MajorOperatingSystemVersion;
+  USHORT MinorOperatingSystemVersion;
+  USHORT MajorImageVersion;
+  USHORT MinorImageVersion;
+  USHORT MajorSubsystemVersion;
+  USHORT MinorSubsystemVersion;
+  ULONG Win32VersionValue;
+  ULONG SizeOfImage;
+  ULONG SizeOfHeaders;
+  ULONG CheckSum;
+  USHORT Subsystem;
+  USHORT DllCharacteristics;
+  ULONG SizeOfStackReserve;
+  ULONG SizeOfStackCommit;
+  ULONG SizeOfHeapReserve;
+  ULONG SizeOfHeapCommit;
+  ULONG LoaderFlags;
+  ULONG NumberOfRvaAndSizes;
+  IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
 } IMAGE_OPTIONAL_HEADER32, *PIMAGE_OPTIONAL_HEADER32;
 
 typedef struct _IMAGE_ROM_OPTIONAL_HEADER {
-    USHORT Magic;
-    UCHAR  MajorLinkerVersion;
-    UCHAR  MinorLinkerVersion;
-    ULONG  SizeOfCode;
-    ULONG  SizeOfInitializedData;
-    ULONG  SizeOfUninitializedData;
-    ULONG  AddressOfEntryPoint;
-    ULONG  BaseOfCode;
-    ULONG  BaseOfData;
-    ULONG  BaseOfBss;
-    ULONG  GprMask;
-    ULONG  CprMask[4];
-    ULONG  GpValue;
+  USHORT Magic;
+  UCHAR MajorLinkerVersion;
+  UCHAR MinorLinkerVersion;
+  ULONG SizeOfCode;
+  ULONG SizeOfInitializedData;
+  ULONG SizeOfUninitializedData;
+  ULONG AddressOfEntryPoint;
+  ULONG BaseOfCode;
+  ULONG BaseOfData;
+  ULONG BaseOfBss;
+  ULONG GprMask;
+  ULONG CprMask[4];
+  ULONG GpValue;
 } IMAGE_ROM_OPTIONAL_HEADER, *PIMAGE_ROM_OPTIONAL_HEADER;
 
 typedef struct _IMAGE_OPTIONAL_HEADER64 {
-    USHORT      Magic;
-    UCHAR       MajorLinkerVersion;
-    UCHAR       MinorLinkerVersion;
-    ULONG       SizeOfCode;
-    ULONG       SizeOfInitializedData;
-    ULONG       SizeOfUninitializedData;
-    ULONG       AddressOfEntryPoint;
-    ULONG       BaseOfCode;
-    ULONGLONG   ImageBase;
-    ULONG       SectionAlignment;
-    ULONG       FileAlignment;
-    USHORT      MajorOperatingSystemVersion;
-    USHORT      MinorOperatingSystemVersion;
-    USHORT      MajorImageVersion;
-    USHORT      MinorImageVersion;
-    USHORT      MajorSubsystemVersion;
-    USHORT      MinorSubsystemVersion;
-    ULONG       Win32VersionValue;
-    ULONG       SizeOfImage;
-    ULONG       SizeOfHeaders;
-    ULONG       CheckSum;
-    USHORT      Subsystem;
-    USHORT      DllCharacteristics;
-    ULONGLONG   SizeOfStackReserve;
-    ULONGLONG   SizeOfStackCommit;
-    ULONGLONG   SizeOfHeapReserve;
-    ULONGLONG   SizeOfHeapCommit;
-    ULONG       LoaderFlags;
-    ULONG       NumberOfRvaAndSizes;
-    IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
+  USHORT Magic;
+  UCHAR MajorLinkerVersion;
+  UCHAR MinorLinkerVersion;
+  ULONG SizeOfCode;
+  ULONG SizeOfInitializedData;
+  ULONG SizeOfUninitializedData;
+  ULONG AddressOfEntryPoint;
+  ULONG BaseOfCode;
+  ULONGLONG ImageBase;
+  ULONG SectionAlignment;
+  ULONG FileAlignment;
+  USHORT MajorOperatingSystemVersion;
+  USHORT MinorOperatingSystemVersion;
+  USHORT MajorImageVersion;
+  USHORT MinorImageVersion;
+  USHORT MajorSubsystemVersion;
+  USHORT MinorSubsystemVersion;
+  ULONG Win32VersionValue;
+  ULONG SizeOfImage;
+  ULONG SizeOfHeaders;
+  ULONG CheckSum;
+  USHORT Subsystem;
+  USHORT DllCharacteristics;
+  ULONGLONG SizeOfStackReserve;
+  ULONGLONG SizeOfStackCommit;
+  ULONGLONG SizeOfHeapReserve;
+  ULONGLONG SizeOfHeapCommit;
+  ULONG LoaderFlags;
+  ULONG NumberOfRvaAndSizes;
+  IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
 } IMAGE_OPTIONAL_HEADER64, *PIMAGE_OPTIONAL_HEADER64;
 
 //
@@ -374,7 +355,6 @@ typedef struct _IMAGE_OPTIONAL_HEADER64 {
 #define IMAGE_NT_OPTIONAL_HDR64_MAGIC      0x20b
 #define IMAGE_ROM_OPTIONAL_HDR_MAGIC       0x107
 
-
 #ifdef _WIN64
 typedef IMAGE_OPTIONAL_HEADER64             IMAGE_OPTIONAL_HEADER;
 typedef PIMAGE_OPTIONAL_HEADER64            PIMAGE_OPTIONAL_HEADER;
@@ -385,21 +365,19 @@ typedef PIMAGE_OPTIONAL_HEADER32            PIMAGE_OPTIONAL_HEADER;
 #define IMAGE_NT_OPTIONAL_HDR_MAGIC         IMAGE_NT_OPTIONAL_HDR32_MAGIC
 #endif
 
-
-
 //
 // Nt Header Formats
 //
 typedef struct _IMAGE_NT_HEADERS64 {
-    ULONG Signature;
-    IMAGE_FILE_HEADER FileHeader;
-    IMAGE_OPTIONAL_HEADER64 OptionalHeader;
+  ULONG Signature;
+  IMAGE_FILE_HEADER FileHeader;
+  IMAGE_OPTIONAL_HEADER64 OptionalHeader;
 } IMAGE_NT_HEADERS64;
 
 typedef struct _IMAGE_NT_HEADERS {
-    ULONG Signature;
-    IMAGE_FILE_HEADER FileHeader;
-    IMAGE_OPTIONAL_HEADER32 OptionalHeader;
+  ULONG Signature;
+  IMAGE_FILE_HEADER FileHeader;
+  IMAGE_OPTIONAL_HEADER32 OptionalHeader;
 } IMAGE_NT_HEADERS32;
 
 #ifdef _WIN64
@@ -424,11 +402,10 @@ typedef PIMAGE_NT_HEADERS32                 PIMAGE_NT_HEADERS;
 //
 // Retreives the first image section header from the Nt Header
 //
-#define IMAGE_FIRST_SECTION( NtHeader ) ((PIMAGE_SECTION_HEADER)        \
-    ((ULONG_PTR)(NtHeader) +                                            \
-     FIELD_OFFSET( IMAGE_NT_HEADERS, OptionalHeader ) +                 \
-     ((NtHeader))->FileHeader.SizeOfOptionalHeader   \
-    ))
+#define IMAGE_FIRST_SECTION( NtHeader )                \
+  ((PIMAGE_SECTION_HEADER) ((ULONG_PTR)(NtHeader) +    \
+   FIELD_OFFSET( IMAGE_NT_HEADERS, OptionalHeader ) +  \
+   ((NtHeader))->FileHeader.SizeOfOptionalHeader))
 
 //
 // Dll Characteristics
@@ -461,34 +438,32 @@ typedef PIMAGE_NT_HEADERS32                 PIMAGE_NT_HEADERS;
 #define IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT   13
 #define IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR 14
 
-
-
 //
 // Import Formats
 //
 typedef struct _IMAGE_IMPORT_BY_NAME {
-    USHORT  Hint;
-    UCHAR   Name[1];
+  USHORT Hint;
+  UCHAR 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;
+  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 {
-        ULONG ForwarderString;
-        ULONG Function;
-        ULONG Ordinal;
-        ULONG AddressOfData;
-    } u1;
+  union {
+    ULONG ForwarderString;
+    ULONG Function;
+    ULONG Ordinal;
+    ULONG AddressOfData;
+  } u1;
 } IMAGE_THUNK_DATA32, *PIMAGE_THUNK_DATA32;
 
 #define IMAGE_ORDINAL_FLAG64 0x8000000000000000ULL
@@ -498,35 +473,32 @@ typedef struct _IMAGE_THUNK_DATA32 {
 #define IMAGE_SNAP_BY_ORDINAL64(Ordinal) ((Ordinal & IMAGE_ORDINAL_FLAG64) != 0)
 #define IMAGE_SNAP_BY_ORDINAL32(Ordinal) ((Ordinal & IMAGE_ORDINAL_FLAG32) != 0)
 
-
-
 //
 // Thread Local Storage (TLS)
 //
 typedef
 VOID
 (NTAPI *PIMAGE_TLS_CALLBACK) (
-    PVOID DllHandle,
-    ULONG Reason,
-    PVOID Reserved
-);
+  PVOID DllHandle,
+  ULONG Reason,
+  PVOID Reserved);
 
 typedef struct _IMAGE_TLS_DIRECTORY64 {
-    ULONGLONG   StartAddressOfRawData;
-    ULONGLONG   EndAddressOfRawData;
-    ULONGLONG   AddressOfIndex;
-    ULONGLONG   AddressOfCallBacks;
-    ULONG   SizeOfZeroFill;
-    ULONG   Characteristics;
+  ULONGLONG StartAddressOfRawData;
+  ULONGLONG EndAddressOfRawData;
+  ULONGLONG AddressOfIndex;
+  ULONGLONG AddressOfCallBacks;
+  ULONG SizeOfZeroFill;
+  ULONG Characteristics;
 } IMAGE_TLS_DIRECTORY64, *PIMAGE_TLS_DIRECTORY64;
 
 typedef struct _IMAGE_TLS_DIRECTORY32 {
-    ULONG   StartAddressOfRawData;
-    ULONG   EndAddressOfRawData;
-    ULONG   AddressOfIndex;
-    ULONG   AddressOfCallBacks;
-    ULONG   SizeOfZeroFill;
-    ULONG   Characteristics;
+  ULONG StartAddressOfRawData;
+  ULONG EndAddressOfRawData;
+  ULONG AddressOfIndex;
+  ULONG AddressOfCallBacks;
+  ULONG SizeOfZeroFill;
+  ULONG Characteristics;
 } IMAGE_TLS_DIRECTORY32, *PIMAGE_TLS_DIRECTORY32;
 
 #ifdef _WIN64
@@ -548,18 +520,16 @@ typedef PIMAGE_TLS_DIRECTORY32          PIMAGE_TLS_DIRECTORY;
 #endif
 
 typedef struct _IMAGE_IMPORT_DESCRIPTOR {
-    _ANONYMOUS_UNION union {
-        ULONG   Characteristics;
-        ULONG   OriginalFirstThunk;
-    } DUMMYUNIONNAME;
-    ULONG   TimeDateStamp;
-    ULONG   ForwarderChain;
-    ULONG   Name;
-    ULONG   FirstThunk;
+  _ANONYMOUS_UNION union {
+    ULONG Characteristics;
+    ULONG OriginalFirstThunk;
+  } DUMMYUNIONNAME;
+  ULONG TimeDateStamp;
+  ULONG ForwarderChain;
+  ULONG Name;
+  ULONG FirstThunk;
 } IMAGE_IMPORT_DESCRIPTOR, *PIMAGE_IMPORT_DESCRIPTOR;
 
 #include <poppack.h>
 
-
-
-#endif
+#endif /* _NTIMAGE_ */