wine/dlls/ntdll/tests/generated.c
2002-10-15 01:53:45 +00:00

639 lines
32 KiB
C

/* File generated automatically from tools/winapi/test.dat; do not edit! */
/* This file can be copied, modified and distributed without restriction. */
/*
* Unit tests for data structure packing
*/
#include <stdio.h>
#include "wine/test.h"
#include "basetsd.h"
#include "winnt.h"
#include "windef.h"
/***********************************************************************
* Windows API extension
*/
#if (_MSC_VER >= 1300) && defined(__cplusplus)
# define FIELD_ALIGNMENT(type, field) __alignof(((type*)0)->field)
#elif defined(__GNUC__)
# define FIELD_ALIGNMENT(type, field) __alignof__(((type*)0)->field)
#else
/* FIXME: Not sure if is possible to do without compiler extension */
#endif
/***********************************************************************
* Test helper macros
*/
#ifdef FIELD_ALIGNMENT
# define TEST_FIELD_ALIGNMENT(type, field, align) \
ok(FIELD_ALIGNMENT(type, field) == align, \
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")", \
FIELD_ALIGNMENT(type, field))
#else
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
#endif
#define TEST_FIELD_OFFSET(type, field, offset) \
ok(FIELD_OFFSET(type, field) == offset, \
"FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")", \
FIELD_OFFSET(type, field))
#define TEST_TYPE_ALIGNMENT(type, align) \
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")", TYPE_ALIGNMENT(type))
#define TEST_TYPE_SIZE(type, size) \
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")", sizeof(type))
/***********************************************************************
* Test macros
*/
#define TEST_FIELD(type, field_type, field_name, field_offset, field_size, field_align) \
TEST_TYPE_SIZE(field_type, field_size); \
TEST_FIELD_ALIGNMENT(type, field_name, field_align); \
TEST_FIELD_OFFSET(type, field_name, field_offset); \
#define TEST_TYPE(type, size, align) \
TEST_TYPE_ALIGNMENT(type, align); \
TEST_TYPE_SIZE(type, size)
void test_pack(void)
{
/* ACCESS_ALLOWED_ACE (pack 4) */
TEST_TYPE(ACCESS_ALLOWED_ACE, 12, 4);
TEST_FIELD(ACCESS_ALLOWED_ACE, ACE_HEADER, Header, 0, 4, 2);
TEST_FIELD(ACCESS_ALLOWED_ACE, DWORD, Mask, 4, 4, 4);
TEST_FIELD(ACCESS_ALLOWED_ACE, DWORD, SidStart, 8, 4, 4);
/* ACCESS_DENIED_ACE (pack 4) */
TEST_TYPE(ACCESS_DENIED_ACE, 12, 4);
TEST_FIELD(ACCESS_DENIED_ACE, ACE_HEADER, Header, 0, 4, 2);
TEST_FIELD(ACCESS_DENIED_ACE, DWORD, Mask, 4, 4, 4);
TEST_FIELD(ACCESS_DENIED_ACE, DWORD, SidStart, 8, 4, 4);
/* ACE_HEADER (pack 4) */
TEST_TYPE(ACE_HEADER, 4, 2);
TEST_FIELD(ACE_HEADER, BYTE, AceType, 0, 1, 1);
TEST_FIELD(ACE_HEADER, BYTE, AceFlags, 1, 1, 1);
TEST_FIELD(ACE_HEADER, WORD, AceSize, 2, 2, 2);
/* ACL (pack 4) */
TEST_TYPE(ACL, 8, 2);
TEST_FIELD(ACL, BYTE, AclRevision, 0, 1, 1);
TEST_FIELD(ACL, BYTE, Sbz1, 1, 1, 1);
TEST_FIELD(ACL, WORD, AclSize, 2, 2, 2);
TEST_FIELD(ACL, WORD, AceCount, 4, 2, 2);
TEST_FIELD(ACL, WORD, Sbz2, 6, 2, 2);
/* CONTEXT86 (pack 4) */
TEST_TYPE(CONTEXT86, 716, 4);
TEST_FIELD(CONTEXT86, DWORD, ContextFlags, 0, 4, 4);
TEST_FIELD(CONTEXT86, DWORD, Dr0, 4, 4, 4);
TEST_FIELD(CONTEXT86, DWORD, Dr1, 8, 4, 4);
TEST_FIELD(CONTEXT86, DWORD, Dr2, 12, 4, 4);
TEST_FIELD(CONTEXT86, DWORD, Dr3, 16, 4, 4);
TEST_FIELD(CONTEXT86, DWORD, Dr6, 20, 4, 4);
TEST_FIELD(CONTEXT86, DWORD, Dr7, 24, 4, 4);
TEST_FIELD(CONTEXT86, FLOATING_SAVE_AREA, FloatSave, 28, 112, 4);
TEST_FIELD(CONTEXT86, DWORD, SegGs, 140, 4, 4);
TEST_FIELD(CONTEXT86, DWORD, SegFs, 144, 4, 4);
TEST_FIELD(CONTEXT86, DWORD, SegEs, 148, 4, 4);
TEST_FIELD(CONTEXT86, DWORD, SegDs, 152, 4, 4);
TEST_FIELD(CONTEXT86, DWORD, Edi, 156, 4, 4);
TEST_FIELD(CONTEXT86, DWORD, Esi, 160, 4, 4);
TEST_FIELD(CONTEXT86, DWORD, Ebx, 164, 4, 4);
TEST_FIELD(CONTEXT86, DWORD, Edx, 168, 4, 4);
TEST_FIELD(CONTEXT86, DWORD, Ecx, 172, 4, 4);
TEST_FIELD(CONTEXT86, DWORD, Eax, 176, 4, 4);
TEST_FIELD(CONTEXT86, DWORD, Ebp, 180, 4, 4);
TEST_FIELD(CONTEXT86, DWORD, Eip, 184, 4, 4);
TEST_FIELD(CONTEXT86, DWORD, SegCs, 188, 4, 4);
TEST_FIELD(CONTEXT86, DWORD, EFlags, 192, 4, 4);
TEST_FIELD(CONTEXT86, DWORD, Esp, 196, 4, 4);
TEST_FIELD(CONTEXT86, DWORD, SegSs, 200, 4, 4);
TEST_FIELD(CONTEXT86, BYTE[MAXIMUM_SUPPORTED_EXTENSION], ExtendedRegisters, 204, 512, 1);
/* EXCEPTION_POINTERS (pack 4) */
TEST_TYPE(EXCEPTION_POINTERS, 8, 4);
TEST_FIELD(EXCEPTION_POINTERS, PEXCEPTION_RECORD, ExceptionRecord, 0, 4, 4);
TEST_FIELD(EXCEPTION_POINTERS, PCONTEXT, ContextRecord, 4, 4, 4);
/* EXCEPTION_RECORD (pack 4) */
TEST_TYPE(EXCEPTION_RECORD, 80, 4);
TEST_FIELD(EXCEPTION_RECORD, DWORD, ExceptionCode, 0, 4, 4);
TEST_FIELD(EXCEPTION_RECORD, DWORD, ExceptionFlags, 4, 4, 4);
TEST_FIELD(EXCEPTION_RECORD, struct __EXCEPTION_RECORD *, ExceptionRecord, 8, 4, 4);
TEST_FIELD(EXCEPTION_RECORD, LPVOID, ExceptionAddress, 12, 4, 4);
TEST_FIELD(EXCEPTION_RECORD, DWORD, NumberParameters, 16, 4, 4);
TEST_FIELD(EXCEPTION_RECORD, DWORD[EXCEPTION_MAXIMUM_PARAMETERS], ExceptionInformation, 20, 60, 4);
/* FLOATING_SAVE_AREA (pack 4) */
TEST_TYPE(FLOATING_SAVE_AREA, 112, 4);
TEST_FIELD(FLOATING_SAVE_AREA, DWORD, ControlWord, 0, 4, 4);
TEST_FIELD(FLOATING_SAVE_AREA, DWORD, StatusWord, 4, 4, 4);
TEST_FIELD(FLOATING_SAVE_AREA, DWORD, TagWord, 8, 4, 4);
TEST_FIELD(FLOATING_SAVE_AREA, DWORD, ErrorOffset, 12, 4, 4);
TEST_FIELD(FLOATING_SAVE_AREA, DWORD, ErrorSelector, 16, 4, 4);
TEST_FIELD(FLOATING_SAVE_AREA, DWORD, DataOffset, 20, 4, 4);
TEST_FIELD(FLOATING_SAVE_AREA, DWORD, DataSelector, 24, 4, 4);
TEST_FIELD(FLOATING_SAVE_AREA, BYTE[SIZE_OF_80387_REGISTERS], RegisterArea, 28, 80, 1);
TEST_FIELD(FLOATING_SAVE_AREA, DWORD, Cr0NpxState, 108, 4, 4);
/* FPO_DATA (pack 4) */
TEST_TYPE(FPO_DATA, 16, 4);
TEST_FIELD(FPO_DATA, DWORD, ulOffStart, 0, 4, 4);
TEST_FIELD(FPO_DATA, DWORD, cbProcSize, 4, 4, 4);
TEST_FIELD(FPO_DATA, DWORD, cdwLocals, 8, 4, 4);
TEST_FIELD(FPO_DATA, WORD, cdwParams, 12, 2, 2);
/* GENERIC_MAPPING (pack 4) */
TEST_TYPE(GENERIC_MAPPING, 16, 4);
TEST_FIELD(GENERIC_MAPPING, ACCESS_MASK, GenericRead, 0, 4, 4);
TEST_FIELD(GENERIC_MAPPING, ACCESS_MASK, GenericWrite, 4, 4, 4);
TEST_FIELD(GENERIC_MAPPING, ACCESS_MASK, GenericExecute, 8, 4, 4);
TEST_FIELD(GENERIC_MAPPING, ACCESS_MASK, GenericAll, 12, 4, 4);
/* IMAGE_ARCHIVE_MEMBER_HEADER (pack 4) */
TEST_TYPE(IMAGE_ARCHIVE_MEMBER_HEADER, 60, 1);
TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, BYTE[16], Name, 0, 16, 1);
TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, BYTE[12], Date, 16, 12, 1);
TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, BYTE[6], UserID, 28, 6, 1);
TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, BYTE[6], GroupID, 34, 6, 1);
TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, BYTE[8], Mode, 40, 8, 1);
TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, BYTE[10], Size, 48, 10, 1);
TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, BYTE[2], EndHeader, 58, 2, 1);
/* IMAGE_AUX_SYMBOL (pack 2) */
/* IMAGE_BASE_RELOCATION (pack 2) */
TEST_TYPE(IMAGE_BASE_RELOCATION, 8, 2);
TEST_FIELD(IMAGE_BASE_RELOCATION, DWORD, VirtualAddress, 0, 4, 2);
TEST_FIELD(IMAGE_BASE_RELOCATION, DWORD, SizeOfBlock, 4, 4, 2);
/* IMAGE_BOUND_FORWARDER_REF (pack 4) */
TEST_TYPE(IMAGE_BOUND_FORWARDER_REF, 8, 4);
TEST_FIELD(IMAGE_BOUND_FORWARDER_REF, DWORD, TimeDateStamp, 0, 4, 4);
TEST_FIELD(IMAGE_BOUND_FORWARDER_REF, WORD, OffsetModuleName, 4, 2, 2);
TEST_FIELD(IMAGE_BOUND_FORWARDER_REF, WORD, Reserved, 6, 2, 2);
/* IMAGE_BOUND_IMPORT_DESCRIPTOR (pack 4) */
TEST_TYPE(IMAGE_BOUND_IMPORT_DESCRIPTOR, 8, 4);
TEST_FIELD(IMAGE_BOUND_IMPORT_DESCRIPTOR, DWORD, TimeDateStamp, 0, 4, 4);
TEST_FIELD(IMAGE_BOUND_IMPORT_DESCRIPTOR, WORD, OffsetModuleName, 4, 2, 2);
TEST_FIELD(IMAGE_BOUND_IMPORT_DESCRIPTOR, WORD, NumberOfModuleForwarderRefs, 6, 2, 2);
/* IMAGE_COFF_SYMBOLS_HEADER (pack 4) */
TEST_TYPE(IMAGE_COFF_SYMBOLS_HEADER, 32, 4);
TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, DWORD, NumberOfSymbols, 0, 4, 4);
TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, DWORD, LvaToFirstSymbol, 4, 4, 4);
TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, DWORD, NumberOfLinenumbers, 8, 4, 4);
TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, DWORD, LvaToFirstLinenumber, 12, 4, 4);
TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, DWORD, RvaToFirstByteOfCode, 16, 4, 4);
TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, DWORD, RvaToLastByteOfCode, 20, 4, 4);
TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, DWORD, RvaToFirstByteOfData, 24, 4, 4);
TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, DWORD, RvaToLastByteOfData, 28, 4, 4);
/* IMAGE_DATA_DIRECTORY (pack 4) */
TEST_TYPE(IMAGE_DATA_DIRECTORY, 8, 4);
TEST_FIELD(IMAGE_DATA_DIRECTORY, DWORD, VirtualAddress, 0, 4, 4);
TEST_FIELD(IMAGE_DATA_DIRECTORY, DWORD, Size, 4, 4, 4);
/* IMAGE_DEBUG_DIRECTORY (pack 4) */
TEST_TYPE(IMAGE_DEBUG_DIRECTORY, 28, 4);
TEST_FIELD(IMAGE_DEBUG_DIRECTORY, DWORD, Characteristics, 0, 4, 4);
TEST_FIELD(IMAGE_DEBUG_DIRECTORY, DWORD, TimeDateStamp, 4, 4, 4);
TEST_FIELD(IMAGE_DEBUG_DIRECTORY, WORD, MajorVersion, 8, 2, 2);
TEST_FIELD(IMAGE_DEBUG_DIRECTORY, WORD, MinorVersion, 10, 2, 2);
TEST_FIELD(IMAGE_DEBUG_DIRECTORY, DWORD, Type, 12, 4, 4);
TEST_FIELD(IMAGE_DEBUG_DIRECTORY, DWORD, SizeOfData, 16, 4, 4);
TEST_FIELD(IMAGE_DEBUG_DIRECTORY, DWORD, AddressOfRawData, 20, 4, 4);
TEST_FIELD(IMAGE_DEBUG_DIRECTORY, DWORD, PointerToRawData, 24, 4, 4);
/* IMAGE_DEBUG_MISC (pack 4) */
TEST_TYPE(IMAGE_DEBUG_MISC, 16, 4);
TEST_FIELD(IMAGE_DEBUG_MISC, DWORD, DataType, 0, 4, 4);
TEST_FIELD(IMAGE_DEBUG_MISC, DWORD, Length, 4, 4, 4);
TEST_FIELD(IMAGE_DEBUG_MISC, BYTE, Unicode, 8, 1, 1);
TEST_FIELD(IMAGE_DEBUG_MISC, BYTE[ 3 ], Reserved, 9, 3, 1);
TEST_FIELD(IMAGE_DEBUG_MISC, BYTE[ 1 ], Data, 12, 1, 1);
/* IMAGE_DOS_HEADER (pack 4) */
TEST_TYPE(IMAGE_DOS_HEADER, 64, 4);
TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_magic, 0, 2, 2);
TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_cblp, 2, 2, 2);
TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_cp, 4, 2, 2);
TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_crlc, 6, 2, 2);
TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_cparhdr, 8, 2, 2);
TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_minalloc, 10, 2, 2);
TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_maxalloc, 12, 2, 2);
TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_ss, 14, 2, 2);
TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_sp, 16, 2, 2);
TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_csum, 18, 2, 2);
TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_ip, 20, 2, 2);
TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_cs, 22, 2, 2);
TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_lfarlc, 24, 2, 2);
TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_ovno, 26, 2, 2);
TEST_FIELD(IMAGE_DOS_HEADER, WORD[4], e_res, 28, 8, 2);
TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_oemid, 36, 2, 2);
TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_oeminfo, 38, 2, 2);
TEST_FIELD(IMAGE_DOS_HEADER, WORD[10], e_res2, 40, 20, 2);
TEST_FIELD(IMAGE_DOS_HEADER, DWORD, e_lfanew, 60, 4, 4);
/* IMAGE_EXPORT_DIRECTORY (pack 4) */
TEST_TYPE(IMAGE_EXPORT_DIRECTORY, 40, 4);
TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, Characteristics, 0, 4, 4);
TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, TimeDateStamp, 4, 4, 4);
TEST_FIELD(IMAGE_EXPORT_DIRECTORY, WORD, MajorVersion, 8, 2, 2);
TEST_FIELD(IMAGE_EXPORT_DIRECTORY, WORD, MinorVersion, 10, 2, 2);
TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, Name, 12, 4, 4);
TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, Base, 16, 4, 4);
TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, NumberOfFunctions, 20, 4, 4);
TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, NumberOfNames, 24, 4, 4);
TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, AddressOfFunctions, 28, 4, 4);
TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, AddressOfNames, 32, 4, 4);
TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, AddressOfNameOrdinals, 36, 4, 4);
/* IMAGE_FILE_HEADER (pack 4) */
TEST_TYPE(IMAGE_FILE_HEADER, 20, 4);
TEST_FIELD(IMAGE_FILE_HEADER, WORD, Machine, 0, 2, 2);
TEST_FIELD(IMAGE_FILE_HEADER, WORD, NumberOfSections, 2, 2, 2);
TEST_FIELD(IMAGE_FILE_HEADER, DWORD, TimeDateStamp, 4, 4, 4);
TEST_FIELD(IMAGE_FILE_HEADER, DWORD, PointerToSymbolTable, 8, 4, 4);
TEST_FIELD(IMAGE_FILE_HEADER, DWORD, NumberOfSymbols, 12, 4, 4);
TEST_FIELD(IMAGE_FILE_HEADER, WORD, SizeOfOptionalHeader, 16, 2, 2);
TEST_FIELD(IMAGE_FILE_HEADER, WORD, Characteristics, 18, 2, 2);
/* IMAGE_FUNCTION_ENTRY (pack 4) */
TEST_TYPE(IMAGE_FUNCTION_ENTRY, 12, 4);
TEST_FIELD(IMAGE_FUNCTION_ENTRY, DWORD, StartingAddress, 0, 4, 4);
TEST_FIELD(IMAGE_FUNCTION_ENTRY, DWORD, EndingAddress, 4, 4, 4);
TEST_FIELD(IMAGE_FUNCTION_ENTRY, DWORD, EndOfPrologue, 8, 4, 4);
/* IMAGE_IMPORT_BY_NAME (pack 4) */
TEST_TYPE(IMAGE_IMPORT_BY_NAME, 4, 2);
TEST_FIELD(IMAGE_IMPORT_BY_NAME, WORD, Hint, 0, 2, 2);
TEST_FIELD(IMAGE_IMPORT_BY_NAME, BYTE[1], Name, 2, 1, 1);
/* IMAGE_LOAD_CONFIG_DIRECTORY (pack 4) */
TEST_TYPE(IMAGE_LOAD_CONFIG_DIRECTORY, 64, 4);
TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, Characteristics, 0, 4, 4);
TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, TimeDateStamp, 4, 4, 4);
TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, WORD, MajorVersion, 8, 2, 2);
TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, WORD, MinorVersion, 10, 2, 2);
TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, GlobalFlagsClear, 12, 4, 4);
TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, GlobalFlagsSet, 16, 4, 4);
TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, CriticalSectionDefaultTimeout, 20, 4, 4);
TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, DeCommitFreeBlockThreshold, 24, 4, 4);
TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, DeCommitTotalFreeThreshold, 28, 4, 4);
TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, PVOID, LockPrefixTable, 32, 4, 4);
TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, MaximumAllocationSize, 36, 4, 4);
TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, VirtualMemoryThreshold, 40, 4, 4);
TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, ProcessHeapFlags, 44, 4, 4);
TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, ProcessAffinityMask, 48, 4, 4);
TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, WORD, CSDVersion, 52, 2, 2);
TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, WORD, Reserved1, 54, 2, 2);
TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, PVOID, EditList, 56, 4, 4);
TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD[1], Reserved, 60, 4, 4);
/* IMAGE_NT_HEADERS (pack 4) */
TEST_TYPE(IMAGE_NT_HEADERS, 248, 4);
TEST_FIELD(IMAGE_NT_HEADERS, DWORD, Signature, 0, 4, 4);
TEST_FIELD(IMAGE_NT_HEADERS, IMAGE_FILE_HEADER, FileHeader, 4, 20, 4);
TEST_FIELD(IMAGE_NT_HEADERS, IMAGE_OPTIONAL_HEADER, OptionalHeader, 24, 224, 4);
/* IMAGE_OPTIONAL_HEADER (pack 4) */
TEST_TYPE(IMAGE_OPTIONAL_HEADER, 224, 4);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, Magic, 0, 2, 2);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, BYTE, MajorLinkerVersion, 2, 1, 1);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, BYTE, MinorLinkerVersion, 3, 1, 1);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfCode, 4, 4, 4);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfInitializedData, 8, 4, 4);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfUninitializedData, 12, 4, 4);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, AddressOfEntryPoint, 16, 4, 4);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, BaseOfCode, 20, 4, 4);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, BaseOfData, 24, 4, 4);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, ImageBase, 28, 4, 4);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SectionAlignment, 32, 4, 4);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, FileAlignment, 36, 4, 4);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, MajorOperatingSystemVersion, 40, 2, 2);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, MinorOperatingSystemVersion, 42, 2, 2);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, MajorImageVersion, 44, 2, 2);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, MinorImageVersion, 46, 2, 2);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, MajorSubsystemVersion, 48, 2, 2);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, MinorSubsystemVersion, 50, 2, 2);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, Win32VersionValue, 52, 4, 4);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfImage, 56, 4, 4);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfHeaders, 60, 4, 4);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, CheckSum, 64, 4, 4);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, Subsystem, 68, 2, 2);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, DllCharacteristics, 70, 2, 2);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfStackReserve, 72, 4, 4);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfStackCommit, 76, 4, 4);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfHeapReserve, 80, 4, 4);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfHeapCommit, 84, 4, 4);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, LoaderFlags, 88, 4, 4);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, NumberOfRvaAndSizes, 92, 4, 4);
TEST_FIELD(IMAGE_OPTIONAL_HEADER, IMAGE_DATA_DIRECTORY[IMAGE_NUMBEROF_DIRECTORY_ENTRIES], DataDirectory, 96, 128, 4);
/* IMAGE_OS2_HEADER (pack 4) */
TEST_TYPE(IMAGE_OS2_HEADER, 64, 4);
TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_magic, 0, 2, 2);
TEST_FIELD(IMAGE_OS2_HEADER, BYTE, ne_ver, 2, 1, 1);
TEST_FIELD(IMAGE_OS2_HEADER, BYTE, ne_rev, 3, 1, 1);
TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_enttab, 4, 2, 2);
TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_cbenttab, 6, 2, 2);
TEST_FIELD(IMAGE_OS2_HEADER, LONG, ne_crc, 8, 4, 4);
TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_flags, 12, 2, 2);
TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_autodata, 14, 2, 2);
TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_heap, 16, 2, 2);
TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_stack, 18, 2, 2);
TEST_FIELD(IMAGE_OS2_HEADER, DWORD, ne_csip, 20, 4, 4);
TEST_FIELD(IMAGE_OS2_HEADER, DWORD, ne_sssp, 24, 4, 4);
TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_cseg, 28, 2, 2);
TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_cmod, 30, 2, 2);
TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_cbnrestab, 32, 2, 2);
TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_segtab, 34, 2, 2);
TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_rsrctab, 36, 2, 2);
TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_restab, 38, 2, 2);
TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_modtab, 40, 2, 2);
TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_imptab, 42, 2, 2);
TEST_FIELD(IMAGE_OS2_HEADER, DWORD, ne_nrestab, 44, 4, 4);
TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_cmovent, 48, 2, 2);
TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_align, 50, 2, 2);
TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_cres, 52, 2, 2);
TEST_FIELD(IMAGE_OS2_HEADER, BYTE, ne_exetyp, 54, 1, 1);
TEST_FIELD(IMAGE_OS2_HEADER, BYTE, ne_flagsothers, 55, 1, 1);
TEST_FIELD(IMAGE_OS2_HEADER, WORD, fastload_offset, 56, 2, 2);
TEST_FIELD(IMAGE_OS2_HEADER, WORD, fastload_length, 58, 2, 2);
TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_swaparea, 60, 2, 2);
TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_expver, 62, 2, 2);
/* IMAGE_RESOURCE_DATA_ENTRY (pack 4) */
TEST_TYPE(IMAGE_RESOURCE_DATA_ENTRY, 16, 4);
TEST_FIELD(IMAGE_RESOURCE_DATA_ENTRY, DWORD, OffsetToData, 0, 4, 4);
TEST_FIELD(IMAGE_RESOURCE_DATA_ENTRY, DWORD, Size, 4, 4, 4);
TEST_FIELD(IMAGE_RESOURCE_DATA_ENTRY, DWORD, CodePage, 8, 4, 4);
TEST_FIELD(IMAGE_RESOURCE_DATA_ENTRY, DWORD, ResourceHandle, 12, 4, 4);
/* IMAGE_RESOURCE_DIRECTORY (pack 4) */
TEST_TYPE(IMAGE_RESOURCE_DIRECTORY, 16, 4);
TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, DWORD, Characteristics, 0, 4, 4);
TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, DWORD, TimeDateStamp, 4, 4, 4);
TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, WORD, MajorVersion, 8, 2, 2);
TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, WORD, MinorVersion, 10, 2, 2);
TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, WORD, NumberOfNamedEntries, 12, 2, 2);
TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, WORD, NumberOfIdEntries, 14, 2, 2);
/* IMAGE_RESOURCE_DIRECTORY_ENTRY (pack 4) */
/* IMAGE_RESOURCE_DIRECTORY_STRING (pack 4) */
TEST_TYPE(IMAGE_RESOURCE_DIRECTORY_STRING, 4, 2);
TEST_FIELD(IMAGE_RESOURCE_DIRECTORY_STRING, WORD, Length, 0, 2, 2);
TEST_FIELD(IMAGE_RESOURCE_DIRECTORY_STRING, CHAR[ 1 ], NameString, 2, 1, 1);
/* IMAGE_RESOURCE_DIR_STRING_U (pack 4) */
TEST_TYPE(IMAGE_RESOURCE_DIR_STRING_U, 4, 2);
TEST_FIELD(IMAGE_RESOURCE_DIR_STRING_U, WORD, Length, 0, 2, 2);
TEST_FIELD(IMAGE_RESOURCE_DIR_STRING_U, WCHAR[ 1 ], NameString, 2, 2, 2);
/* IMAGE_SEPARATE_DEBUG_HEADER (pack 4) */
TEST_TYPE(IMAGE_SEPARATE_DEBUG_HEADER, 48, 4);
TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, WORD, Signature, 0, 2, 2);
TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, WORD, Flags, 2, 2, 2);
TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, WORD, Machine, 4, 2, 2);
TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, WORD, Characteristics, 6, 2, 2);
TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, TimeDateStamp, 8, 4, 4);
TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, CheckSum, 12, 4, 4);
TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, ImageBase, 16, 4, 4);
TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, SizeOfImage, 20, 4, 4);
TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, NumberOfSections, 24, 4, 4);
TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, ExportedNamesSize, 28, 4, 4);
TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, DebugDirectorySize, 32, 4, 4);
TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, SectionAlignment, 36, 4, 4);
TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD[ 2 ], Reserved, 40, 8, 4);
/* IMAGE_THUNK_DATA (pack 4) */
/* IMAGE_TLS_DIRECTORY (pack 4) */
TEST_TYPE(IMAGE_TLS_DIRECTORY, 24, 4);
TEST_FIELD(IMAGE_TLS_DIRECTORY, DWORD, StartAddressOfRawData, 0, 4, 4);
TEST_FIELD(IMAGE_TLS_DIRECTORY, DWORD, EndAddressOfRawData, 4, 4, 4);
TEST_FIELD(IMAGE_TLS_DIRECTORY, LPDWORD, AddressOfIndex, 8, 4, 4);
TEST_FIELD(IMAGE_TLS_DIRECTORY, PIMAGE_TLS_CALLBACK *, AddressOfCallBacks, 12, 4, 4);
TEST_FIELD(IMAGE_TLS_DIRECTORY, DWORD, SizeOfZeroFill, 16, 4, 4);
TEST_FIELD(IMAGE_TLS_DIRECTORY, DWORD, Characteristics, 20, 4, 4);
/* IMAGE_VXD_HEADER (pack 4) */
TEST_TYPE(IMAGE_VXD_HEADER, 196, 4);
TEST_FIELD(IMAGE_VXD_HEADER, WORD, e32_magic, 0, 2, 2);
TEST_FIELD(IMAGE_VXD_HEADER, BYTE, e32_border, 2, 1, 1);
TEST_FIELD(IMAGE_VXD_HEADER, BYTE, e32_worder, 3, 1, 1);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_level, 4, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, WORD, e32_cpu, 8, 2, 2);
TEST_FIELD(IMAGE_VXD_HEADER, WORD, e32_os, 10, 2, 2);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_ver, 12, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_mflags, 16, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_mpages, 20, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_startobj, 24, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_eip, 28, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_stackobj, 32, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_esp, 36, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_pagesize, 40, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_lastpagesize, 44, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_fixupsize, 48, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_fixupsum, 52, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_ldrsize, 56, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_ldrsum, 60, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_objtab, 64, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_objcnt, 68, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_objmap, 72, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_itermap, 76, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_rsrctab, 80, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_rsrccnt, 84, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_restab, 88, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_enttab, 92, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_dirtab, 96, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_dircnt, 100, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_fpagetab, 104, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_frectab, 108, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_impmod, 112, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_impmodcnt, 116, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_impproc, 120, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_pagesum, 124, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_datapage, 128, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_preload, 132, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_nrestab, 136, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_cbnrestab, 140, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_nressum, 144, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_autodata, 148, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_debuginfo, 152, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_debuglen, 156, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_instpreload, 160, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_instdemand, 164, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_heapsize, 168, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, BYTE[12], e32_res3, 172, 12, 1);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_winresoff, 184, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_winreslen, 188, 4, 4);
TEST_FIELD(IMAGE_VXD_HEADER, WORD, e32_devid, 192, 2, 2);
TEST_FIELD(IMAGE_VXD_HEADER, WORD, e32_ddkver, 194, 2, 2);
/* LIST_ENTRY (pack 4) */
TEST_TYPE(LIST_ENTRY, 8, 4);
TEST_FIELD(LIST_ENTRY, struct _LIST_ENTRY *, Flink, 0, 4, 4);
TEST_FIELD(LIST_ENTRY, struct _LIST_ENTRY *, Blink, 4, 4, 4);
/* LUID (pack 4) */
TEST_TYPE(LUID, 8, 4);
TEST_FIELD(LUID, DWORD, LowPart, 0, 4, 4);
TEST_FIELD(LUID, LONG, HighPart, 4, 4, 4);
/* LUID_AND_ATTRIBUTES (pack 4) */
TEST_TYPE(LUID_AND_ATTRIBUTES, 12, 4);
TEST_FIELD(LUID_AND_ATTRIBUTES, LUID, Luid, 0, 8, 4);
TEST_FIELD(LUID_AND_ATTRIBUTES, DWORD, Attributes, 8, 4, 4);
/* MEMORY_BASIC_INFORMATION (pack 4) */
TEST_TYPE(MEMORY_BASIC_INFORMATION, 28, 4);
TEST_FIELD(MEMORY_BASIC_INFORMATION, LPVOID, BaseAddress, 0, 4, 4);
TEST_FIELD(MEMORY_BASIC_INFORMATION, LPVOID, AllocationBase, 4, 4, 4);
TEST_FIELD(MEMORY_BASIC_INFORMATION, DWORD, AllocationProtect, 8, 4, 4);
TEST_FIELD(MEMORY_BASIC_INFORMATION, DWORD, RegionSize, 12, 4, 4);
TEST_FIELD(MEMORY_BASIC_INFORMATION, DWORD, State, 16, 4, 4);
TEST_FIELD(MEMORY_BASIC_INFORMATION, DWORD, Protect, 20, 4, 4);
TEST_FIELD(MEMORY_BASIC_INFORMATION, DWORD, Type, 24, 4, 4);
/* MESSAGE_RESOURCE_BLOCK (pack 4) */
TEST_TYPE(MESSAGE_RESOURCE_BLOCK, 12, 4);
TEST_FIELD(MESSAGE_RESOURCE_BLOCK, DWORD, LowId, 0, 4, 4);
TEST_FIELD(MESSAGE_RESOURCE_BLOCK, DWORD, HighId, 4, 4, 4);
TEST_FIELD(MESSAGE_RESOURCE_BLOCK, DWORD, OffsetToEntries, 8, 4, 4);
/* MESSAGE_RESOURCE_DATA (pack 4) */
TEST_TYPE(MESSAGE_RESOURCE_DATA, 16, 4);
TEST_FIELD(MESSAGE_RESOURCE_DATA, DWORD, NumberOfBlocks, 0, 4, 4);
TEST_FIELD(MESSAGE_RESOURCE_DATA, MESSAGE_RESOURCE_BLOCK[ 1 ], Blocks, 4, 12, 4);
/* MESSAGE_RESOURCE_ENTRY (pack 4) */
TEST_TYPE(MESSAGE_RESOURCE_ENTRY, 6, 2);
TEST_FIELD(MESSAGE_RESOURCE_ENTRY, WORD, Length, 0, 2, 2);
TEST_FIELD(MESSAGE_RESOURCE_ENTRY, WORD, Flags, 2, 2, 2);
TEST_FIELD(MESSAGE_RESOURCE_ENTRY, BYTE[1], Text, 4, 1, 1);
/* PRIVILEGE_SET (pack 4) */
TEST_TYPE(PRIVILEGE_SET, 20, 4);
TEST_FIELD(PRIVILEGE_SET, DWORD, PrivilegeCount, 0, 4, 4);
TEST_FIELD(PRIVILEGE_SET, DWORD, Control, 4, 4, 4);
TEST_FIELD(PRIVILEGE_SET, LUID_AND_ATTRIBUTES[ANYSIZE_ARRAY], Privilege, 8, 12, 4);
/* RTL_CRITICAL_SECTION (pack 4) */
TEST_TYPE(RTL_CRITICAL_SECTION, 24, 4);
TEST_FIELD(RTL_CRITICAL_SECTION, PRTL_CRITICAL_SECTION_DEBUG, DebugInfo, 0, 4, 4);
TEST_FIELD(RTL_CRITICAL_SECTION, LONG, LockCount, 4, 4, 4);
TEST_FIELD(RTL_CRITICAL_SECTION, LONG, RecursionCount, 8, 4, 4);
TEST_FIELD(RTL_CRITICAL_SECTION, HANDLE, OwningThread, 12, 4, 4);
TEST_FIELD(RTL_CRITICAL_SECTION, HANDLE, LockSemaphore, 16, 4, 4);
TEST_FIELD(RTL_CRITICAL_SECTION, ULONG_PTR, SpinCount, 20, 4, 4);
/* RTL_CRITICAL_SECTION_DEBUG (pack 4) */
TEST_TYPE(RTL_CRITICAL_SECTION_DEBUG, 32, 4);
TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, WORD, Type, 0, 2, 2);
TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, WORD, CreatorBackTraceIndex, 2, 2, 2);
TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, struct _RTL_CRITICAL_SECTION *, CriticalSection, 4, 4, 4);
TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, LIST_ENTRY, ProcessLocksList, 8, 8, 4);
TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, DWORD, EntryCount, 16, 4, 4);
TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, DWORD, ContentionCount, 20, 4, 4);
TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, DWORD[ 2 ], Spare, 24, 8, 4);
/* SECURITY_DESCRIPTOR (pack 4) */
TEST_TYPE(SECURITY_DESCRIPTOR, 20, 4);
TEST_FIELD(SECURITY_DESCRIPTOR, BYTE, Revision, 0, 1, 1);
TEST_FIELD(SECURITY_DESCRIPTOR, BYTE, Sbz1, 1, 1, 1);
TEST_FIELD(SECURITY_DESCRIPTOR, SECURITY_DESCRIPTOR_CONTROL, Control, 2, 2, 2);
TEST_FIELD(SECURITY_DESCRIPTOR, PSID, Owner, 4, 4, 4);
TEST_FIELD(SECURITY_DESCRIPTOR, PSID, Group, 8, 4, 4);
TEST_FIELD(SECURITY_DESCRIPTOR, PACL, Sacl, 12, 4, 4);
TEST_FIELD(SECURITY_DESCRIPTOR, PACL, Dacl, 16, 4, 4);
/* SECURITY_DESCRIPTOR_RELATIVE (pack 4) */
TEST_TYPE(SECURITY_DESCRIPTOR_RELATIVE, 20, 4);
TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, BYTE, Revision, 0, 1, 1);
TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, BYTE, Sbz1, 1, 1, 1);
TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, SECURITY_DESCRIPTOR_CONTROL, Control, 2, 2, 2);
TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, DWORD, Owner, 4, 4, 4);
TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, DWORD, Group, 8, 4, 4);
TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, DWORD, Sacl, 12, 4, 4);
TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, DWORD, Dacl, 16, 4, 4);
/* SID (pack 4) */
TEST_TYPE(SID, 12, 4);
TEST_FIELD(SID, BYTE, Revision, 0, 1, 1);
TEST_FIELD(SID, BYTE, SubAuthorityCount, 1, 1, 1);
TEST_FIELD(SID, SID_IDENTIFIER_AUTHORITY, IdentifierAuthority, 2, 6, 1);
TEST_FIELD(SID, DWORD[1], SubAuthority, 8, 4, 4);
/* SID_AND_ATTRIBUTES (pack 4) */
TEST_TYPE(SID_AND_ATTRIBUTES, 8, 4);
TEST_FIELD(SID_AND_ATTRIBUTES, PSID, Sid, 0, 4, 4);
TEST_FIELD(SID_AND_ATTRIBUTES, DWORD, Attributes, 4, 4, 4);
/* SID_IDENTIFIER_AUTHORITY (pack 4) */
TEST_TYPE(SID_IDENTIFIER_AUTHORITY, 6, 1);
TEST_FIELD(SID_IDENTIFIER_AUTHORITY, BYTE[6], Value, 0, 6, 1);
/* SINGLE_LIST_ENTRY (pack 4) */
TEST_TYPE(SINGLE_LIST_ENTRY, 4, 4);
TEST_FIELD(SINGLE_LIST_ENTRY, struct _SINGLE_LIST_ENTRY *, Next, 0, 4, 4);
/* SYSTEM_ALARM_ACE (pack 4) */
TEST_TYPE(SYSTEM_ALARM_ACE, 12, 4);
TEST_FIELD(SYSTEM_ALARM_ACE, ACE_HEADER, Header, 0, 4, 2);
TEST_FIELD(SYSTEM_ALARM_ACE, DWORD, Mask, 4, 4, 4);
TEST_FIELD(SYSTEM_ALARM_ACE, DWORD, SidStart, 8, 4, 4);
/* SYSTEM_AUDIT_ACE (pack 4) */
TEST_TYPE(SYSTEM_AUDIT_ACE, 12, 4);
TEST_FIELD(SYSTEM_AUDIT_ACE, ACE_HEADER, Header, 0, 4, 2);
TEST_FIELD(SYSTEM_AUDIT_ACE, DWORD, Mask, 4, 4, 4);
TEST_FIELD(SYSTEM_AUDIT_ACE, DWORD, SidStart, 8, 4, 4);
/* TOKEN_DEFAULT_DACL (pack 4) */
TEST_TYPE(TOKEN_DEFAULT_DACL, 4, 4);
TEST_FIELD(TOKEN_DEFAULT_DACL, PACL, DefaultDacl, 0, 4, 4);
/* TOKEN_GROUPS (pack 4) */
TEST_TYPE(TOKEN_GROUPS, 12, 4);
TEST_FIELD(TOKEN_GROUPS, DWORD, GroupCount, 0, 4, 4);
TEST_FIELD(TOKEN_GROUPS, SID_AND_ATTRIBUTES[ANYSIZE_ARRAY], Groups, 4, 8, 4);
/* TOKEN_OWNER (pack 4) */
TEST_TYPE(TOKEN_OWNER, 4, 4);
TEST_FIELD(TOKEN_OWNER, PSID, Owner, 0, 4, 4);
/* TOKEN_PRIMARY_GROUP (pack 4) */
TEST_TYPE(TOKEN_PRIMARY_GROUP, 4, 4);
TEST_FIELD(TOKEN_PRIMARY_GROUP, PSID, PrimaryGroup, 0, 4, 4);
/* TOKEN_PRIVILEGES (pack 4) */
TEST_TYPE(TOKEN_PRIVILEGES, 16, 4);
TEST_FIELD(TOKEN_PRIVILEGES, DWORD, PrivilegeCount, 0, 4, 4);
TEST_FIELD(TOKEN_PRIVILEGES, LUID_AND_ATTRIBUTES[ANYSIZE_ARRAY], Privileges, 4, 12, 4);
/* TOKEN_SOURCE (pack 4) */
TEST_TYPE(TOKEN_SOURCE, 16, 4);
TEST_FIELD(TOKEN_SOURCE, char[8], Sourcename, 0, 8, 1);
TEST_FIELD(TOKEN_SOURCE, LUID, SourceIdentifier, 8, 8, 4);
/* TOKEN_USER (pack 4) */
TEST_TYPE(TOKEN_USER, 8, 4);
TEST_FIELD(TOKEN_USER, SID_AND_ATTRIBUTES, User, 0, 8, 4);
}
START_TEST(generated)
{
test_pack();
}