1 /* File generated automatically from tools/winapi/test.dat; do not edit! */
2 /* This file can be copied, modified and distributed without restriction. */
5 * Unit tests for data structure packing
10 #include "wine/test.h"
15 /***********************************************************************
16 * Windows API extension
19 #if (_MSC_VER >= 1300) && defined(__cplusplus)
20 # define FIELD_ALIGNMENT(type, field) __alignof(((type*)0)->field)
21 #elif defined(__GNUC__)
22 # define FIELD_ALIGNMENT(type, field) __alignof__(((type*)0)->field)
24 /* FIXME: Not sure if is possible to do without compiler extension */
27 /***********************************************************************
31 #ifdef FIELD_ALIGNMENT
32 # define TEST_FIELD_ALIGNMENT(type, field, align) \
33 ok(FIELD_ALIGNMENT(type, field) == align, \
34 "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")", \
35 FIELD_ALIGNMENT(type, field))
37 # define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
40 #define TEST_FIELD_OFFSET(type, field, offset) \
41 ok(FIELD_OFFSET(type, field) == offset, \
42 "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")", \
43 FIELD_OFFSET(type, field))
45 #define TEST_TYPE_ALIGNMENT(type, align) \
46 ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")", TYPE_ALIGNMENT(type))
48 #define TEST_TYPE_SIZE(type, size) \
49 ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")", sizeof(type))
51 /***********************************************************************
55 #define TEST_FIELD(type, field_type, field_name, field_offset, field_size, field_align) \
56 TEST_TYPE_SIZE(field_type, field_size); \
57 TEST_FIELD_ALIGNMENT(type, field_name, field_align); \
58 TEST_FIELD_OFFSET(type, field_name, field_offset); \
60 #define TEST_TYPE(type, size, align) \
61 TEST_TYPE_ALIGNMENT(type, align); \
62 TEST_TYPE_SIZE(type, size)
66 /* ACCESS_ALLOWED_ACE (pack 4) */
67 TEST_TYPE(ACCESS_ALLOWED_ACE, 12, 4);
68 TEST_FIELD(ACCESS_ALLOWED_ACE, ACE_HEADER, Header, 0, 4, 2);
69 TEST_FIELD(ACCESS_ALLOWED_ACE, DWORD, Mask, 4, 4, 4);
70 TEST_FIELD(ACCESS_ALLOWED_ACE, DWORD, SidStart, 8, 4, 4);
72 /* ACCESS_DENIED_ACE (pack 4) */
73 TEST_TYPE(ACCESS_DENIED_ACE, 12, 4);
74 TEST_FIELD(ACCESS_DENIED_ACE, ACE_HEADER, Header, 0, 4, 2);
75 TEST_FIELD(ACCESS_DENIED_ACE, DWORD, Mask, 4, 4, 4);
76 TEST_FIELD(ACCESS_DENIED_ACE, DWORD, SidStart, 8, 4, 4);
78 /* ACE_HEADER (pack 4) */
79 TEST_TYPE(ACE_HEADER, 4, 2);
80 TEST_FIELD(ACE_HEADER, BYTE, AceType, 0, 1, 1);
81 TEST_FIELD(ACE_HEADER, BYTE, AceFlags, 1, 1, 1);
82 TEST_FIELD(ACE_HEADER, WORD, AceSize, 2, 2, 2);
86 TEST_FIELD(ACL, BYTE, AclRevision, 0, 1, 1);
87 TEST_FIELD(ACL, BYTE, Sbz1, 1, 1, 1);
88 TEST_FIELD(ACL, WORD, AclSize, 2, 2, 2);
89 TEST_FIELD(ACL, WORD, AceCount, 4, 2, 2);
90 TEST_FIELD(ACL, WORD, Sbz2, 6, 2, 2);
92 /* CONTEXT86 (pack 4) */
93 TEST_TYPE(CONTEXT86, 716, 4);
94 TEST_FIELD(CONTEXT86, DWORD, ContextFlags, 0, 4, 4);
95 TEST_FIELD(CONTEXT86, DWORD, Dr0, 4, 4, 4);
96 TEST_FIELD(CONTEXT86, DWORD, Dr1, 8, 4, 4);
97 TEST_FIELD(CONTEXT86, DWORD, Dr2, 12, 4, 4);
98 TEST_FIELD(CONTEXT86, DWORD, Dr3, 16, 4, 4);
99 TEST_FIELD(CONTEXT86, DWORD, Dr6, 20, 4, 4);
100 TEST_FIELD(CONTEXT86, DWORD, Dr7, 24, 4, 4);
101 TEST_FIELD(CONTEXT86, FLOATING_SAVE_AREA, FloatSave, 28, 112, 4);
102 TEST_FIELD(CONTEXT86, DWORD, SegGs, 140, 4, 4);
103 TEST_FIELD(CONTEXT86, DWORD, SegFs, 144, 4, 4);
104 TEST_FIELD(CONTEXT86, DWORD, SegEs, 148, 4, 4);
105 TEST_FIELD(CONTEXT86, DWORD, SegDs, 152, 4, 4);
106 TEST_FIELD(CONTEXT86, DWORD, Edi, 156, 4, 4);
107 TEST_FIELD(CONTEXT86, DWORD, Esi, 160, 4, 4);
108 TEST_FIELD(CONTEXT86, DWORD, Ebx, 164, 4, 4);
109 TEST_FIELD(CONTEXT86, DWORD, Edx, 168, 4, 4);
110 TEST_FIELD(CONTEXT86, DWORD, Ecx, 172, 4, 4);
111 TEST_FIELD(CONTEXT86, DWORD, Eax, 176, 4, 4);
112 TEST_FIELD(CONTEXT86, DWORD, Ebp, 180, 4, 4);
113 TEST_FIELD(CONTEXT86, DWORD, Eip, 184, 4, 4);
114 TEST_FIELD(CONTEXT86, DWORD, SegCs, 188, 4, 4);
115 TEST_FIELD(CONTEXT86, DWORD, EFlags, 192, 4, 4);
116 TEST_FIELD(CONTEXT86, DWORD, Esp, 196, 4, 4);
117 TEST_FIELD(CONTEXT86, DWORD, SegSs, 200, 4, 4);
118 TEST_FIELD(CONTEXT86, BYTE[MAXIMUM_SUPPORTED_EXTENSION], ExtendedRegisters, 204, 512, 1);
120 /* EXCEPTION_POINTERS (pack 4) */
121 TEST_TYPE(EXCEPTION_POINTERS, 8, 4);
122 TEST_FIELD(EXCEPTION_POINTERS, PEXCEPTION_RECORD, ExceptionRecord, 0, 4, 4);
123 TEST_FIELD(EXCEPTION_POINTERS, PCONTEXT, ContextRecord, 4, 4, 4);
125 /* EXCEPTION_RECORD (pack 4) */
126 TEST_TYPE(EXCEPTION_RECORD, 80, 4);
127 TEST_FIELD(EXCEPTION_RECORD, DWORD, ExceptionCode, 0, 4, 4);
128 TEST_FIELD(EXCEPTION_RECORD, DWORD, ExceptionFlags, 4, 4, 4);
129 TEST_FIELD(EXCEPTION_RECORD, struct __EXCEPTION_RECORD *, ExceptionRecord, 8, 4, 4);
130 TEST_FIELD(EXCEPTION_RECORD, LPVOID, ExceptionAddress, 12, 4, 4);
131 TEST_FIELD(EXCEPTION_RECORD, DWORD, NumberParameters, 16, 4, 4);
132 TEST_FIELD(EXCEPTION_RECORD, DWORD[EXCEPTION_MAXIMUM_PARAMETERS], ExceptionInformation, 20, 60, 4);
134 /* FLOATING_SAVE_AREA (pack 4) */
135 TEST_TYPE(FLOATING_SAVE_AREA, 112, 4);
136 TEST_FIELD(FLOATING_SAVE_AREA, DWORD, ControlWord, 0, 4, 4);
137 TEST_FIELD(FLOATING_SAVE_AREA, DWORD, StatusWord, 4, 4, 4);
138 TEST_FIELD(FLOATING_SAVE_AREA, DWORD, TagWord, 8, 4, 4);
139 TEST_FIELD(FLOATING_SAVE_AREA, DWORD, ErrorOffset, 12, 4, 4);
140 TEST_FIELD(FLOATING_SAVE_AREA, DWORD, ErrorSelector, 16, 4, 4);
141 TEST_FIELD(FLOATING_SAVE_AREA, DWORD, DataOffset, 20, 4, 4);
142 TEST_FIELD(FLOATING_SAVE_AREA, DWORD, DataSelector, 24, 4, 4);
143 TEST_FIELD(FLOATING_SAVE_AREA, BYTE[SIZE_OF_80387_REGISTERS], RegisterArea, 28, 80, 1);
144 TEST_FIELD(FLOATING_SAVE_AREA, DWORD, Cr0NpxState, 108, 4, 4);
146 /* FPO_DATA (pack 4) */
147 TEST_TYPE(FPO_DATA, 16, 4);
148 TEST_FIELD(FPO_DATA, DWORD, ulOffStart, 0, 4, 4);
149 TEST_FIELD(FPO_DATA, DWORD, cbProcSize, 4, 4, 4);
150 TEST_FIELD(FPO_DATA, DWORD, cdwLocals, 8, 4, 4);
151 TEST_FIELD(FPO_DATA, WORD, cdwParams, 12, 2, 2);
153 /* GENERIC_MAPPING (pack 4) */
154 TEST_TYPE(GENERIC_MAPPING, 16, 4);
155 TEST_FIELD(GENERIC_MAPPING, ACCESS_MASK, GenericRead, 0, 4, 4);
156 TEST_FIELD(GENERIC_MAPPING, ACCESS_MASK, GenericWrite, 4, 4, 4);
157 TEST_FIELD(GENERIC_MAPPING, ACCESS_MASK, GenericExecute, 8, 4, 4);
158 TEST_FIELD(GENERIC_MAPPING, ACCESS_MASK, GenericAll, 12, 4, 4);
160 /* IMAGE_ARCHIVE_MEMBER_HEADER (pack 4) */
161 TEST_TYPE(IMAGE_ARCHIVE_MEMBER_HEADER, 60, 1);
162 TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, BYTE[16], Name, 0, 16, 1);
163 TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, BYTE[12], Date, 16, 12, 1);
164 TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, BYTE[6], UserID, 28, 6, 1);
165 TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, BYTE[6], GroupID, 34, 6, 1);
166 TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, BYTE[8], Mode, 40, 8, 1);
167 TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, BYTE[10], Size, 48, 10, 1);
168 TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, BYTE[2], EndHeader, 58, 2, 1);
170 /* IMAGE_AUX_SYMBOL (pack 2) */
172 /* IMAGE_BASE_RELOCATION (pack 2) */
173 TEST_TYPE(IMAGE_BASE_RELOCATION, 8, 2);
174 TEST_FIELD(IMAGE_BASE_RELOCATION, DWORD, VirtualAddress, 0, 4, 2);
175 TEST_FIELD(IMAGE_BASE_RELOCATION, DWORD, SizeOfBlock, 4, 4, 2);
177 /* IMAGE_BOUND_FORWARDER_REF (pack 4) */
178 TEST_TYPE(IMAGE_BOUND_FORWARDER_REF, 8, 4);
179 TEST_FIELD(IMAGE_BOUND_FORWARDER_REF, DWORD, TimeDateStamp, 0, 4, 4);
180 TEST_FIELD(IMAGE_BOUND_FORWARDER_REF, WORD, OffsetModuleName, 4, 2, 2);
181 TEST_FIELD(IMAGE_BOUND_FORWARDER_REF, WORD, Reserved, 6, 2, 2);
183 /* IMAGE_BOUND_IMPORT_DESCRIPTOR (pack 4) */
184 TEST_TYPE(IMAGE_BOUND_IMPORT_DESCRIPTOR, 8, 4);
185 TEST_FIELD(IMAGE_BOUND_IMPORT_DESCRIPTOR, DWORD, TimeDateStamp, 0, 4, 4);
186 TEST_FIELD(IMAGE_BOUND_IMPORT_DESCRIPTOR, WORD, OffsetModuleName, 4, 2, 2);
187 TEST_FIELD(IMAGE_BOUND_IMPORT_DESCRIPTOR, WORD, NumberOfModuleForwarderRefs, 6, 2, 2);
189 /* IMAGE_COFF_SYMBOLS_HEADER (pack 4) */
190 TEST_TYPE(IMAGE_COFF_SYMBOLS_HEADER, 32, 4);
191 TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, DWORD, NumberOfSymbols, 0, 4, 4);
192 TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, DWORD, LvaToFirstSymbol, 4, 4, 4);
193 TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, DWORD, NumberOfLinenumbers, 8, 4, 4);
194 TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, DWORD, LvaToFirstLinenumber, 12, 4, 4);
195 TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, DWORD, RvaToFirstByteOfCode, 16, 4, 4);
196 TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, DWORD, RvaToLastByteOfCode, 20, 4, 4);
197 TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, DWORD, RvaToFirstByteOfData, 24, 4, 4);
198 TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, DWORD, RvaToLastByteOfData, 28, 4, 4);
200 /* IMAGE_DATA_DIRECTORY (pack 4) */
201 TEST_TYPE(IMAGE_DATA_DIRECTORY, 8, 4);
202 TEST_FIELD(IMAGE_DATA_DIRECTORY, DWORD, VirtualAddress, 0, 4, 4);
203 TEST_FIELD(IMAGE_DATA_DIRECTORY, DWORD, Size, 4, 4, 4);
205 /* IMAGE_DEBUG_DIRECTORY (pack 4) */
206 TEST_TYPE(IMAGE_DEBUG_DIRECTORY, 28, 4);
207 TEST_FIELD(IMAGE_DEBUG_DIRECTORY, DWORD, Characteristics, 0, 4, 4);
208 TEST_FIELD(IMAGE_DEBUG_DIRECTORY, DWORD, TimeDateStamp, 4, 4, 4);
209 TEST_FIELD(IMAGE_DEBUG_DIRECTORY, WORD, MajorVersion, 8, 2, 2);
210 TEST_FIELD(IMAGE_DEBUG_DIRECTORY, WORD, MinorVersion, 10, 2, 2);
211 TEST_FIELD(IMAGE_DEBUG_DIRECTORY, DWORD, Type, 12, 4, 4);
212 TEST_FIELD(IMAGE_DEBUG_DIRECTORY, DWORD, SizeOfData, 16, 4, 4);
213 TEST_FIELD(IMAGE_DEBUG_DIRECTORY, DWORD, AddressOfRawData, 20, 4, 4);
214 TEST_FIELD(IMAGE_DEBUG_DIRECTORY, DWORD, PointerToRawData, 24, 4, 4);
216 /* IMAGE_DEBUG_MISC (pack 4) */
217 TEST_TYPE(IMAGE_DEBUG_MISC, 16, 4);
218 TEST_FIELD(IMAGE_DEBUG_MISC, DWORD, DataType, 0, 4, 4);
219 TEST_FIELD(IMAGE_DEBUG_MISC, DWORD, Length, 4, 4, 4);
220 TEST_FIELD(IMAGE_DEBUG_MISC, BYTE, Unicode, 8, 1, 1);
221 TEST_FIELD(IMAGE_DEBUG_MISC, BYTE[ 3 ], Reserved, 9, 3, 1);
222 TEST_FIELD(IMAGE_DEBUG_MISC, BYTE[ 1 ], Data, 12, 1, 1);
224 /* IMAGE_DOS_HEADER (pack 4) */
225 TEST_TYPE(IMAGE_DOS_HEADER, 64, 4);
226 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_magic, 0, 2, 2);
227 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_cblp, 2, 2, 2);
228 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_cp, 4, 2, 2);
229 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_crlc, 6, 2, 2);
230 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_cparhdr, 8, 2, 2);
231 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_minalloc, 10, 2, 2);
232 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_maxalloc, 12, 2, 2);
233 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_ss, 14, 2, 2);
234 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_sp, 16, 2, 2);
235 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_csum, 18, 2, 2);
236 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_ip, 20, 2, 2);
237 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_cs, 22, 2, 2);
238 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_lfarlc, 24, 2, 2);
239 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_ovno, 26, 2, 2);
240 TEST_FIELD(IMAGE_DOS_HEADER, WORD[4], e_res, 28, 8, 2);
241 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_oemid, 36, 2, 2);
242 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_oeminfo, 38, 2, 2);
243 TEST_FIELD(IMAGE_DOS_HEADER, WORD[10], e_res2, 40, 20, 2);
244 TEST_FIELD(IMAGE_DOS_HEADER, DWORD, e_lfanew, 60, 4, 4);
246 /* IMAGE_EXPORT_DIRECTORY (pack 4) */
247 TEST_TYPE(IMAGE_EXPORT_DIRECTORY, 40, 4);
248 TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, Characteristics, 0, 4, 4);
249 TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, TimeDateStamp, 4, 4, 4);
250 TEST_FIELD(IMAGE_EXPORT_DIRECTORY, WORD, MajorVersion, 8, 2, 2);
251 TEST_FIELD(IMAGE_EXPORT_DIRECTORY, WORD, MinorVersion, 10, 2, 2);
252 TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, Name, 12, 4, 4);
253 TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, Base, 16, 4, 4);
254 TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, NumberOfFunctions, 20, 4, 4);
255 TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, NumberOfNames, 24, 4, 4);
256 TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, AddressOfFunctions, 28, 4, 4);
257 TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, AddressOfNames, 32, 4, 4);
258 TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, AddressOfNameOrdinals, 36, 4, 4);
260 /* IMAGE_FILE_HEADER (pack 4) */
261 TEST_TYPE(IMAGE_FILE_HEADER, 20, 4);
262 TEST_FIELD(IMAGE_FILE_HEADER, WORD, Machine, 0, 2, 2);
263 TEST_FIELD(IMAGE_FILE_HEADER, WORD, NumberOfSections, 2, 2, 2);
264 TEST_FIELD(IMAGE_FILE_HEADER, DWORD, TimeDateStamp, 4, 4, 4);
265 TEST_FIELD(IMAGE_FILE_HEADER, DWORD, PointerToSymbolTable, 8, 4, 4);
266 TEST_FIELD(IMAGE_FILE_HEADER, DWORD, NumberOfSymbols, 12, 4, 4);
267 TEST_FIELD(IMAGE_FILE_HEADER, WORD, SizeOfOptionalHeader, 16, 2, 2);
268 TEST_FIELD(IMAGE_FILE_HEADER, WORD, Characteristics, 18, 2, 2);
270 /* IMAGE_FUNCTION_ENTRY (pack 4) */
271 TEST_TYPE(IMAGE_FUNCTION_ENTRY, 12, 4);
272 TEST_FIELD(IMAGE_FUNCTION_ENTRY, DWORD, StartingAddress, 0, 4, 4);
273 TEST_FIELD(IMAGE_FUNCTION_ENTRY, DWORD, EndingAddress, 4, 4, 4);
274 TEST_FIELD(IMAGE_FUNCTION_ENTRY, DWORD, EndOfPrologue, 8, 4, 4);
276 /* IMAGE_IMPORT_BY_NAME (pack 4) */
277 TEST_TYPE(IMAGE_IMPORT_BY_NAME, 4, 2);
278 TEST_FIELD(IMAGE_IMPORT_BY_NAME, WORD, Hint, 0, 2, 2);
279 TEST_FIELD(IMAGE_IMPORT_BY_NAME, BYTE[1], Name, 2, 1, 1);
281 /* IMAGE_LOAD_CONFIG_DIRECTORY (pack 4) */
282 TEST_TYPE(IMAGE_LOAD_CONFIG_DIRECTORY, 64, 4);
283 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, Characteristics, 0, 4, 4);
284 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, TimeDateStamp, 4, 4, 4);
285 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, WORD, MajorVersion, 8, 2, 2);
286 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, WORD, MinorVersion, 10, 2, 2);
287 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, GlobalFlagsClear, 12, 4, 4);
288 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, GlobalFlagsSet, 16, 4, 4);
289 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, CriticalSectionDefaultTimeout, 20, 4, 4);
290 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, DeCommitFreeBlockThreshold, 24, 4, 4);
291 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, DeCommitTotalFreeThreshold, 28, 4, 4);
292 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, PVOID, LockPrefixTable, 32, 4, 4);
293 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, MaximumAllocationSize, 36, 4, 4);
294 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, VirtualMemoryThreshold, 40, 4, 4);
295 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, ProcessHeapFlags, 44, 4, 4);
296 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, ProcessAffinityMask, 48, 4, 4);
297 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, WORD, CSDVersion, 52, 2, 2);
298 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, WORD, Reserved1, 54, 2, 2);
299 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, PVOID, EditList, 56, 4, 4);
300 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD[1], Reserved, 60, 4, 4);
302 /* IMAGE_NT_HEADERS (pack 4) */
303 TEST_TYPE(IMAGE_NT_HEADERS, 248, 4);
304 TEST_FIELD(IMAGE_NT_HEADERS, DWORD, Signature, 0, 4, 4);
305 TEST_FIELD(IMAGE_NT_HEADERS, IMAGE_FILE_HEADER, FileHeader, 4, 20, 4);
306 TEST_FIELD(IMAGE_NT_HEADERS, IMAGE_OPTIONAL_HEADER, OptionalHeader, 24, 224, 4);
308 /* IMAGE_OPTIONAL_HEADER (pack 4) */
309 TEST_TYPE(IMAGE_OPTIONAL_HEADER, 224, 4);
310 TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, Magic, 0, 2, 2);
311 TEST_FIELD(IMAGE_OPTIONAL_HEADER, BYTE, MajorLinkerVersion, 2, 1, 1);
312 TEST_FIELD(IMAGE_OPTIONAL_HEADER, BYTE, MinorLinkerVersion, 3, 1, 1);
313 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfCode, 4, 4, 4);
314 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfInitializedData, 8, 4, 4);
315 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfUninitializedData, 12, 4, 4);
316 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, AddressOfEntryPoint, 16, 4, 4);
317 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, BaseOfCode, 20, 4, 4);
318 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, BaseOfData, 24, 4, 4);
319 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, ImageBase, 28, 4, 4);
320 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SectionAlignment, 32, 4, 4);
321 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, FileAlignment, 36, 4, 4);
322 TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, MajorOperatingSystemVersion, 40, 2, 2);
323 TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, MinorOperatingSystemVersion, 42, 2, 2);
324 TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, MajorImageVersion, 44, 2, 2);
325 TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, MinorImageVersion, 46, 2, 2);
326 TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, MajorSubsystemVersion, 48, 2, 2);
327 TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, MinorSubsystemVersion, 50, 2, 2);
328 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, Win32VersionValue, 52, 4, 4);
329 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfImage, 56, 4, 4);
330 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfHeaders, 60, 4, 4);
331 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, CheckSum, 64, 4, 4);
332 TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, Subsystem, 68, 2, 2);
333 TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, DllCharacteristics, 70, 2, 2);
334 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfStackReserve, 72, 4, 4);
335 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfStackCommit, 76, 4, 4);
336 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfHeapReserve, 80, 4, 4);
337 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfHeapCommit, 84, 4, 4);
338 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, LoaderFlags, 88, 4, 4);
339 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, NumberOfRvaAndSizes, 92, 4, 4);
340 TEST_FIELD(IMAGE_OPTIONAL_HEADER, IMAGE_DATA_DIRECTORY[IMAGE_NUMBEROF_DIRECTORY_ENTRIES], DataDirectory, 96, 128, 4);
342 /* IMAGE_OS2_HEADER (pack 4) */
343 TEST_TYPE(IMAGE_OS2_HEADER, 64, 4);
344 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_magic, 0, 2, 2);
345 TEST_FIELD(IMAGE_OS2_HEADER, BYTE, ne_ver, 2, 1, 1);
346 TEST_FIELD(IMAGE_OS2_HEADER, BYTE, ne_rev, 3, 1, 1);
347 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_enttab, 4, 2, 2);
348 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_cbenttab, 6, 2, 2);
349 TEST_FIELD(IMAGE_OS2_HEADER, LONG, ne_crc, 8, 4, 4);
350 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_flags, 12, 2, 2);
351 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_autodata, 14, 2, 2);
352 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_heap, 16, 2, 2);
353 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_stack, 18, 2, 2);
354 TEST_FIELD(IMAGE_OS2_HEADER, DWORD, ne_csip, 20, 4, 4);
355 TEST_FIELD(IMAGE_OS2_HEADER, DWORD, ne_sssp, 24, 4, 4);
356 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_cseg, 28, 2, 2);
357 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_cmod, 30, 2, 2);
358 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_cbnrestab, 32, 2, 2);
359 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_segtab, 34, 2, 2);
360 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_rsrctab, 36, 2, 2);
361 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_restab, 38, 2, 2);
362 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_modtab, 40, 2, 2);
363 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_imptab, 42, 2, 2);
364 TEST_FIELD(IMAGE_OS2_HEADER, DWORD, ne_nrestab, 44, 4, 4);
365 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_cmovent, 48, 2, 2);
366 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_align, 50, 2, 2);
367 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_cres, 52, 2, 2);
368 TEST_FIELD(IMAGE_OS2_HEADER, BYTE, ne_exetyp, 54, 1, 1);
369 TEST_FIELD(IMAGE_OS2_HEADER, BYTE, ne_flagsothers, 55, 1, 1);
370 TEST_FIELD(IMAGE_OS2_HEADER, WORD, fastload_offset, 56, 2, 2);
371 TEST_FIELD(IMAGE_OS2_HEADER, WORD, fastload_length, 58, 2, 2);
372 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_swaparea, 60, 2, 2);
373 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_expver, 62, 2, 2);
375 /* IMAGE_RESOURCE_DATA_ENTRY (pack 4) */
376 TEST_TYPE(IMAGE_RESOURCE_DATA_ENTRY, 16, 4);
377 TEST_FIELD(IMAGE_RESOURCE_DATA_ENTRY, DWORD, OffsetToData, 0, 4, 4);
378 TEST_FIELD(IMAGE_RESOURCE_DATA_ENTRY, DWORD, Size, 4, 4, 4);
379 TEST_FIELD(IMAGE_RESOURCE_DATA_ENTRY, DWORD, CodePage, 8, 4, 4);
380 TEST_FIELD(IMAGE_RESOURCE_DATA_ENTRY, DWORD, ResourceHandle, 12, 4, 4);
382 /* IMAGE_RESOURCE_DIRECTORY (pack 4) */
383 TEST_TYPE(IMAGE_RESOURCE_DIRECTORY, 16, 4);
384 TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, DWORD, Characteristics, 0, 4, 4);
385 TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, DWORD, TimeDateStamp, 4, 4, 4);
386 TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, WORD, MajorVersion, 8, 2, 2);
387 TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, WORD, MinorVersion, 10, 2, 2);
388 TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, WORD, NumberOfNamedEntries, 12, 2, 2);
389 TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, WORD, NumberOfIdEntries, 14, 2, 2);
391 /* IMAGE_RESOURCE_DIRECTORY_ENTRY (pack 4) */
393 /* IMAGE_RESOURCE_DIRECTORY_STRING (pack 4) */
394 TEST_TYPE(IMAGE_RESOURCE_DIRECTORY_STRING, 4, 2);
395 TEST_FIELD(IMAGE_RESOURCE_DIRECTORY_STRING, WORD, Length, 0, 2, 2);
396 TEST_FIELD(IMAGE_RESOURCE_DIRECTORY_STRING, CHAR[ 1 ], NameString, 2, 1, 1);
398 /* IMAGE_RESOURCE_DIR_STRING_U (pack 4) */
399 TEST_TYPE(IMAGE_RESOURCE_DIR_STRING_U, 4, 2);
400 TEST_FIELD(IMAGE_RESOURCE_DIR_STRING_U, WORD, Length, 0, 2, 2);
401 TEST_FIELD(IMAGE_RESOURCE_DIR_STRING_U, WCHAR[ 1 ], NameString, 2, 2, 2);
403 /* IMAGE_SEPARATE_DEBUG_HEADER (pack 4) */
404 TEST_TYPE(IMAGE_SEPARATE_DEBUG_HEADER, 48, 4);
405 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, WORD, Signature, 0, 2, 2);
406 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, WORD, Flags, 2, 2, 2);
407 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, WORD, Machine, 4, 2, 2);
408 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, WORD, Characteristics, 6, 2, 2);
409 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, TimeDateStamp, 8, 4, 4);
410 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, CheckSum, 12, 4, 4);
411 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, ImageBase, 16, 4, 4);
412 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, SizeOfImage, 20, 4, 4);
413 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, NumberOfSections, 24, 4, 4);
414 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, ExportedNamesSize, 28, 4, 4);
415 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, DebugDirectorySize, 32, 4, 4);
416 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, SectionAlignment, 36, 4, 4);
417 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD[ 2 ], Reserved, 40, 8, 4);
419 /* IMAGE_THUNK_DATA (pack 4) */
421 /* IMAGE_TLS_DIRECTORY (pack 4) */
422 TEST_TYPE(IMAGE_TLS_DIRECTORY, 24, 4);
423 TEST_FIELD(IMAGE_TLS_DIRECTORY, DWORD, StartAddressOfRawData, 0, 4, 4);
424 TEST_FIELD(IMAGE_TLS_DIRECTORY, DWORD, EndAddressOfRawData, 4, 4, 4);
425 TEST_FIELD(IMAGE_TLS_DIRECTORY, LPDWORD, AddressOfIndex, 8, 4, 4);
426 TEST_FIELD(IMAGE_TLS_DIRECTORY, PIMAGE_TLS_CALLBACK *, AddressOfCallBacks, 12, 4, 4);
427 TEST_FIELD(IMAGE_TLS_DIRECTORY, DWORD, SizeOfZeroFill, 16, 4, 4);
428 TEST_FIELD(IMAGE_TLS_DIRECTORY, DWORD, Characteristics, 20, 4, 4);
430 /* IMAGE_VXD_HEADER (pack 4) */
431 TEST_TYPE(IMAGE_VXD_HEADER, 196, 4);
432 TEST_FIELD(IMAGE_VXD_HEADER, WORD, e32_magic, 0, 2, 2);
433 TEST_FIELD(IMAGE_VXD_HEADER, BYTE, e32_border, 2, 1, 1);
434 TEST_FIELD(IMAGE_VXD_HEADER, BYTE, e32_worder, 3, 1, 1);
435 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_level, 4, 4, 4);
436 TEST_FIELD(IMAGE_VXD_HEADER, WORD, e32_cpu, 8, 2, 2);
437 TEST_FIELD(IMAGE_VXD_HEADER, WORD, e32_os, 10, 2, 2);
438 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_ver, 12, 4, 4);
439 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_mflags, 16, 4, 4);
440 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_mpages, 20, 4, 4);
441 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_startobj, 24, 4, 4);
442 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_eip, 28, 4, 4);
443 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_stackobj, 32, 4, 4);
444 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_esp, 36, 4, 4);
445 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_pagesize, 40, 4, 4);
446 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_lastpagesize, 44, 4, 4);
447 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_fixupsize, 48, 4, 4);
448 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_fixupsum, 52, 4, 4);
449 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_ldrsize, 56, 4, 4);
450 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_ldrsum, 60, 4, 4);
451 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_objtab, 64, 4, 4);
452 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_objcnt, 68, 4, 4);
453 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_objmap, 72, 4, 4);
454 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_itermap, 76, 4, 4);
455 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_rsrctab, 80, 4, 4);
456 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_rsrccnt, 84, 4, 4);
457 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_restab, 88, 4, 4);
458 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_enttab, 92, 4, 4);
459 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_dirtab, 96, 4, 4);
460 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_dircnt, 100, 4, 4);
461 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_fpagetab, 104, 4, 4);
462 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_frectab, 108, 4, 4);
463 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_impmod, 112, 4, 4);
464 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_impmodcnt, 116, 4, 4);
465 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_impproc, 120, 4, 4);
466 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_pagesum, 124, 4, 4);
467 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_datapage, 128, 4, 4);
468 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_preload, 132, 4, 4);
469 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_nrestab, 136, 4, 4);
470 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_cbnrestab, 140, 4, 4);
471 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_nressum, 144, 4, 4);
472 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_autodata, 148, 4, 4);
473 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_debuginfo, 152, 4, 4);
474 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_debuglen, 156, 4, 4);
475 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_instpreload, 160, 4, 4);
476 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_instdemand, 164, 4, 4);
477 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_heapsize, 168, 4, 4);
478 TEST_FIELD(IMAGE_VXD_HEADER, BYTE[12], e32_res3, 172, 12, 1);
479 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_winresoff, 184, 4, 4);
480 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_winreslen, 188, 4, 4);
481 TEST_FIELD(IMAGE_VXD_HEADER, WORD, e32_devid, 192, 2, 2);
482 TEST_FIELD(IMAGE_VXD_HEADER, WORD, e32_ddkver, 194, 2, 2);
484 /* LIST_ENTRY (pack 4) */
485 TEST_TYPE(LIST_ENTRY, 8, 4);
486 TEST_FIELD(LIST_ENTRY, struct _LIST_ENTRY *, Flink, 0, 4, 4);
487 TEST_FIELD(LIST_ENTRY, struct _LIST_ENTRY *, Blink, 4, 4, 4);
490 TEST_TYPE(LUID, 8, 4);
491 TEST_FIELD(LUID, DWORD, LowPart, 0, 4, 4);
492 TEST_FIELD(LUID, LONG, HighPart, 4, 4, 4);
494 /* LUID_AND_ATTRIBUTES (pack 4) */
495 TEST_TYPE(LUID_AND_ATTRIBUTES, 12, 4);
496 TEST_FIELD(LUID_AND_ATTRIBUTES, LUID, Luid, 0, 8, 4);
497 TEST_FIELD(LUID_AND_ATTRIBUTES, DWORD, Attributes, 8, 4, 4);
499 /* MEMORY_BASIC_INFORMATION (pack 4) */
500 TEST_TYPE(MEMORY_BASIC_INFORMATION, 28, 4);
501 TEST_FIELD(MEMORY_BASIC_INFORMATION, LPVOID, BaseAddress, 0, 4, 4);
502 TEST_FIELD(MEMORY_BASIC_INFORMATION, LPVOID, AllocationBase, 4, 4, 4);
503 TEST_FIELD(MEMORY_BASIC_INFORMATION, DWORD, AllocationProtect, 8, 4, 4);
504 TEST_FIELD(MEMORY_BASIC_INFORMATION, DWORD, RegionSize, 12, 4, 4);
505 TEST_FIELD(MEMORY_BASIC_INFORMATION, DWORD, State, 16, 4, 4);
506 TEST_FIELD(MEMORY_BASIC_INFORMATION, DWORD, Protect, 20, 4, 4);
507 TEST_FIELD(MEMORY_BASIC_INFORMATION, DWORD, Type, 24, 4, 4);
509 /* MESSAGE_RESOURCE_BLOCK (pack 4) */
510 TEST_TYPE(MESSAGE_RESOURCE_BLOCK, 12, 4);
511 TEST_FIELD(MESSAGE_RESOURCE_BLOCK, DWORD, LowId, 0, 4, 4);
512 TEST_FIELD(MESSAGE_RESOURCE_BLOCK, DWORD, HighId, 4, 4, 4);
513 TEST_FIELD(MESSAGE_RESOURCE_BLOCK, DWORD, OffsetToEntries, 8, 4, 4);
515 /* MESSAGE_RESOURCE_DATA (pack 4) */
516 TEST_TYPE(MESSAGE_RESOURCE_DATA, 16, 4);
517 TEST_FIELD(MESSAGE_RESOURCE_DATA, DWORD, NumberOfBlocks, 0, 4, 4);
518 TEST_FIELD(MESSAGE_RESOURCE_DATA, MESSAGE_RESOURCE_BLOCK[ 1 ], Blocks, 4, 12, 4);
520 /* MESSAGE_RESOURCE_ENTRY (pack 4) */
521 TEST_TYPE(MESSAGE_RESOURCE_ENTRY, 6, 2);
522 TEST_FIELD(MESSAGE_RESOURCE_ENTRY, WORD, Length, 0, 2, 2);
523 TEST_FIELD(MESSAGE_RESOURCE_ENTRY, WORD, Flags, 2, 2, 2);
524 TEST_FIELD(MESSAGE_RESOURCE_ENTRY, BYTE[1], Text, 4, 1, 1);
526 /* PRIVILEGE_SET (pack 4) */
527 TEST_TYPE(PRIVILEGE_SET, 20, 4);
528 TEST_FIELD(PRIVILEGE_SET, DWORD, PrivilegeCount, 0, 4, 4);
529 TEST_FIELD(PRIVILEGE_SET, DWORD, Control, 4, 4, 4);
530 TEST_FIELD(PRIVILEGE_SET, LUID_AND_ATTRIBUTES[ANYSIZE_ARRAY], Privilege, 8, 12, 4);
532 /* RTL_CRITICAL_SECTION (pack 4) */
533 TEST_TYPE(RTL_CRITICAL_SECTION, 24, 4);
534 TEST_FIELD(RTL_CRITICAL_SECTION, PRTL_CRITICAL_SECTION_DEBUG, DebugInfo, 0, 4, 4);
535 TEST_FIELD(RTL_CRITICAL_SECTION, LONG, LockCount, 4, 4, 4);
536 TEST_FIELD(RTL_CRITICAL_SECTION, LONG, RecursionCount, 8, 4, 4);
537 TEST_FIELD(RTL_CRITICAL_SECTION, HANDLE, OwningThread, 12, 4, 4);
538 TEST_FIELD(RTL_CRITICAL_SECTION, HANDLE, LockSemaphore, 16, 4, 4);
539 TEST_FIELD(RTL_CRITICAL_SECTION, ULONG_PTR, SpinCount, 20, 4, 4);
541 /* RTL_CRITICAL_SECTION_DEBUG (pack 4) */
542 TEST_TYPE(RTL_CRITICAL_SECTION_DEBUG, 32, 4);
543 TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, WORD, Type, 0, 2, 2);
544 TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, WORD, CreatorBackTraceIndex, 2, 2, 2);
545 TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, struct _RTL_CRITICAL_SECTION *, CriticalSection, 4, 4, 4);
546 TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, LIST_ENTRY, ProcessLocksList, 8, 8, 4);
547 TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, DWORD, EntryCount, 16, 4, 4);
548 TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, DWORD, ContentionCount, 20, 4, 4);
549 TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, DWORD[ 2 ], Spare, 24, 8, 4);
551 /* SECURITY_DESCRIPTOR (pack 4) */
552 TEST_TYPE(SECURITY_DESCRIPTOR, 20, 4);
553 TEST_FIELD(SECURITY_DESCRIPTOR, BYTE, Revision, 0, 1, 1);
554 TEST_FIELD(SECURITY_DESCRIPTOR, BYTE, Sbz1, 1, 1, 1);
555 TEST_FIELD(SECURITY_DESCRIPTOR, SECURITY_DESCRIPTOR_CONTROL, Control, 2, 2, 2);
556 TEST_FIELD(SECURITY_DESCRIPTOR, PSID, Owner, 4, 4, 4);
557 TEST_FIELD(SECURITY_DESCRIPTOR, PSID, Group, 8, 4, 4);
558 TEST_FIELD(SECURITY_DESCRIPTOR, PACL, Sacl, 12, 4, 4);
559 TEST_FIELD(SECURITY_DESCRIPTOR, PACL, Dacl, 16, 4, 4);
561 /* SECURITY_DESCRIPTOR_RELATIVE (pack 4) */
562 TEST_TYPE(SECURITY_DESCRIPTOR_RELATIVE, 20, 4);
563 TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, BYTE, Revision, 0, 1, 1);
564 TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, BYTE, Sbz1, 1, 1, 1);
565 TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, SECURITY_DESCRIPTOR_CONTROL, Control, 2, 2, 2);
566 TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, DWORD, Owner, 4, 4, 4);
567 TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, DWORD, Group, 8, 4, 4);
568 TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, DWORD, Sacl, 12, 4, 4);
569 TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, DWORD, Dacl, 16, 4, 4);
572 TEST_TYPE(SID, 12, 4);
573 TEST_FIELD(SID, BYTE, Revision, 0, 1, 1);
574 TEST_FIELD(SID, BYTE, SubAuthorityCount, 1, 1, 1);
575 TEST_FIELD(SID, SID_IDENTIFIER_AUTHORITY, IdentifierAuthority, 2, 6, 1);
576 TEST_FIELD(SID, DWORD[1], SubAuthority, 8, 4, 4);
578 /* SID_AND_ATTRIBUTES (pack 4) */
579 TEST_TYPE(SID_AND_ATTRIBUTES, 8, 4);
580 TEST_FIELD(SID_AND_ATTRIBUTES, PSID, Sid, 0, 4, 4);
581 TEST_FIELD(SID_AND_ATTRIBUTES, DWORD, Attributes, 4, 4, 4);
583 /* SID_IDENTIFIER_AUTHORITY (pack 4) */
584 TEST_TYPE(SID_IDENTIFIER_AUTHORITY, 6, 1);
585 TEST_FIELD(SID_IDENTIFIER_AUTHORITY, BYTE[6], Value, 0, 6, 1);
587 /* SINGLE_LIST_ENTRY (pack 4) */
588 TEST_TYPE(SINGLE_LIST_ENTRY, 4, 4);
589 TEST_FIELD(SINGLE_LIST_ENTRY, struct _SINGLE_LIST_ENTRY *, Next, 0, 4, 4);
591 /* SYSTEM_ALARM_ACE (pack 4) */
592 TEST_TYPE(SYSTEM_ALARM_ACE, 12, 4);
593 TEST_FIELD(SYSTEM_ALARM_ACE, ACE_HEADER, Header, 0, 4, 2);
594 TEST_FIELD(SYSTEM_ALARM_ACE, DWORD, Mask, 4, 4, 4);
595 TEST_FIELD(SYSTEM_ALARM_ACE, DWORD, SidStart, 8, 4, 4);
597 /* SYSTEM_AUDIT_ACE (pack 4) */
598 TEST_TYPE(SYSTEM_AUDIT_ACE, 12, 4);
599 TEST_FIELD(SYSTEM_AUDIT_ACE, ACE_HEADER, Header, 0, 4, 2);
600 TEST_FIELD(SYSTEM_AUDIT_ACE, DWORD, Mask, 4, 4, 4);
601 TEST_FIELD(SYSTEM_AUDIT_ACE, DWORD, SidStart, 8, 4, 4);
603 /* TOKEN_DEFAULT_DACL (pack 4) */
604 TEST_TYPE(TOKEN_DEFAULT_DACL, 4, 4);
605 TEST_FIELD(TOKEN_DEFAULT_DACL, PACL, DefaultDacl, 0, 4, 4);
607 /* TOKEN_GROUPS (pack 4) */
608 TEST_TYPE(TOKEN_GROUPS, 12, 4);
609 TEST_FIELD(TOKEN_GROUPS, DWORD, GroupCount, 0, 4, 4);
610 TEST_FIELD(TOKEN_GROUPS, SID_AND_ATTRIBUTES[ANYSIZE_ARRAY], Groups, 4, 8, 4);
612 /* TOKEN_OWNER (pack 4) */
613 TEST_TYPE(TOKEN_OWNER, 4, 4);
614 TEST_FIELD(TOKEN_OWNER, PSID, Owner, 0, 4, 4);
616 /* TOKEN_PRIMARY_GROUP (pack 4) */
617 TEST_TYPE(TOKEN_PRIMARY_GROUP, 4, 4);
618 TEST_FIELD(TOKEN_PRIMARY_GROUP, PSID, PrimaryGroup, 0, 4, 4);
620 /* TOKEN_PRIVILEGES (pack 4) */
621 TEST_TYPE(TOKEN_PRIVILEGES, 16, 4);
622 TEST_FIELD(TOKEN_PRIVILEGES, DWORD, PrivilegeCount, 0, 4, 4);
623 TEST_FIELD(TOKEN_PRIVILEGES, LUID_AND_ATTRIBUTES[ANYSIZE_ARRAY], Privileges, 4, 12, 4);
625 /* TOKEN_SOURCE (pack 4) */
626 TEST_TYPE(TOKEN_SOURCE, 16, 4);
627 TEST_FIELD(TOKEN_SOURCE, char[8], Sourcename, 0, 8, 1);
628 TEST_FIELD(TOKEN_SOURCE, LUID, SourceIdentifier, 8, 8, 4);
630 /* TOKEN_USER (pack 4) */
631 TEST_TYPE(TOKEN_USER, 8, 4);
632 TEST_FIELD(TOKEN_USER, SID_AND_ATTRIBUTES, User, 0, 8, 4);
636 START_TEST(generated)