ntdll pending some winerror.h fixes
[reactos.git] / reactos / regtests / winetests / ntdll / generated.c
1 /* File generated automatically from tools/winapi/test.dat; do not edit! */
2 /* This file can be copied, modified and distributed without restriction. */
3
4 /*
5 * Unit tests for data structure packing
6 */
7
8 #define WINVER 0x0501
9 #define _WIN32_IE 0x0501
10 #define _WIN32_WINNT 0x0501
11
12 #define WINE_NOWINSOCK
13
14 #include "ntdll_test.h"
15
16 #include "wine/test.h"
17
18 /***********************************************************************
19 * Compability macros
20 */
21
22 #define DWORD_PTR UINT_PTR
23 #define LONG_PTR INT_PTR
24 #define ULONG_PTR UINT_PTR
25
26 /***********************************************************************
27 * Windows API extension
28 */
29
30 #if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
31 # define FIELD_ALIGNMENT(type, field) __alignof(((type*)0)->field)
32 #elif defined(__GNUC__)
33 # define FIELD_ALIGNMENT(type, field) __alignof__(((type*)0)->field)
34 #else
35 /* FIXME: Not sure if is possible to do without compiler extension */
36 #endif
37
38 #if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
39 # define _TYPE_ALIGNMENT(type) __alignof(type)
40 #elif defined(__GNUC__)
41 # define _TYPE_ALIGNMENT(type) __alignof__(type)
42 #else
43 /*
44 * FIXME: Not sure if is possible to do without compiler extension
45 * (if type is not just a name that is, if so the normal)
46 * TYPE_ALIGNMENT can be used)
47 */
48 #endif
49
50 #if defined(TYPE_ALIGNMENT) && defined(_MSC_VER) && _MSC_VER >= 800 && !defined(__cplusplus)
51 #pragma warning(disable:4116)
52 #endif
53
54 #if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT)
55 # define TYPE_ALIGNMENT _TYPE_ALIGNMENT
56 #endif
57
58 /***********************************************************************
59 * Test helper macros
60 */
61
62 #ifdef FIELD_ALIGNMENT
63 # define TEST_FIELD_ALIGNMENT(type, field, align) \
64 ok(FIELD_ALIGNMENT(type, field) == align, \
65 "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
66 (int)FIELD_ALIGNMENT(type, field))
67 #else
68 # define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
69 #endif
70
71 #define TEST_FIELD_OFFSET(type, field, offset) \
72 ok(FIELD_OFFSET(type, field) == offset, \
73 "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \
74 (long int)FIELD_OFFSET(type, field))
75
76 #ifdef _TYPE_ALIGNMENT
77 #define TEST__TYPE_ALIGNMENT(type, align) \
78 ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type))
79 #else
80 # define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
81 #endif
82
83 #ifdef TYPE_ALIGNMENT
84 #define TEST_TYPE_ALIGNMENT(type, align) \
85 ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type))
86 #else
87 # define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)
88 #endif
89
90 #define TEST_TYPE_SIZE(type, size) \
91 ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type)))
92
93 /***********************************************************************
94 * Test macros
95 */
96
97 #define TEST_FIELD(type, field_type, field_name, field_offset, field_size, field_align) \
98 TEST_TYPE_SIZE(field_type, field_size); \
99 TEST_FIELD_ALIGNMENT(type, field_name, field_align); \
100 TEST_FIELD_OFFSET(type, field_name, field_offset); \
101
102 #define TEST_TYPE(type, size, align) \
103 TEST_TYPE_ALIGNMENT(type, align); \
104 TEST_TYPE_SIZE(type, size)
105
106 #define TEST_TYPE_POINTER(type, size, align) \
107 TEST__TYPE_ALIGNMENT(*(type)0, align); \
108 TEST_TYPE_SIZE(*(type)0, size)
109
110 #define TEST_TYPE_SIGNED(type) \
111 ok((type) -1 < 0, "(" #type ") -1 < 0\n");
112
113 #define TEST_TYPE_UNSIGNED(type) \
114 ok((type) -1 > 0, "(" #type ") -1 > 0\n");
115
116 static void test_pack_DWORD32(void)
117 {
118 /* DWORD32 */
119 TEST_TYPE(DWORD32, 4, 4);
120 TEST_TYPE_UNSIGNED(DWORD32);
121 }
122
123 static void test_pack_DWORD64(void)
124 {
125 /* DWORD64 */
126 TEST_TYPE(DWORD64, 8, 8);
127 TEST_TYPE_UNSIGNED(DWORD64);
128 }
129
130 static void test_pack_DWORD_PTR(void)
131 {
132 /* DWORD_PTR */
133 TEST_TYPE(DWORD_PTR, 4, 4);
134 }
135
136 static void test_pack_HALF_PTR(void)
137 {
138 /* HALF_PTR */
139 TEST_TYPE(HALF_PTR, 2, 2);
140 TEST_TYPE_SIGNED(HALF_PTR);
141 }
142
143 static void test_pack_INT16(void)
144 {
145 /* INT16 */
146 TEST_TYPE(INT16, 2, 2);
147 TEST_TYPE_SIGNED(INT16);
148 }
149
150 static void test_pack_INT32(void)
151 {
152 /* INT32 */
153 TEST_TYPE(INT32, 4, 4);
154 TEST_TYPE_SIGNED(INT32);
155 }
156
157 static void test_pack_INT64(void)
158 {
159 /* INT64 */
160 TEST_TYPE(INT64, 8, 8);
161 TEST_TYPE_SIGNED(INT64);
162 }
163
164 static void test_pack_INT8(void)
165 {
166 /* INT8 */
167 TEST_TYPE(INT8, 1, 1);
168 TEST_TYPE_SIGNED(INT8);
169 }
170
171 static void test_pack_INT_PTR(void)
172 {
173 /* INT_PTR */
174 TEST_TYPE(INT_PTR, 4, 4);
175 TEST_TYPE_SIGNED(INT_PTR);
176 }
177
178 static void test_pack_LONG32(void)
179 {
180 /* LONG32 */
181 TEST_TYPE(LONG32, 4, 4);
182 TEST_TYPE_SIGNED(LONG32);
183 }
184
185 static void test_pack_LONG64(void)
186 {
187 /* LONG64 */
188 TEST_TYPE(LONG64, 8, 8);
189 TEST_TYPE_SIGNED(LONG64);
190 }
191
192 static void test_pack_LONG_PTR(void)
193 {
194 /* LONG_PTR */
195 TEST_TYPE(LONG_PTR, 4, 4);
196 TEST_TYPE_SIGNED(LONG_PTR);
197 }
198
199 static void test_pack_SIZE_T(void)
200 {
201 /* SIZE_T */
202 TEST_TYPE(SIZE_T, 4, 4);
203 }
204
205 static void test_pack_SSIZE_T(void)
206 {
207 /* SSIZE_T */
208 TEST_TYPE(SSIZE_T, 4, 4);
209 }
210
211 static void test_pack_UHALF_PTR(void)
212 {
213 /* UHALF_PTR */
214 TEST_TYPE(UHALF_PTR, 2, 2);
215 TEST_TYPE_UNSIGNED(UHALF_PTR);
216 }
217
218 static void test_pack_UINT16(void)
219 {
220 /* UINT16 */
221 TEST_TYPE(UINT16, 2, 2);
222 TEST_TYPE_UNSIGNED(UINT16);
223 }
224
225 static void test_pack_UINT32(void)
226 {
227 /* UINT32 */
228 TEST_TYPE(UINT32, 4, 4);
229 TEST_TYPE_UNSIGNED(UINT32);
230 }
231
232 static void test_pack_UINT64(void)
233 {
234 /* UINT64 */
235 TEST_TYPE(UINT64, 8, 8);
236 TEST_TYPE_UNSIGNED(UINT64);
237 }
238
239 static void test_pack_UINT8(void)
240 {
241 /* UINT8 */
242 TEST_TYPE(UINT8, 1, 1);
243 TEST_TYPE_UNSIGNED(UINT8);
244 }
245
246 static void test_pack_UINT_PTR(void)
247 {
248 /* UINT_PTR */
249 TEST_TYPE(UINT_PTR, 4, 4);
250 TEST_TYPE_UNSIGNED(UINT_PTR);
251 }
252
253 static void test_pack_ULONG32(void)
254 {
255 /* ULONG32 */
256 TEST_TYPE(ULONG32, 4, 4);
257 TEST_TYPE_UNSIGNED(ULONG32);
258 }
259
260 static void test_pack_ULONG64(void)
261 {
262 /* ULONG64 */
263 TEST_TYPE(ULONG64, 8, 8);
264 TEST_TYPE_UNSIGNED(ULONG64);
265 }
266
267 static void test_pack_ULONG_PTR(void)
268 {
269 /* ULONG_PTR */
270 TEST_TYPE(ULONG_PTR, 4, 4);
271 TEST_TYPE_UNSIGNED(ULONG_PTR);
272 }
273
274 static void test_pack_ACCESS_ALLOWED_ACE(void)
275 {
276 /* ACCESS_ALLOWED_ACE (pack 4) */
277 TEST_TYPE(ACCESS_ALLOWED_ACE, 12, 4);
278 TEST_FIELD(ACCESS_ALLOWED_ACE, ACE_HEADER, Header, 0, 4, 2);
279 TEST_FIELD(ACCESS_ALLOWED_ACE, DWORD, Mask, 4, 4, 4);
280 TEST_FIELD(ACCESS_ALLOWED_ACE, DWORD, SidStart, 8, 4, 4);
281 }
282
283 static void test_pack_ACCESS_DENIED_ACE(void)
284 {
285 /* ACCESS_DENIED_ACE (pack 4) */
286 TEST_TYPE(ACCESS_DENIED_ACE, 12, 4);
287 TEST_FIELD(ACCESS_DENIED_ACE, ACE_HEADER, Header, 0, 4, 2);
288 TEST_FIELD(ACCESS_DENIED_ACE, DWORD, Mask, 4, 4, 4);
289 TEST_FIELD(ACCESS_DENIED_ACE, DWORD, SidStart, 8, 4, 4);
290 }
291
292 static void test_pack_ACCESS_MASK(void)
293 {
294 /* ACCESS_MASK */
295 TEST_TYPE(ACCESS_MASK, 4, 4);
296 TEST_TYPE_UNSIGNED(ACCESS_MASK);
297 }
298
299 static void test_pack_ACE_HEADER(void)
300 {
301 /* ACE_HEADER (pack 4) */
302 TEST_TYPE(ACE_HEADER, 4, 2);
303 TEST_FIELD(ACE_HEADER, BYTE, AceType, 0, 1, 1);
304 TEST_FIELD(ACE_HEADER, BYTE, AceFlags, 1, 1, 1);
305 TEST_FIELD(ACE_HEADER, WORD, AceSize, 2, 2, 2);
306 }
307
308 static void test_pack_ACL(void)
309 {
310 /* ACL (pack 4) */
311 TEST_TYPE(ACL, 8, 2);
312 TEST_FIELD(ACL, BYTE, AclRevision, 0, 1, 1);
313 TEST_FIELD(ACL, BYTE, Sbz1, 1, 1, 1);
314 TEST_FIELD(ACL, WORD, AclSize, 2, 2, 2);
315 TEST_FIELD(ACL, WORD, AceCount, 4, 2, 2);
316 TEST_FIELD(ACL, WORD, Sbz2, 6, 2, 2);
317 }
318
319 static void test_pack_ACL_REVISION_INFORMATION(void)
320 {
321 /* ACL_REVISION_INFORMATION (pack 4) */
322 TEST_TYPE(ACL_REVISION_INFORMATION, 4, 4);
323 TEST_FIELD(ACL_REVISION_INFORMATION, DWORD, AclRevision, 0, 4, 4);
324 }
325
326 static void test_pack_ACL_SIZE_INFORMATION(void)
327 {
328 /* ACL_SIZE_INFORMATION (pack 4) */
329 TEST_TYPE(ACL_SIZE_INFORMATION, 12, 4);
330 TEST_FIELD(ACL_SIZE_INFORMATION, DWORD, AceCount, 0, 4, 4);
331 TEST_FIELD(ACL_SIZE_INFORMATION, DWORD, AclBytesInUse, 4, 4, 4);
332 TEST_FIELD(ACL_SIZE_INFORMATION, DWORD, AclBytesFree, 8, 4, 4);
333 }
334
335 static void test_pack_BOOLEAN(void)
336 {
337 /* BOOLEAN */
338 TEST_TYPE(BOOLEAN, 1, 1);
339 TEST_TYPE_UNSIGNED(BOOLEAN);
340 }
341
342 static void test_pack_CCHAR(void)
343 {
344 /* CCHAR */
345 TEST_TYPE(CCHAR, 1, 1);
346 TEST_TYPE_SIGNED(CCHAR);
347 }
348
349 static void test_pack_CHAR(void)
350 {
351 /* CHAR */
352 TEST_TYPE(CHAR, 1, 1);
353 TEST_TYPE_SIGNED(CHAR);
354 }
355
356 static void test_pack_DWORDLONG(void)
357 {
358 /* DWORDLONG */
359 TEST_TYPE(DWORDLONG, 8, 8);
360 TEST_TYPE_UNSIGNED(DWORDLONG);
361 }
362
363 static void test_pack_EXCEPTION_POINTERS(void)
364 {
365 /* EXCEPTION_POINTERS (pack 4) */
366 TEST_TYPE(EXCEPTION_POINTERS, 8, 4);
367 TEST_FIELD(EXCEPTION_POINTERS, PEXCEPTION_RECORD, ExceptionRecord, 0, 4, 4);
368 TEST_FIELD(EXCEPTION_POINTERS, PCONTEXT, ContextRecord, 4, 4, 4);
369 }
370
371 static void test_pack_EXCEPTION_RECORD(void)
372 {
373 /* EXCEPTION_RECORD (pack 4) */
374 TEST_TYPE(EXCEPTION_RECORD, 80, 4);
375 TEST_FIELD(EXCEPTION_RECORD, DWORD, ExceptionCode, 0, 4, 4);
376 TEST_FIELD(EXCEPTION_RECORD, DWORD, ExceptionFlags, 4, 4, 4);
377 TEST_FIELD(EXCEPTION_RECORD, struct _EXCEPTION_RECORD *, ExceptionRecord, 8, 4, 4);
378 TEST_FIELD(EXCEPTION_RECORD, PVOID, ExceptionAddress, 12, 4, 4);
379 TEST_FIELD(EXCEPTION_RECORD, DWORD, NumberParameters, 16, 4, 4);
380 TEST_FIELD(EXCEPTION_RECORD, ULONG_PTR[EXCEPTION_MAXIMUM_PARAMETERS], ExceptionInformation, 20, 60, 4);
381 }
382
383 static void test_pack_EXECUTION_STATE(void)
384 {
385 /* EXECUTION_STATE */
386 TEST_TYPE(EXECUTION_STATE, 4, 4);
387 TEST_TYPE_UNSIGNED(EXECUTION_STATE);
388 }
389
390 static void test_pack_FLOATING_SAVE_AREA(void)
391 {
392 /* FLOATING_SAVE_AREA (pack 4) */
393 TEST_TYPE(FLOATING_SAVE_AREA, 112, 4);
394 TEST_FIELD(FLOATING_SAVE_AREA, DWORD, ControlWord, 0, 4, 4);
395 TEST_FIELD(FLOATING_SAVE_AREA, DWORD, StatusWord, 4, 4, 4);
396 TEST_FIELD(FLOATING_SAVE_AREA, DWORD, TagWord, 8, 4, 4);
397 TEST_FIELD(FLOATING_SAVE_AREA, DWORD, ErrorOffset, 12, 4, 4);
398 TEST_FIELD(FLOATING_SAVE_AREA, DWORD, ErrorSelector, 16, 4, 4);
399 TEST_FIELD(FLOATING_SAVE_AREA, DWORD, DataOffset, 20, 4, 4);
400 TEST_FIELD(FLOATING_SAVE_AREA, DWORD, DataSelector, 24, 4, 4);
401 TEST_FIELD(FLOATING_SAVE_AREA, BYTE[SIZE_OF_80387_REGISTERS], RegisterArea, 28, 80, 1);
402 TEST_FIELD(FLOATING_SAVE_AREA, DWORD, Cr0NpxState, 108, 4, 4);
403 }
404
405 static void test_pack_FPO_DATA(void)
406 {
407 /* FPO_DATA (pack 4) */
408 TEST_TYPE(FPO_DATA, 16, 4);
409 TEST_FIELD(FPO_DATA, DWORD, ulOffStart, 0, 4, 4);
410 TEST_FIELD(FPO_DATA, DWORD, cbProcSize, 4, 4, 4);
411 TEST_FIELD(FPO_DATA, DWORD, cdwLocals, 8, 4, 4);
412 TEST_FIELD(FPO_DATA, WORD, cdwParams, 12, 2, 2);
413 }
414
415 static void test_pack_GENERIC_MAPPING(void)
416 {
417 /* GENERIC_MAPPING (pack 4) */
418 TEST_TYPE(GENERIC_MAPPING, 16, 4);
419 TEST_FIELD(GENERIC_MAPPING, ACCESS_MASK, GenericRead, 0, 4, 4);
420 TEST_FIELD(GENERIC_MAPPING, ACCESS_MASK, GenericWrite, 4, 4, 4);
421 TEST_FIELD(GENERIC_MAPPING, ACCESS_MASK, GenericExecute, 8, 4, 4);
422 TEST_FIELD(GENERIC_MAPPING, ACCESS_MASK, GenericAll, 12, 4, 4);
423 }
424
425 static void test_pack_HANDLE(void)
426 {
427 /* HANDLE */
428 TEST_TYPE(HANDLE, 4, 4);
429 }
430
431 static void test_pack_HRESULT(void)
432 {
433 /* HRESULT */
434 TEST_TYPE(HRESULT, 4, 4);
435 }
436
437 static void test_pack_IMAGE_ARCHIVE_MEMBER_HEADER(void)
438 {
439 /* IMAGE_ARCHIVE_MEMBER_HEADER (pack 4) */
440 TEST_TYPE(IMAGE_ARCHIVE_MEMBER_HEADER, 60, 1);
441 TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, BYTE[16], Name, 0, 16, 1);
442 TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, BYTE[12], Date, 16, 12, 1);
443 TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, BYTE[6], UserID, 28, 6, 1);
444 TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, BYTE[6], GroupID, 34, 6, 1);
445 TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, BYTE[8], Mode, 40, 8, 1);
446 TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, BYTE[10], Size, 48, 10, 1);
447 TEST_FIELD(IMAGE_ARCHIVE_MEMBER_HEADER, BYTE[2], EndHeader, 58, 2, 1);
448 }
449
450 static void test_pack_IMAGE_AUX_SYMBOL(void)
451 {
452 /* IMAGE_AUX_SYMBOL (pack 2) */
453 }
454
455 static void test_pack_IMAGE_BASE_RELOCATION(void)
456 {
457 /* IMAGE_BASE_RELOCATION (pack 4) */
458 TEST_TYPE(IMAGE_BASE_RELOCATION, 8, 4);
459 TEST_FIELD(IMAGE_BASE_RELOCATION, DWORD, VirtualAddress, 0, 4, 4);
460 TEST_FIELD(IMAGE_BASE_RELOCATION, DWORD, SizeOfBlock, 4, 4, 4);
461 }
462
463 static void test_pack_IMAGE_BOUND_FORWARDER_REF(void)
464 {
465 /* IMAGE_BOUND_FORWARDER_REF (pack 4) */
466 TEST_TYPE(IMAGE_BOUND_FORWARDER_REF, 8, 4);
467 TEST_FIELD(IMAGE_BOUND_FORWARDER_REF, DWORD, TimeDateStamp, 0, 4, 4);
468 TEST_FIELD(IMAGE_BOUND_FORWARDER_REF, WORD, OffsetModuleName, 4, 2, 2);
469 TEST_FIELD(IMAGE_BOUND_FORWARDER_REF, WORD, Reserved, 6, 2, 2);
470 }
471
472 static void test_pack_IMAGE_BOUND_IMPORT_DESCRIPTOR(void)
473 {
474 /* IMAGE_BOUND_IMPORT_DESCRIPTOR (pack 4) */
475 TEST_TYPE(IMAGE_BOUND_IMPORT_DESCRIPTOR, 8, 4);
476 TEST_FIELD(IMAGE_BOUND_IMPORT_DESCRIPTOR, DWORD, TimeDateStamp, 0, 4, 4);
477 TEST_FIELD(IMAGE_BOUND_IMPORT_DESCRIPTOR, WORD, OffsetModuleName, 4, 2, 2);
478 TEST_FIELD(IMAGE_BOUND_IMPORT_DESCRIPTOR, WORD, NumberOfModuleForwarderRefs, 6, 2, 2);
479 }
480
481 static void test_pack_IMAGE_COFF_SYMBOLS_HEADER(void)
482 {
483 /* IMAGE_COFF_SYMBOLS_HEADER (pack 4) */
484 TEST_TYPE(IMAGE_COFF_SYMBOLS_HEADER, 32, 4);
485 TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, DWORD, NumberOfSymbols, 0, 4, 4);
486 TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, DWORD, LvaToFirstSymbol, 4, 4, 4);
487 TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, DWORD, NumberOfLinenumbers, 8, 4, 4);
488 TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, DWORD, LvaToFirstLinenumber, 12, 4, 4);
489 TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, DWORD, RvaToFirstByteOfCode, 16, 4, 4);
490 TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, DWORD, RvaToLastByteOfCode, 20, 4, 4);
491 TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, DWORD, RvaToFirstByteOfData, 24, 4, 4);
492 TEST_FIELD(IMAGE_COFF_SYMBOLS_HEADER, DWORD, RvaToLastByteOfData, 28, 4, 4);
493 }
494
495 static void test_pack_IMAGE_DATA_DIRECTORY(void)
496 {
497 /* IMAGE_DATA_DIRECTORY (pack 4) */
498 TEST_TYPE(IMAGE_DATA_DIRECTORY, 8, 4);
499 TEST_FIELD(IMAGE_DATA_DIRECTORY, DWORD, VirtualAddress, 0, 4, 4);
500 TEST_FIELD(IMAGE_DATA_DIRECTORY, DWORD, Size, 4, 4, 4);
501 }
502
503 static void test_pack_IMAGE_DEBUG_DIRECTORY(void)
504 {
505 /* IMAGE_DEBUG_DIRECTORY (pack 4) */
506 TEST_TYPE(IMAGE_DEBUG_DIRECTORY, 28, 4);
507 TEST_FIELD(IMAGE_DEBUG_DIRECTORY, DWORD, Characteristics, 0, 4, 4);
508 TEST_FIELD(IMAGE_DEBUG_DIRECTORY, DWORD, TimeDateStamp, 4, 4, 4);
509 TEST_FIELD(IMAGE_DEBUG_DIRECTORY, WORD, MajorVersion, 8, 2, 2);
510 TEST_FIELD(IMAGE_DEBUG_DIRECTORY, WORD, MinorVersion, 10, 2, 2);
511 TEST_FIELD(IMAGE_DEBUG_DIRECTORY, DWORD, Type, 12, 4, 4);
512 TEST_FIELD(IMAGE_DEBUG_DIRECTORY, DWORD, SizeOfData, 16, 4, 4);
513 TEST_FIELD(IMAGE_DEBUG_DIRECTORY, DWORD, AddressOfRawData, 20, 4, 4);
514 TEST_FIELD(IMAGE_DEBUG_DIRECTORY, DWORD, PointerToRawData, 24, 4, 4);
515 }
516
517 static void test_pack_IMAGE_DEBUG_MISC(void)
518 {
519 /* IMAGE_DEBUG_MISC (pack 4) */
520 TEST_TYPE(IMAGE_DEBUG_MISC, 16, 4);
521 TEST_FIELD(IMAGE_DEBUG_MISC, DWORD, DataType, 0, 4, 4);
522 TEST_FIELD(IMAGE_DEBUG_MISC, DWORD, Length, 4, 4, 4);
523 TEST_FIELD(IMAGE_DEBUG_MISC, BYTE, Unicode, 8, 1, 1);
524 TEST_FIELD(IMAGE_DEBUG_MISC, BYTE[ 3 ], Reserved, 9, 3, 1);
525 TEST_FIELD(IMAGE_DEBUG_MISC, BYTE[ 1 ], Data, 12, 1, 1);
526 }
527
528 static void test_pack_IMAGE_DOS_HEADER(void)
529 {
530 /* IMAGE_DOS_HEADER (pack 2) */
531 TEST_TYPE(IMAGE_DOS_HEADER, 64, 2);
532 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_magic, 0, 2, 2);
533 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_cblp, 2, 2, 2);
534 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_cp, 4, 2, 2);
535 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_crlc, 6, 2, 2);
536 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_cparhdr, 8, 2, 2);
537 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_minalloc, 10, 2, 2);
538 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_maxalloc, 12, 2, 2);
539 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_ss, 14, 2, 2);
540 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_sp, 16, 2, 2);
541 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_csum, 18, 2, 2);
542 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_ip, 20, 2, 2);
543 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_cs, 22, 2, 2);
544 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_lfarlc, 24, 2, 2);
545 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_ovno, 26, 2, 2);
546 TEST_FIELD(IMAGE_DOS_HEADER, WORD[4], e_res, 28, 8, 2);
547 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_oemid, 36, 2, 2);
548 TEST_FIELD(IMAGE_DOS_HEADER, WORD, e_oeminfo, 38, 2, 2);
549 TEST_FIELD(IMAGE_DOS_HEADER, WORD[10], e_res2, 40, 20, 2);
550 TEST_FIELD(IMAGE_DOS_HEADER, DWORD, e_lfanew, 60, 4, 2);
551 }
552
553 static void test_pack_IMAGE_EXPORT_DIRECTORY(void)
554 {
555 /* IMAGE_EXPORT_DIRECTORY (pack 4) */
556 TEST_TYPE(IMAGE_EXPORT_DIRECTORY, 40, 4);
557 TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, Characteristics, 0, 4, 4);
558 TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, TimeDateStamp, 4, 4, 4);
559 TEST_FIELD(IMAGE_EXPORT_DIRECTORY, WORD, MajorVersion, 8, 2, 2);
560 TEST_FIELD(IMAGE_EXPORT_DIRECTORY, WORD, MinorVersion, 10, 2, 2);
561 TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, Name, 12, 4, 4);
562 TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, Base, 16, 4, 4);
563 TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, NumberOfFunctions, 20, 4, 4);
564 TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, NumberOfNames, 24, 4, 4);
565 TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, AddressOfFunctions, 28, 4, 4);
566 TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, AddressOfNames, 32, 4, 4);
567 TEST_FIELD(IMAGE_EXPORT_DIRECTORY, DWORD, AddressOfNameOrdinals, 36, 4, 4);
568 }
569
570 static void test_pack_IMAGE_FILE_HEADER(void)
571 {
572 /* IMAGE_FILE_HEADER (pack 4) */
573 TEST_TYPE(IMAGE_FILE_HEADER, 20, 4);
574 TEST_FIELD(IMAGE_FILE_HEADER, WORD, Machine, 0, 2, 2);
575 TEST_FIELD(IMAGE_FILE_HEADER, WORD, NumberOfSections, 2, 2, 2);
576 TEST_FIELD(IMAGE_FILE_HEADER, DWORD, TimeDateStamp, 4, 4, 4);
577 TEST_FIELD(IMAGE_FILE_HEADER, DWORD, PointerToSymbolTable, 8, 4, 4);
578 TEST_FIELD(IMAGE_FILE_HEADER, DWORD, NumberOfSymbols, 12, 4, 4);
579 TEST_FIELD(IMAGE_FILE_HEADER, WORD, SizeOfOptionalHeader, 16, 2, 2);
580 TEST_FIELD(IMAGE_FILE_HEADER, WORD, Characteristics, 18, 2, 2);
581 }
582
583 static void test_pack_IMAGE_FUNCTION_ENTRY(void)
584 {
585 /* IMAGE_FUNCTION_ENTRY (pack 4) */
586 TEST_TYPE(IMAGE_FUNCTION_ENTRY, 12, 4);
587 TEST_FIELD(IMAGE_FUNCTION_ENTRY, DWORD, StartingAddress, 0, 4, 4);
588 TEST_FIELD(IMAGE_FUNCTION_ENTRY, DWORD, EndingAddress, 4, 4, 4);
589 TEST_FIELD(IMAGE_FUNCTION_ENTRY, DWORD, EndOfPrologue, 8, 4, 4);
590 }
591
592 static void test_pack_IMAGE_IMPORT_BY_NAME(void)
593 {
594 /* IMAGE_IMPORT_BY_NAME (pack 4) */
595 TEST_TYPE(IMAGE_IMPORT_BY_NAME, 4, 2);
596 TEST_FIELD(IMAGE_IMPORT_BY_NAME, WORD, Hint, 0, 2, 2);
597 TEST_FIELD(IMAGE_IMPORT_BY_NAME, BYTE[1], Name, 2, 1, 1);
598 }
599
600 static void test_pack_IMAGE_IMPORT_DESCRIPTOR(void)
601 {
602 /* IMAGE_IMPORT_DESCRIPTOR (pack 4) */
603 }
604
605 static void test_pack_IMAGE_LINENUMBER(void)
606 {
607 /* IMAGE_LINENUMBER (pack 2) */
608 }
609
610 static void test_pack_IMAGE_LOAD_CONFIG_DIRECTORY(void)
611 {
612 /* IMAGE_LOAD_CONFIG_DIRECTORY (pack 4) */
613 TEST_TYPE(IMAGE_LOAD_CONFIG_DIRECTORY, 72, 4);
614 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, Size, 0, 4, 4);
615 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, TimeDateStamp, 4, 4, 4);
616 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, WORD, MajorVersion, 8, 2, 2);
617 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, WORD, MinorVersion, 10, 2, 2);
618 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, GlobalFlagsClear, 12, 4, 4);
619 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, GlobalFlagsSet, 16, 4, 4);
620 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, CriticalSectionDefaultTimeout, 20, 4, 4);
621 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, DeCommitFreeBlockThreshold, 24, 4, 4);
622 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, DeCommitTotalFreeThreshold, 28, 4, 4);
623 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, PVOID, LockPrefixTable, 32, 4, 4);
624 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, MaximumAllocationSize, 36, 4, 4);
625 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, VirtualMemoryThreshold, 40, 4, 4);
626 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, ProcessHeapFlags, 44, 4, 4);
627 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, ProcessAffinityMask, 48, 4, 4);
628 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, WORD, CSDVersion, 52, 2, 2);
629 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, WORD, Reserved1, 54, 2, 2);
630 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, PVOID, EditList, 56, 4, 4);
631 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, SecurityCookie, 60, 4, 4);
632 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, SEHandlerTable, 64, 4, 4);
633 TEST_FIELD(IMAGE_LOAD_CONFIG_DIRECTORY, DWORD, SEHandlerCount, 68, 4, 4);
634 }
635
636 static void test_pack_IMAGE_NT_HEADERS(void)
637 {
638 /* IMAGE_NT_HEADERS (pack 4) */
639 TEST_TYPE(IMAGE_NT_HEADERS, 248, 4);
640 TEST_FIELD(IMAGE_NT_HEADERS, DWORD, Signature, 0, 4, 4);
641 TEST_FIELD(IMAGE_NT_HEADERS, IMAGE_FILE_HEADER, FileHeader, 4, 20, 4);
642 TEST_FIELD(IMAGE_NT_HEADERS, IMAGE_OPTIONAL_HEADER, OptionalHeader, 24, 224, 4);
643 }
644
645 static void test_pack_IMAGE_OPTIONAL_HEADER(void)
646 {
647 /* IMAGE_OPTIONAL_HEADER (pack 4) */
648 TEST_TYPE(IMAGE_OPTIONAL_HEADER, 224, 4);
649 TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, Magic, 0, 2, 2);
650 TEST_FIELD(IMAGE_OPTIONAL_HEADER, BYTE, MajorLinkerVersion, 2, 1, 1);
651 TEST_FIELD(IMAGE_OPTIONAL_HEADER, BYTE, MinorLinkerVersion, 3, 1, 1);
652 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfCode, 4, 4, 4);
653 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfInitializedData, 8, 4, 4);
654 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfUninitializedData, 12, 4, 4);
655 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, AddressOfEntryPoint, 16, 4, 4);
656 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, BaseOfCode, 20, 4, 4);
657 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, BaseOfData, 24, 4, 4);
658 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, ImageBase, 28, 4, 4);
659 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SectionAlignment, 32, 4, 4);
660 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, FileAlignment, 36, 4, 4);
661 TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, MajorOperatingSystemVersion, 40, 2, 2);
662 TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, MinorOperatingSystemVersion, 42, 2, 2);
663 TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, MajorImageVersion, 44, 2, 2);
664 TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, MinorImageVersion, 46, 2, 2);
665 TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, MajorSubsystemVersion, 48, 2, 2);
666 TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, MinorSubsystemVersion, 50, 2, 2);
667 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, Win32VersionValue, 52, 4, 4);
668 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfImage, 56, 4, 4);
669 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfHeaders, 60, 4, 4);
670 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, CheckSum, 64, 4, 4);
671 TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, Subsystem, 68, 2, 2);
672 TEST_FIELD(IMAGE_OPTIONAL_HEADER, WORD, DllCharacteristics, 70, 2, 2);
673 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfStackReserve, 72, 4, 4);
674 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfStackCommit, 76, 4, 4);
675 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfHeapReserve, 80, 4, 4);
676 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, SizeOfHeapCommit, 84, 4, 4);
677 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, LoaderFlags, 88, 4, 4);
678 TEST_FIELD(IMAGE_OPTIONAL_HEADER, DWORD, NumberOfRvaAndSizes, 92, 4, 4);
679 TEST_FIELD(IMAGE_OPTIONAL_HEADER, IMAGE_DATA_DIRECTORY[IMAGE_NUMBEROF_DIRECTORY_ENTRIES], DataDirectory, 96, 128, 4);
680 }
681
682 static void test_pack_IMAGE_OS2_HEADER(void)
683 {
684 /* IMAGE_OS2_HEADER (pack 2) */
685 TEST_TYPE(IMAGE_OS2_HEADER, 64, 2);
686 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_magic, 0, 2, 2);
687 TEST_FIELD(IMAGE_OS2_HEADER, BYTE, ne_ver, 2, 1, 1);
688 TEST_FIELD(IMAGE_OS2_HEADER, BYTE, ne_rev, 3, 1, 1);
689 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_enttab, 4, 2, 2);
690 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_cbenttab, 6, 2, 2);
691 TEST_FIELD(IMAGE_OS2_HEADER, LONG, ne_crc, 8, 4, 2);
692 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_flags, 12, 2, 2);
693 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_autodata, 14, 2, 2);
694 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_heap, 16, 2, 2);
695 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_stack, 18, 2, 2);
696 TEST_FIELD(IMAGE_OS2_HEADER, DWORD, ne_csip, 20, 4, 2);
697 TEST_FIELD(IMAGE_OS2_HEADER, DWORD, ne_sssp, 24, 4, 2);
698 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_cseg, 28, 2, 2);
699 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_cmod, 30, 2, 2);
700 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_cbnrestab, 32, 2, 2);
701 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_segtab, 34, 2, 2);
702 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_rsrctab, 36, 2, 2);
703 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_restab, 38, 2, 2);
704 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_modtab, 40, 2, 2);
705 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_imptab, 42, 2, 2);
706 TEST_FIELD(IMAGE_OS2_HEADER, DWORD, ne_nrestab, 44, 4, 2);
707 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_cmovent, 48, 2, 2);
708 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_align, 50, 2, 2);
709 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_cres, 52, 2, 2);
710 TEST_FIELD(IMAGE_OS2_HEADER, BYTE, ne_exetyp, 54, 1, 1);
711 TEST_FIELD(IMAGE_OS2_HEADER, BYTE, ne_flagsothers, 55, 1, 1);
712 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_pretthunks, 56, 2, 2);
713 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_psegrefbytes, 58, 2, 2);
714 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_swaparea, 60, 2, 2);
715 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_expver, 62, 2, 2);
716 }
717
718 static void test_pack_IMAGE_RELOCATION(void)
719 {
720 /* IMAGE_RELOCATION (pack 2) */
721 }
722
723 static void test_pack_IMAGE_RESOURCE_DATA_ENTRY(void)
724 {
725 /* IMAGE_RESOURCE_DATA_ENTRY (pack 4) */
726 TEST_TYPE(IMAGE_RESOURCE_DATA_ENTRY, 16, 4);
727 TEST_FIELD(IMAGE_RESOURCE_DATA_ENTRY, DWORD, OffsetToData, 0, 4, 4);
728 TEST_FIELD(IMAGE_RESOURCE_DATA_ENTRY, DWORD, Size, 4, 4, 4);
729 TEST_FIELD(IMAGE_RESOURCE_DATA_ENTRY, DWORD, CodePage, 8, 4, 4);
730 TEST_FIELD(IMAGE_RESOURCE_DATA_ENTRY, DWORD, Reserved, 12, 4, 4);
731 }
732
733 static void test_pack_IMAGE_RESOURCE_DIRECTORY(void)
734 {
735 /* IMAGE_RESOURCE_DIRECTORY (pack 4) */
736 TEST_TYPE(IMAGE_RESOURCE_DIRECTORY, 16, 4);
737 TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, DWORD, Characteristics, 0, 4, 4);
738 TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, DWORD, TimeDateStamp, 4, 4, 4);
739 TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, WORD, MajorVersion, 8, 2, 2);
740 TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, WORD, MinorVersion, 10, 2, 2);
741 TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, WORD, NumberOfNamedEntries, 12, 2, 2);
742 TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, WORD, NumberOfIdEntries, 14, 2, 2);
743 }
744
745 static void test_pack_IMAGE_RESOURCE_DIRECTORY_ENTRY(void)
746 {
747 /* IMAGE_RESOURCE_DIRECTORY_ENTRY (pack 4) */
748 }
749
750 static void test_pack_IMAGE_RESOURCE_DIRECTORY_STRING(void)
751 {
752 /* IMAGE_RESOURCE_DIRECTORY_STRING (pack 4) */
753 TEST_TYPE(IMAGE_RESOURCE_DIRECTORY_STRING, 4, 2);
754 TEST_FIELD(IMAGE_RESOURCE_DIRECTORY_STRING, WORD, Length, 0, 2, 2);
755 TEST_FIELD(IMAGE_RESOURCE_DIRECTORY_STRING, CHAR[ 1 ], NameString, 2, 1, 1);
756 }
757
758 static void test_pack_IMAGE_RESOURCE_DIR_STRING_U(void)
759 {
760 /* IMAGE_RESOURCE_DIR_STRING_U (pack 4) */
761 TEST_TYPE(IMAGE_RESOURCE_DIR_STRING_U, 4, 2);
762 TEST_FIELD(IMAGE_RESOURCE_DIR_STRING_U, WORD, Length, 0, 2, 2);
763 TEST_FIELD(IMAGE_RESOURCE_DIR_STRING_U, WCHAR[ 1 ], NameString, 2, 2, 2);
764 }
765
766 static void test_pack_IMAGE_SECTION_HEADER(void)
767 {
768 /* IMAGE_SECTION_HEADER (pack 4) */
769 TEST_FIELD(IMAGE_SECTION_HEADER, BYTE[IMAGE_SIZEOF_SHORT_NAME], Name, 0, 8, 1);
770 }
771
772 static void test_pack_IMAGE_SEPARATE_DEBUG_HEADER(void)
773 {
774 /* IMAGE_SEPARATE_DEBUG_HEADER (pack 4) */
775 TEST_TYPE(IMAGE_SEPARATE_DEBUG_HEADER, 48, 4);
776 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, WORD, Signature, 0, 2, 2);
777 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, WORD, Flags, 2, 2, 2);
778 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, WORD, Machine, 4, 2, 2);
779 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, WORD, Characteristics, 6, 2, 2);
780 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, TimeDateStamp, 8, 4, 4);
781 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, CheckSum, 12, 4, 4);
782 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, ImageBase, 16, 4, 4);
783 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, SizeOfImage, 20, 4, 4);
784 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, NumberOfSections, 24, 4, 4);
785 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, ExportedNamesSize, 28, 4, 4);
786 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, DebugDirectorySize, 32, 4, 4);
787 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, SectionAlignment, 36, 4, 4);
788 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD[ 2 ], Reserved, 40, 8, 4);
789 }
790
791 static void test_pack_IMAGE_SYMBOL(void)
792 {
793 /* IMAGE_SYMBOL (pack 2) */
794 }
795
796 static void test_pack_IMAGE_THUNK_DATA(void)
797 {
798 /* IMAGE_THUNK_DATA (pack 4) */
799 }
800
801 static void test_pack_IMAGE_TLS_DIRECTORY(void)
802 {
803 /* IMAGE_TLS_DIRECTORY (pack 4) */
804 TEST_TYPE(IMAGE_TLS_DIRECTORY, 24, 4);
805 TEST_FIELD(IMAGE_TLS_DIRECTORY, DWORD, StartAddressOfRawData, 0, 4, 4);
806 TEST_FIELD(IMAGE_TLS_DIRECTORY, DWORD, EndAddressOfRawData, 4, 4, 4);
807 TEST_FIELD(IMAGE_TLS_DIRECTORY, LPDWORD, AddressOfIndex, 8, 4, 4);
808 TEST_FIELD(IMAGE_TLS_DIRECTORY, PIMAGE_TLS_CALLBACK *, AddressOfCallBacks, 12, 4, 4);
809 TEST_FIELD(IMAGE_TLS_DIRECTORY, DWORD, SizeOfZeroFill, 16, 4, 4);
810 TEST_FIELD(IMAGE_TLS_DIRECTORY, DWORD, Characteristics, 20, 4, 4);
811 }
812
813 static void test_pack_IMAGE_VXD_HEADER(void)
814 {
815 /* IMAGE_VXD_HEADER (pack 2) */
816 TEST_TYPE(IMAGE_VXD_HEADER, 196, 2);
817 TEST_FIELD(IMAGE_VXD_HEADER, WORD, e32_magic, 0, 2, 2);
818 TEST_FIELD(IMAGE_VXD_HEADER, BYTE, e32_border, 2, 1, 1);
819 TEST_FIELD(IMAGE_VXD_HEADER, BYTE, e32_worder, 3, 1, 1);
820 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_level, 4, 4, 2);
821 TEST_FIELD(IMAGE_VXD_HEADER, WORD, e32_cpu, 8, 2, 2);
822 TEST_FIELD(IMAGE_VXD_HEADER, WORD, e32_os, 10, 2, 2);
823 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_ver, 12, 4, 2);
824 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_mflags, 16, 4, 2);
825 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_mpages, 20, 4, 2);
826 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_startobj, 24, 4, 2);
827 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_eip, 28, 4, 2);
828 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_stackobj, 32, 4, 2);
829 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_esp, 36, 4, 2);
830 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_pagesize, 40, 4, 2);
831 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_lastpagesize, 44, 4, 2);
832 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_fixupsize, 48, 4, 2);
833 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_fixupsum, 52, 4, 2);
834 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_ldrsize, 56, 4, 2);
835 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_ldrsum, 60, 4, 2);
836 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_objtab, 64, 4, 2);
837 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_objcnt, 68, 4, 2);
838 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_objmap, 72, 4, 2);
839 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_itermap, 76, 4, 2);
840 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_rsrctab, 80, 4, 2);
841 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_rsrccnt, 84, 4, 2);
842 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_restab, 88, 4, 2);
843 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_enttab, 92, 4, 2);
844 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_dirtab, 96, 4, 2);
845 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_dircnt, 100, 4, 2);
846 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_fpagetab, 104, 4, 2);
847 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_frectab, 108, 4, 2);
848 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_impmod, 112, 4, 2);
849 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_impmodcnt, 116, 4, 2);
850 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_impproc, 120, 4, 2);
851 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_pagesum, 124, 4, 2);
852 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_datapage, 128, 4, 2);
853 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_preload, 132, 4, 2);
854 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_nrestab, 136, 4, 2);
855 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_cbnrestab, 140, 4, 2);
856 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_nressum, 144, 4, 2);
857 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_autodata, 148, 4, 2);
858 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_debuginfo, 152, 4, 2);
859 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_debuglen, 156, 4, 2);
860 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_instpreload, 160, 4, 2);
861 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_instdemand, 164, 4, 2);
862 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_heapsize, 168, 4, 2);
863 TEST_FIELD(IMAGE_VXD_HEADER, BYTE[12], e32_res3, 172, 12, 1);
864 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_winresoff, 184, 4, 2);
865 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_winreslen, 188, 4, 2);
866 TEST_FIELD(IMAGE_VXD_HEADER, WORD, e32_devid, 192, 2, 2);
867 TEST_FIELD(IMAGE_VXD_HEADER, WORD, e32_ddkver, 194, 2, 2);
868 }
869
870 static void test_pack_IO_COUNTERS(void)
871 {
872 /* IO_COUNTERS (pack 8) */
873 TEST_TYPE(IO_COUNTERS, 48, 8);
874 TEST_FIELD(IO_COUNTERS, ULONGLONG, ReadOperationCount, 0, 8, 8);
875 TEST_FIELD(IO_COUNTERS, ULONGLONG, WriteOperationCount, 8, 8, 8);
876 TEST_FIELD(IO_COUNTERS, ULONGLONG, OtherOperationCount, 16, 8, 8);
877 TEST_FIELD(IO_COUNTERS, ULONGLONG, ReadTransferCount, 24, 8, 8);
878 TEST_FIELD(IO_COUNTERS, ULONGLONG, WriteTransferCount, 32, 8, 8);
879 TEST_FIELD(IO_COUNTERS, ULONGLONG, OtherTransferCount, 40, 8, 8);
880 }
881
882 static void test_pack_LANGID(void)
883 {
884 /* LANGID */
885 TEST_TYPE(LANGID, 2, 2);
886 TEST_TYPE_UNSIGNED(LANGID);
887 }
888
889 static void test_pack_LARGE_INTEGER(void)
890 {
891 /* LARGE_INTEGER (pack 4) */
892 }
893
894 static void test_pack_LCID(void)
895 {
896 /* LCID */
897 TEST_TYPE(LCID, 4, 4);
898 TEST_TYPE_UNSIGNED(LCID);
899 }
900
901 static void test_pack_LIST_ENTRY(void)
902 {
903 /* LIST_ENTRY (pack 4) */
904 TEST_TYPE(LIST_ENTRY, 8, 4);
905 TEST_FIELD(LIST_ENTRY, struct _LIST_ENTRY *, Flink, 0, 4, 4);
906 TEST_FIELD(LIST_ENTRY, struct _LIST_ENTRY *, Blink, 4, 4, 4);
907 }
908
909 static void test_pack_LONG(void)
910 {
911 /* LONG */
912 TEST_TYPE(LONG, 4, 4);
913 TEST_TYPE_SIGNED(LONG);
914 }
915
916 static void test_pack_LONGLONG(void)
917 {
918 /* LONGLONG */
919 TEST_TYPE(LONGLONG, 8, 8);
920 TEST_TYPE_SIGNED(LONGLONG);
921 }
922
923 static void test_pack_LPTOP_LEVEL_EXCEPTION_FILTER(void)
924 {
925 /* LPTOP_LEVEL_EXCEPTION_FILTER */
926 TEST_TYPE(LPTOP_LEVEL_EXCEPTION_FILTER, 4, 4);
927 }
928
929 static void test_pack_LUID(void)
930 {
931 /* LUID (pack 4) */
932 TEST_TYPE(LUID, 8, 4);
933 TEST_FIELD(LUID, DWORD, LowPart, 0, 4, 4);
934 TEST_FIELD(LUID, LONG, HighPart, 4, 4, 4);
935 }
936
937 static void test_pack_LUID_AND_ATTRIBUTES(void)
938 {
939 /* LUID_AND_ATTRIBUTES (pack 4) */
940 TEST_TYPE(LUID_AND_ATTRIBUTES, 12, 4);
941 TEST_FIELD(LUID_AND_ATTRIBUTES, LUID, Luid, 0, 8, 4);
942 TEST_FIELD(LUID_AND_ATTRIBUTES, DWORD, Attributes, 8, 4, 4);
943 }
944
945 static void test_pack_MEMORY_BASIC_INFORMATION(void)
946 {
947 /* MEMORY_BASIC_INFORMATION (pack 4) */
948 TEST_TYPE(MEMORY_BASIC_INFORMATION, 28, 4);
949 TEST_FIELD(MEMORY_BASIC_INFORMATION, LPVOID, BaseAddress, 0, 4, 4);
950 TEST_FIELD(MEMORY_BASIC_INFORMATION, LPVOID, AllocationBase, 4, 4, 4);
951 TEST_FIELD(MEMORY_BASIC_INFORMATION, DWORD, AllocationProtect, 8, 4, 4);
952 TEST_FIELD(MEMORY_BASIC_INFORMATION, DWORD, RegionSize, 12, 4, 4);
953 TEST_FIELD(MEMORY_BASIC_INFORMATION, DWORD, State, 16, 4, 4);
954 TEST_FIELD(MEMORY_BASIC_INFORMATION, DWORD, Protect, 20, 4, 4);
955 TEST_FIELD(MEMORY_BASIC_INFORMATION, DWORD, Type, 24, 4, 4);
956 }
957
958 static void test_pack_MESSAGE_RESOURCE_BLOCK(void)
959 {
960 /* MESSAGE_RESOURCE_BLOCK (pack 4) */
961 TEST_TYPE(MESSAGE_RESOURCE_BLOCK, 12, 4);
962 TEST_FIELD(MESSAGE_RESOURCE_BLOCK, DWORD, LowId, 0, 4, 4);
963 TEST_FIELD(MESSAGE_RESOURCE_BLOCK, DWORD, HighId, 4, 4, 4);
964 TEST_FIELD(MESSAGE_RESOURCE_BLOCK, DWORD, OffsetToEntries, 8, 4, 4);
965 }
966
967 static void test_pack_MESSAGE_RESOURCE_DATA(void)
968 {
969 /* MESSAGE_RESOURCE_DATA (pack 4) */
970 TEST_TYPE(MESSAGE_RESOURCE_DATA, 16, 4);
971 TEST_FIELD(MESSAGE_RESOURCE_DATA, DWORD, NumberOfBlocks, 0, 4, 4);
972 TEST_FIELD(MESSAGE_RESOURCE_DATA, MESSAGE_RESOURCE_BLOCK[ 1 ], Blocks, 4, 12, 4);
973 }
974
975 static void test_pack_MESSAGE_RESOURCE_ENTRY(void)
976 {
977 /* MESSAGE_RESOURCE_ENTRY (pack 4) */
978 TEST_TYPE(MESSAGE_RESOURCE_ENTRY, 6, 2);
979 TEST_FIELD(MESSAGE_RESOURCE_ENTRY, WORD, Length, 0, 2, 2);
980 TEST_FIELD(MESSAGE_RESOURCE_ENTRY, WORD, Flags, 2, 2, 2);
981 TEST_FIELD(MESSAGE_RESOURCE_ENTRY, BYTE[1], Text, 4, 1, 1);
982 }
983
984 static void test_pack_NT_TIB(void)
985 {
986 /* NT_TIB (pack 4) */
987 TEST_FIELD(NT_TIB, struct _EXCEPTION_REGISTRATION_RECORD *, ExceptionList, 0, 4, 4);
988 TEST_FIELD(NT_TIB, PVOID, StackBase, 4, 4, 4);
989 TEST_FIELD(NT_TIB, PVOID, StackLimit, 8, 4, 4);
990 TEST_FIELD(NT_TIB, PVOID, SubSystemTib, 12, 4, 4);
991 }
992
993 static void test_pack_OBJECT_TYPE_LIST(void)
994 {
995 /* OBJECT_TYPE_LIST (pack 4) */
996 TEST_TYPE(OBJECT_TYPE_LIST, 8, 4);
997 TEST_FIELD(OBJECT_TYPE_LIST, WORD, Level, 0, 2, 2);
998 TEST_FIELD(OBJECT_TYPE_LIST, WORD, Sbz, 2, 2, 2);
999 TEST_FIELD(OBJECT_TYPE_LIST, GUID *, ObjectType, 4, 4, 4);
1000 }
1001
1002 static void test_pack_PACCESS_ALLOWED_ACE(void)
1003 {
1004 /* PACCESS_ALLOWED_ACE */
1005 TEST_TYPE(PACCESS_ALLOWED_ACE, 4, 4);
1006 TEST_TYPE_POINTER(PACCESS_ALLOWED_ACE, 12, 4);
1007 }
1008
1009 static void test_pack_PACCESS_DENIED_ACE(void)
1010 {
1011 /* PACCESS_DENIED_ACE */
1012 TEST_TYPE(PACCESS_DENIED_ACE, 4, 4);
1013 TEST_TYPE_POINTER(PACCESS_DENIED_ACE, 12, 4);
1014 }
1015
1016 static void test_pack_PACCESS_TOKEN(void)
1017 {
1018 /* PACCESS_TOKEN */
1019 TEST_TYPE(PACCESS_TOKEN, 4, 4);
1020 }
1021
1022 static void test_pack_PACE_HEADER(void)
1023 {
1024 /* PACE_HEADER */
1025 TEST_TYPE(PACE_HEADER, 4, 4);
1026 TEST_TYPE_POINTER(PACE_HEADER, 4, 2);
1027 }
1028
1029 static void test_pack_PACL(void)
1030 {
1031 /* PACL */
1032 TEST_TYPE(PACL, 4, 4);
1033 TEST_TYPE_POINTER(PACL, 8, 2);
1034 }
1035
1036 static void test_pack_PACL_REVISION_INFORMATION(void)
1037 {
1038 /* PACL_REVISION_INFORMATION */
1039 TEST_TYPE(PACL_REVISION_INFORMATION, 4, 4);
1040 TEST_TYPE_POINTER(PACL_REVISION_INFORMATION, 4, 4);
1041 }
1042
1043 static void test_pack_PACL_SIZE_INFORMATION(void)
1044 {
1045 /* PACL_SIZE_INFORMATION */
1046 TEST_TYPE(PACL_SIZE_INFORMATION, 4, 4);
1047 TEST_TYPE_POINTER(PACL_SIZE_INFORMATION, 12, 4);
1048 }
1049
1050 static void test_pack_PCCH(void)
1051 {
1052 /* PCCH */
1053 TEST_TYPE(PCCH, 4, 4);
1054 TEST_TYPE_POINTER(PCCH, 1, 1);
1055 }
1056
1057 static void test_pack_PCH(void)
1058 {
1059 /* PCH */
1060 TEST_TYPE(PCH, 4, 4);
1061 TEST_TYPE_POINTER(PCH, 1, 1);
1062 }
1063
1064 static void test_pack_PCSTR(void)
1065 {
1066 /* PCSTR */
1067 TEST_TYPE(PCSTR, 4, 4);
1068 TEST_TYPE_POINTER(PCSTR, 1, 1);
1069 }
1070
1071 static void test_pack_PCTSTR(void)
1072 {
1073 /* PCTSTR */
1074 TEST_TYPE(PCTSTR, 4, 4);
1075 }
1076
1077 static void test_pack_PCWCH(void)
1078 {
1079 /* PCWCH */
1080 TEST_TYPE(PCWCH, 4, 4);
1081 TEST_TYPE_POINTER(PCWCH, 2, 2);
1082 }
1083
1084 static void test_pack_PCWSTR(void)
1085 {
1086 /* PCWSTR */
1087 TEST_TYPE(PCWSTR, 4, 4);
1088 TEST_TYPE_POINTER(PCWSTR, 2, 2);
1089 }
1090
1091 static void test_pack_PEXCEPTION_POINTERS(void)
1092 {
1093 /* PEXCEPTION_POINTERS */
1094 TEST_TYPE(PEXCEPTION_POINTERS, 4, 4);
1095 TEST_TYPE_POINTER(PEXCEPTION_POINTERS, 8, 4);
1096 }
1097
1098 static void test_pack_PEXCEPTION_RECORD(void)
1099 {
1100 /* PEXCEPTION_RECORD */
1101 TEST_TYPE(PEXCEPTION_RECORD, 4, 4);
1102 TEST_TYPE_POINTER(PEXCEPTION_RECORD, 80, 4);
1103 }
1104
1105 static void test_pack_PFLOATING_SAVE_AREA(void)
1106 {
1107 /* PFLOATING_SAVE_AREA */
1108 TEST_TYPE(PFLOATING_SAVE_AREA, 4, 4);
1109 TEST_TYPE_POINTER(PFLOATING_SAVE_AREA, 112, 4);
1110 }
1111
1112 static void test_pack_PFPO_DATA(void)
1113 {
1114 /* PFPO_DATA */
1115 TEST_TYPE(PFPO_DATA, 4, 4);
1116 TEST_TYPE_POINTER(PFPO_DATA, 16, 4);
1117 }
1118
1119 static void test_pack_PGENERIC_MAPPING(void)
1120 {
1121 /* PGENERIC_MAPPING */
1122 TEST_TYPE(PGENERIC_MAPPING, 4, 4);
1123 TEST_TYPE_POINTER(PGENERIC_MAPPING, 16, 4);
1124 }
1125
1126 static void test_pack_PHANDLE(void)
1127 {
1128 /* PHANDLE */
1129 TEST_TYPE(PHANDLE, 4, 4);
1130 TEST_TYPE_POINTER(PHANDLE, 4, 4);
1131 }
1132
1133 static void test_pack_PIMAGE_ARCHIVE_MEMBER_HEADER(void)
1134 {
1135 /* PIMAGE_ARCHIVE_MEMBER_HEADER */
1136 TEST_TYPE(PIMAGE_ARCHIVE_MEMBER_HEADER, 4, 4);
1137 TEST_TYPE_POINTER(PIMAGE_ARCHIVE_MEMBER_HEADER, 60, 1);
1138 }
1139
1140 static void test_pack_PIMAGE_AUX_SYMBOL(void)
1141 {
1142 /* PIMAGE_AUX_SYMBOL */
1143 TEST_TYPE(PIMAGE_AUX_SYMBOL, 4, 4);
1144 }
1145
1146 static void test_pack_PIMAGE_BASE_RELOCATION(void)
1147 {
1148 /* PIMAGE_BASE_RELOCATION */
1149 TEST_TYPE(PIMAGE_BASE_RELOCATION, 4, 4);
1150 TEST_TYPE_POINTER(PIMAGE_BASE_RELOCATION, 8, 4);
1151 }
1152
1153 static void test_pack_PIMAGE_BOUND_FORWARDER_REF(void)
1154 {
1155 /* PIMAGE_BOUND_FORWARDER_REF */
1156 TEST_TYPE(PIMAGE_BOUND_FORWARDER_REF, 4, 4);
1157 TEST_TYPE_POINTER(PIMAGE_BOUND_FORWARDER_REF, 8, 4);
1158 }
1159
1160 static void test_pack_PIMAGE_BOUND_IMPORT_DESCRIPTOR(void)
1161 {
1162 /* PIMAGE_BOUND_IMPORT_DESCRIPTOR */
1163 TEST_TYPE(PIMAGE_BOUND_IMPORT_DESCRIPTOR, 4, 4);
1164 TEST_TYPE_POINTER(PIMAGE_BOUND_IMPORT_DESCRIPTOR, 8, 4);
1165 }
1166
1167 static void test_pack_PIMAGE_COFF_SYMBOLS_HEADER(void)
1168 {
1169 /* PIMAGE_COFF_SYMBOLS_HEADER */
1170 TEST_TYPE(PIMAGE_COFF_SYMBOLS_HEADER, 4, 4);
1171 TEST_TYPE_POINTER(PIMAGE_COFF_SYMBOLS_HEADER, 32, 4);
1172 }
1173
1174 static void test_pack_PIMAGE_DATA_DIRECTORY(void)
1175 {
1176 /* PIMAGE_DATA_DIRECTORY */
1177 TEST_TYPE(PIMAGE_DATA_DIRECTORY, 4, 4);
1178 TEST_TYPE_POINTER(PIMAGE_DATA_DIRECTORY, 8, 4);
1179 }
1180
1181 static void test_pack_PIMAGE_DEBUG_DIRECTORY(void)
1182 {
1183 /* PIMAGE_DEBUG_DIRECTORY */
1184 TEST_TYPE(PIMAGE_DEBUG_DIRECTORY, 4, 4);
1185 TEST_TYPE_POINTER(PIMAGE_DEBUG_DIRECTORY, 28, 4);
1186 }
1187
1188 static void test_pack_PIMAGE_DEBUG_MISC(void)
1189 {
1190 /* PIMAGE_DEBUG_MISC */
1191 TEST_TYPE(PIMAGE_DEBUG_MISC, 4, 4);
1192 TEST_TYPE_POINTER(PIMAGE_DEBUG_MISC, 16, 4);
1193 }
1194
1195 static void test_pack_PIMAGE_DOS_HEADER(void)
1196 {
1197 /* PIMAGE_DOS_HEADER */
1198 TEST_TYPE(PIMAGE_DOS_HEADER, 4, 4);
1199 TEST_TYPE_POINTER(PIMAGE_DOS_HEADER, 64, 2);
1200 }
1201
1202 static void test_pack_PIMAGE_EXPORT_DIRECTORY(void)
1203 {
1204 /* PIMAGE_EXPORT_DIRECTORY */
1205 TEST_TYPE(PIMAGE_EXPORT_DIRECTORY, 4, 4);
1206 TEST_TYPE_POINTER(PIMAGE_EXPORT_DIRECTORY, 40, 4);
1207 }
1208
1209 static void test_pack_PIMAGE_FILE_HEADER(void)
1210 {
1211 /* PIMAGE_FILE_HEADER */
1212 TEST_TYPE(PIMAGE_FILE_HEADER, 4, 4);
1213 TEST_TYPE_POINTER(PIMAGE_FILE_HEADER, 20, 4);
1214 }
1215
1216 static void test_pack_PIMAGE_FUNCTION_ENTRY(void)
1217 {
1218 /* PIMAGE_FUNCTION_ENTRY */
1219 TEST_TYPE(PIMAGE_FUNCTION_ENTRY, 4, 4);
1220 TEST_TYPE_POINTER(PIMAGE_FUNCTION_ENTRY, 12, 4);
1221 }
1222
1223 static void test_pack_PIMAGE_IMPORT_BY_NAME(void)
1224 {
1225 /* PIMAGE_IMPORT_BY_NAME */
1226 TEST_TYPE(PIMAGE_IMPORT_BY_NAME, 4, 4);
1227 TEST_TYPE_POINTER(PIMAGE_IMPORT_BY_NAME, 4, 2);
1228 }
1229
1230 static void test_pack_PIMAGE_IMPORT_DESCRIPTOR(void)
1231 {
1232 /* PIMAGE_IMPORT_DESCRIPTOR */
1233 TEST_TYPE(PIMAGE_IMPORT_DESCRIPTOR, 4, 4);
1234 }
1235
1236 static void test_pack_PIMAGE_LINENUMBER(void)
1237 {
1238 /* PIMAGE_LINENUMBER */
1239 TEST_TYPE(PIMAGE_LINENUMBER, 4, 4);
1240 }
1241
1242 static void test_pack_PIMAGE_LOAD_CONFIG_DIRECTORY(void)
1243 {
1244 /* PIMAGE_LOAD_CONFIG_DIRECTORY */
1245 TEST_TYPE(PIMAGE_LOAD_CONFIG_DIRECTORY, 4, 4);
1246 TEST_TYPE_POINTER(PIMAGE_LOAD_CONFIG_DIRECTORY, 72, 4);
1247 }
1248
1249 static void test_pack_PIMAGE_NT_HEADERS(void)
1250 {
1251 /* PIMAGE_NT_HEADERS */
1252 TEST_TYPE(PIMAGE_NT_HEADERS, 4, 4);
1253 TEST_TYPE_POINTER(PIMAGE_NT_HEADERS, 248, 4);
1254 }
1255
1256 static void test_pack_PIMAGE_OPTIONAL_HEADER(void)
1257 {
1258 /* PIMAGE_OPTIONAL_HEADER */
1259 TEST_TYPE(PIMAGE_OPTIONAL_HEADER, 4, 4);
1260 TEST_TYPE_POINTER(PIMAGE_OPTIONAL_HEADER, 224, 4);
1261 }
1262
1263 static void test_pack_PIMAGE_OS2_HEADER(void)
1264 {
1265 /* PIMAGE_OS2_HEADER */
1266 TEST_TYPE(PIMAGE_OS2_HEADER, 4, 4);
1267 TEST_TYPE_POINTER(PIMAGE_OS2_HEADER, 64, 2);
1268 }
1269
1270 static void test_pack_PIMAGE_RELOCATION(void)
1271 {
1272 /* PIMAGE_RELOCATION */
1273 TEST_TYPE(PIMAGE_RELOCATION, 4, 4);
1274 }
1275
1276 static void test_pack_PIMAGE_RESOURCE_DATA_ENTRY(void)
1277 {
1278 /* PIMAGE_RESOURCE_DATA_ENTRY */
1279 TEST_TYPE(PIMAGE_RESOURCE_DATA_ENTRY, 4, 4);
1280 TEST_TYPE_POINTER(PIMAGE_RESOURCE_DATA_ENTRY, 16, 4);
1281 }
1282
1283 static void test_pack_PIMAGE_RESOURCE_DIRECTORY(void)
1284 {
1285 /* PIMAGE_RESOURCE_DIRECTORY */
1286 TEST_TYPE(PIMAGE_RESOURCE_DIRECTORY, 4, 4);
1287 TEST_TYPE_POINTER(PIMAGE_RESOURCE_DIRECTORY, 16, 4);
1288 }
1289
1290 static void test_pack_PIMAGE_RESOURCE_DIRECTORY_ENTRY(void)
1291 {
1292 /* PIMAGE_RESOURCE_DIRECTORY_ENTRY */
1293 TEST_TYPE(PIMAGE_RESOURCE_DIRECTORY_ENTRY, 4, 4);
1294 }
1295
1296 static void test_pack_PIMAGE_RESOURCE_DIRECTORY_STRING(void)
1297 {
1298 /* PIMAGE_RESOURCE_DIRECTORY_STRING */
1299 TEST_TYPE(PIMAGE_RESOURCE_DIRECTORY_STRING, 4, 4);
1300 TEST_TYPE_POINTER(PIMAGE_RESOURCE_DIRECTORY_STRING, 4, 2);
1301 }
1302
1303 static void test_pack_PIMAGE_RESOURCE_DIR_STRING_U(void)
1304 {
1305 /* PIMAGE_RESOURCE_DIR_STRING_U */
1306 TEST_TYPE(PIMAGE_RESOURCE_DIR_STRING_U, 4, 4);
1307 TEST_TYPE_POINTER(PIMAGE_RESOURCE_DIR_STRING_U, 4, 2);
1308 }
1309
1310 static void test_pack_PIMAGE_SECTION_HEADER(void)
1311 {
1312 /* PIMAGE_SECTION_HEADER */
1313 TEST_TYPE(PIMAGE_SECTION_HEADER, 4, 4);
1314 }
1315
1316 static void test_pack_PIMAGE_SEPARATE_DEBUG_HEADER(void)
1317 {
1318 /* PIMAGE_SEPARATE_DEBUG_HEADER */
1319 TEST_TYPE(PIMAGE_SEPARATE_DEBUG_HEADER, 4, 4);
1320 TEST_TYPE_POINTER(PIMAGE_SEPARATE_DEBUG_HEADER, 48, 4);
1321 }
1322
1323 static void test_pack_PIMAGE_SYMBOL(void)
1324 {
1325 /* PIMAGE_SYMBOL */
1326 TEST_TYPE(PIMAGE_SYMBOL, 4, 4);
1327 }
1328
1329 static void test_pack_PIMAGE_THUNK_DATA(void)
1330 {
1331 /* PIMAGE_THUNK_DATA */
1332 TEST_TYPE(PIMAGE_THUNK_DATA, 4, 4);
1333 }
1334
1335 static void test_pack_PIMAGE_TLS_CALLBACK(void)
1336 {
1337 /* PIMAGE_TLS_CALLBACK */
1338 TEST_TYPE(PIMAGE_TLS_CALLBACK, 4, 4);
1339 }
1340
1341 static void test_pack_PIMAGE_TLS_DIRECTORY(void)
1342 {
1343 /* PIMAGE_TLS_DIRECTORY */
1344 TEST_TYPE(PIMAGE_TLS_DIRECTORY, 4, 4);
1345 TEST_TYPE_POINTER(PIMAGE_TLS_DIRECTORY, 24, 4);
1346 }
1347
1348 static void test_pack_PIMAGE_VXD_HEADER(void)
1349 {
1350 /* PIMAGE_VXD_HEADER */
1351 TEST_TYPE(PIMAGE_VXD_HEADER, 4, 4);
1352 TEST_TYPE_POINTER(PIMAGE_VXD_HEADER, 196, 2);
1353 }
1354
1355 static void test_pack_PIO_COUNTERS(void)
1356 {
1357 /* PIO_COUNTERS */
1358 TEST_TYPE(PIO_COUNTERS, 4, 4);
1359 TEST_TYPE_POINTER(PIO_COUNTERS, 48, 8);
1360 }
1361
1362 static void test_pack_PISECURITY_DESCRIPTOR(void)
1363 {
1364 /* PISECURITY_DESCRIPTOR */
1365 TEST_TYPE(PISECURITY_DESCRIPTOR, 4, 4);
1366 TEST_TYPE_POINTER(PISECURITY_DESCRIPTOR, 20, 4);
1367 }
1368
1369 static void test_pack_PISECURITY_DESCRIPTOR_RELATIVE(void)
1370 {
1371 /* PISECURITY_DESCRIPTOR_RELATIVE */
1372 TEST_TYPE(PISECURITY_DESCRIPTOR_RELATIVE, 4, 4);
1373 TEST_TYPE_POINTER(PISECURITY_DESCRIPTOR_RELATIVE, 20, 4);
1374 }
1375
1376 static void test_pack_PISID(void)
1377 {
1378 /* PISID */
1379 TEST_TYPE(PISID, 4, 4);
1380 TEST_TYPE_POINTER(PISID, 12, 4);
1381 }
1382
1383 static void test_pack_PLARGE_INTEGER(void)
1384 {
1385 /* PLARGE_INTEGER */
1386 TEST_TYPE(PLARGE_INTEGER, 4, 4);
1387 }
1388
1389 static void test_pack_PLIST_ENTRY(void)
1390 {
1391 /* PLIST_ENTRY */
1392 TEST_TYPE(PLIST_ENTRY, 4, 4);
1393 TEST_TYPE_POINTER(PLIST_ENTRY, 8, 4);
1394 }
1395
1396 static void test_pack_PLUID(void)
1397 {
1398 /* PLUID */
1399 TEST_TYPE(PLUID, 4, 4);
1400 TEST_TYPE_POINTER(PLUID, 8, 4);
1401 }
1402
1403 static void test_pack_PLUID_AND_ATTRIBUTES(void)
1404 {
1405 /* PLUID_AND_ATTRIBUTES */
1406 TEST_TYPE(PLUID_AND_ATTRIBUTES, 4, 4);
1407 TEST_TYPE_POINTER(PLUID_AND_ATTRIBUTES, 12, 4);
1408 }
1409
1410 static void test_pack_PMEMORY_BASIC_INFORMATION(void)
1411 {
1412 /* PMEMORY_BASIC_INFORMATION */
1413 TEST_TYPE(PMEMORY_BASIC_INFORMATION, 4, 4);
1414 TEST_TYPE_POINTER(PMEMORY_BASIC_INFORMATION, 28, 4);
1415 }
1416
1417 static void test_pack_PMESSAGE_RESOURCE_BLOCK(void)
1418 {
1419 /* PMESSAGE_RESOURCE_BLOCK */
1420 TEST_TYPE(PMESSAGE_RESOURCE_BLOCK, 4, 4);
1421 TEST_TYPE_POINTER(PMESSAGE_RESOURCE_BLOCK, 12, 4);
1422 }
1423
1424 static void test_pack_PMESSAGE_RESOURCE_DATA(void)
1425 {
1426 /* PMESSAGE_RESOURCE_DATA */
1427 TEST_TYPE(PMESSAGE_RESOURCE_DATA, 4, 4);
1428 TEST_TYPE_POINTER(PMESSAGE_RESOURCE_DATA, 16, 4);
1429 }
1430
1431 static void test_pack_PMESSAGE_RESOURCE_ENTRY(void)
1432 {
1433 /* PMESSAGE_RESOURCE_ENTRY */
1434 TEST_TYPE(PMESSAGE_RESOURCE_ENTRY, 4, 4);
1435 TEST_TYPE_POINTER(PMESSAGE_RESOURCE_ENTRY, 6, 2);
1436 }
1437
1438 static void test_pack_PNT_TIB(void)
1439 {
1440 /* PNT_TIB */
1441 TEST_TYPE(PNT_TIB, 4, 4);
1442 }
1443
1444 static void test_pack_POBJECT_TYPE_LIST(void)
1445 {
1446 /* POBJECT_TYPE_LIST */
1447 TEST_TYPE(POBJECT_TYPE_LIST, 4, 4);
1448 TEST_TYPE_POINTER(POBJECT_TYPE_LIST, 8, 4);
1449 }
1450
1451 static void test_pack_PPRIVILEGE_SET(void)
1452 {
1453 /* PPRIVILEGE_SET */
1454 TEST_TYPE(PPRIVILEGE_SET, 4, 4);
1455 TEST_TYPE_POINTER(PPRIVILEGE_SET, 20, 4);
1456 }
1457
1458 static void test_pack_PRIVILEGE_SET(void)
1459 {
1460 /* PRIVILEGE_SET (pack 4) */
1461 TEST_TYPE(PRIVILEGE_SET, 20, 4);
1462 TEST_FIELD(PRIVILEGE_SET, DWORD, PrivilegeCount, 0, 4, 4);
1463 TEST_FIELD(PRIVILEGE_SET, DWORD, Control, 4, 4, 4);
1464 TEST_FIELD(PRIVILEGE_SET, LUID_AND_ATTRIBUTES[ANYSIZE_ARRAY], Privilege, 8, 12, 4);
1465 }
1466
1467 static void test_pack_PRLIST_ENTRY(void)
1468 {
1469 /* PRLIST_ENTRY */
1470 TEST_TYPE(PRLIST_ENTRY, 4, 4);
1471 TEST_TYPE_POINTER(PRLIST_ENTRY, 8, 4);
1472 }
1473
1474 static void test_pack_PRTL_CRITICAL_SECTION(void)
1475 {
1476 /* PRTL_CRITICAL_SECTION */
1477 TEST_TYPE(PRTL_CRITICAL_SECTION, 4, 4);
1478 TEST_TYPE_POINTER(PRTL_CRITICAL_SECTION, 24, 4);
1479 }
1480
1481 static void test_pack_PRTL_CRITICAL_SECTION_DEBUG(void)
1482 {
1483 /* PRTL_CRITICAL_SECTION_DEBUG */
1484 TEST_TYPE(PRTL_CRITICAL_SECTION_DEBUG, 4, 4);
1485 TEST_TYPE_POINTER(PRTL_CRITICAL_SECTION_DEBUG, 32, 4);
1486 }
1487
1488 static void test_pack_PRTL_OSVERSIONINFOEXW(void)
1489 {
1490 /* PRTL_OSVERSIONINFOEXW */
1491 TEST_TYPE(PRTL_OSVERSIONINFOEXW, 4, 4);
1492 TEST_TYPE_POINTER(PRTL_OSVERSIONINFOEXW, 284, 4);
1493 }
1494
1495 static void test_pack_PRTL_OSVERSIONINFOW(void)
1496 {
1497 /* PRTL_OSVERSIONINFOW */
1498 TEST_TYPE(PRTL_OSVERSIONINFOW, 4, 4);
1499 TEST_TYPE_POINTER(PRTL_OSVERSIONINFOW, 276, 4);
1500 }
1501
1502 static void test_pack_PRTL_RESOURCE_DEBUG(void)
1503 {
1504 /* PRTL_RESOURCE_DEBUG */
1505 TEST_TYPE(PRTL_RESOURCE_DEBUG, 4, 4);
1506 TEST_TYPE_POINTER(PRTL_RESOURCE_DEBUG, 32, 4);
1507 }
1508
1509 static void test_pack_PSECURITY_DESCRIPTOR(void)
1510 {
1511 /* PSECURITY_DESCRIPTOR */
1512 TEST_TYPE(PSECURITY_DESCRIPTOR, 4, 4);
1513 }
1514
1515 static void test_pack_PSECURITY_QUALITY_OF_SERVICE(void)
1516 {
1517 /* PSECURITY_QUALITY_OF_SERVICE */
1518 TEST_TYPE(PSECURITY_QUALITY_OF_SERVICE, 4, 4);
1519 }
1520
1521 static void test_pack_PSID(void)
1522 {
1523 /* PSID */
1524 TEST_TYPE(PSID, 4, 4);
1525 }
1526
1527 static void test_pack_PSID_IDENTIFIER_AUTHORITY(void)
1528 {
1529 /* PSID_IDENTIFIER_AUTHORITY */
1530 TEST_TYPE(PSID_IDENTIFIER_AUTHORITY, 4, 4);
1531 TEST_TYPE_POINTER(PSID_IDENTIFIER_AUTHORITY, 6, 1);
1532 }
1533
1534 static void test_pack_PSINGLE_LIST_ENTRY(void)
1535 {
1536 /* PSINGLE_LIST_ENTRY */
1537 TEST_TYPE(PSINGLE_LIST_ENTRY, 4, 4);
1538 TEST_TYPE_POINTER(PSINGLE_LIST_ENTRY, 4, 4);
1539 }
1540
1541 static void test_pack_PSTR(void)
1542 {
1543 /* PSTR */
1544 TEST_TYPE(PSTR, 4, 4);
1545 TEST_TYPE_POINTER(PSTR, 1, 1);
1546 }
1547
1548 static void test_pack_PSYSTEM_ALARM_ACE(void)
1549 {
1550 /* PSYSTEM_ALARM_ACE */
1551 TEST_TYPE(PSYSTEM_ALARM_ACE, 4, 4);
1552 TEST_TYPE_POINTER(PSYSTEM_ALARM_ACE, 12, 4);
1553 }
1554
1555 static void test_pack_PSYSTEM_AUDIT_ACE(void)
1556 {
1557 /* PSYSTEM_AUDIT_ACE */
1558 TEST_TYPE(PSYSTEM_AUDIT_ACE, 4, 4);
1559 TEST_TYPE_POINTER(PSYSTEM_AUDIT_ACE, 12, 4);
1560 }
1561
1562 static void test_pack_PTOKEN_GROUPS(void)
1563 {
1564 /* PTOKEN_GROUPS */
1565 TEST_TYPE(PTOKEN_GROUPS, 4, 4);
1566 TEST_TYPE_POINTER(PTOKEN_GROUPS, 12, 4);
1567 }
1568
1569 static void test_pack_PTOKEN_PRIVILEGES(void)
1570 {
1571 /* PTOKEN_PRIVILEGES */
1572 TEST_TYPE(PTOKEN_PRIVILEGES, 4, 4);
1573 TEST_TYPE_POINTER(PTOKEN_PRIVILEGES, 16, 4);
1574 }
1575
1576 static void test_pack_PTOKEN_USER(void)
1577 {
1578 /* PTOKEN_USER */
1579 TEST_TYPE(PTOKEN_USER, 4, 4);
1580 TEST_TYPE_POINTER(PTOKEN_USER, 8, 4);
1581 }
1582
1583 static void test_pack_PTOP_LEVEL_EXCEPTION_FILTER(void)
1584 {
1585 /* PTOP_LEVEL_EXCEPTION_FILTER */
1586 TEST_TYPE(PTOP_LEVEL_EXCEPTION_FILTER, 4, 4);
1587 }
1588
1589 static void test_pack_PTSTR(void)
1590 {
1591 /* PTSTR */
1592 TEST_TYPE(PTSTR, 4, 4);
1593 }
1594
1595 static void test_pack_PULARGE_INTEGER(void)
1596 {
1597 /* PULARGE_INTEGER */
1598 TEST_TYPE(PULARGE_INTEGER, 4, 4);
1599 }
1600
1601 static void test_pack_PVECTORED_EXCEPTION_HANDLER(void)
1602 {
1603 /* PVECTORED_EXCEPTION_HANDLER */
1604 TEST_TYPE(PVECTORED_EXCEPTION_HANDLER, 4, 4);
1605 }
1606
1607 static void test_pack_PVOID(void)
1608 {
1609 /* PVOID */
1610 TEST_TYPE(PVOID, 4, 4);
1611 }
1612
1613 static void test_pack_PWCH(void)
1614 {
1615 /* PWCH */
1616 TEST_TYPE(PWCH, 4, 4);
1617 TEST_TYPE_POINTER(PWCH, 2, 2);
1618 }
1619
1620 static void test_pack_PWSTR(void)
1621 {
1622 /* PWSTR */
1623 TEST_TYPE(PWSTR, 4, 4);
1624 TEST_TYPE_POINTER(PWSTR, 2, 2);
1625 }
1626
1627 static void test_pack_RTL_CRITICAL_SECTION(void)
1628 {
1629 /* RTL_CRITICAL_SECTION (pack 4) */
1630 TEST_TYPE(RTL_CRITICAL_SECTION, 24, 4);
1631 TEST_FIELD(RTL_CRITICAL_SECTION, PRTL_CRITICAL_SECTION_DEBUG, DebugInfo, 0, 4, 4);
1632 TEST_FIELD(RTL_CRITICAL_SECTION, LONG, LockCount, 4, 4, 4);
1633 TEST_FIELD(RTL_CRITICAL_SECTION, LONG, RecursionCount, 8, 4, 4);
1634 TEST_FIELD(RTL_CRITICAL_SECTION, HANDLE, OwningThread, 12, 4, 4);
1635 TEST_FIELD(RTL_CRITICAL_SECTION, HANDLE, LockSemaphore, 16, 4, 4);
1636 TEST_FIELD(RTL_CRITICAL_SECTION, ULONG_PTR, SpinCount, 20, 4, 4);
1637 }
1638
1639 static void test_pack_RTL_CRITICAL_SECTION_DEBUG(void)
1640 {
1641 /* RTL_CRITICAL_SECTION_DEBUG (pack 4) */
1642 TEST_TYPE(RTL_CRITICAL_SECTION_DEBUG, 32, 4);
1643 TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, WORD, Type, 0, 2, 2);
1644 TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, WORD, CreatorBackTraceIndex, 2, 2, 2);
1645 TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, struct _RTL_CRITICAL_SECTION *, CriticalSection, 4, 4, 4);
1646 TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, LIST_ENTRY, ProcessLocksList, 8, 8, 4);
1647 TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, DWORD, EntryCount, 16, 4, 4);
1648 TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, DWORD, ContentionCount, 20, 4, 4);
1649 TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, DWORD[ 2 ], Spare, 24, 8, 4);
1650 }
1651
1652 static void test_pack_RTL_OSVERSIONINFOEXW(void)
1653 {
1654 /* RTL_OSVERSIONINFOEXW (pack 4) */
1655 TEST_TYPE(RTL_OSVERSIONINFOEXW, 284, 4);
1656 TEST_FIELD(RTL_OSVERSIONINFOEXW, DWORD, dwOSVersionInfoSize, 0, 4, 4);
1657 TEST_FIELD(RTL_OSVERSIONINFOEXW, DWORD, dwMajorVersion, 4, 4, 4);
1658 TEST_FIELD(RTL_OSVERSIONINFOEXW, DWORD, dwMinorVersion, 8, 4, 4);
1659 TEST_FIELD(RTL_OSVERSIONINFOEXW, DWORD, dwBuildNumber, 12, 4, 4);
1660 TEST_FIELD(RTL_OSVERSIONINFOEXW, DWORD, dwPlatformId, 16, 4, 4);
1661 TEST_FIELD(RTL_OSVERSIONINFOEXW, WCHAR[128], szCSDVersion, 20, 256, 2);
1662 TEST_FIELD(RTL_OSVERSIONINFOEXW, WORD, wServicePackMajor, 276, 2, 2);
1663 TEST_FIELD(RTL_OSVERSIONINFOEXW, WORD, wServicePackMinor, 278, 2, 2);
1664 TEST_FIELD(RTL_OSVERSIONINFOEXW, WORD, wSuiteMask, 280, 2, 2);
1665 TEST_FIELD(RTL_OSVERSIONINFOEXW, BYTE, wProductType, 282, 1, 1);
1666 TEST_FIELD(RTL_OSVERSIONINFOEXW, BYTE, wReserved, 283, 1, 1);
1667 }
1668
1669 static void test_pack_RTL_OSVERSIONINFOW(void)
1670 {
1671 /* RTL_OSVERSIONINFOW (pack 4) */
1672 TEST_TYPE(RTL_OSVERSIONINFOW, 276, 4);
1673 TEST_FIELD(RTL_OSVERSIONINFOW, DWORD, dwOSVersionInfoSize, 0, 4, 4);
1674 TEST_FIELD(RTL_OSVERSIONINFOW, DWORD, dwMajorVersion, 4, 4, 4);
1675 TEST_FIELD(RTL_OSVERSIONINFOW, DWORD, dwMinorVersion, 8, 4, 4);
1676 TEST_FIELD(RTL_OSVERSIONINFOW, DWORD, dwBuildNumber, 12, 4, 4);
1677 TEST_FIELD(RTL_OSVERSIONINFOW, DWORD, dwPlatformId, 16, 4, 4);
1678 TEST_FIELD(RTL_OSVERSIONINFOW, WCHAR[128], szCSDVersion, 20, 256, 2);
1679 }
1680
1681 static void test_pack_RTL_RESOURCE_DEBUG(void)
1682 {
1683 /* RTL_RESOURCE_DEBUG (pack 4) */
1684 TEST_TYPE(RTL_RESOURCE_DEBUG, 32, 4);
1685 TEST_FIELD(RTL_RESOURCE_DEBUG, WORD, Type, 0, 2, 2);
1686 TEST_FIELD(RTL_RESOURCE_DEBUG, WORD, CreatorBackTraceIndex, 2, 2, 2);
1687 TEST_FIELD(RTL_RESOURCE_DEBUG, struct _RTL_CRITICAL_SECTION *, CriticalSection, 4, 4, 4);
1688 TEST_FIELD(RTL_RESOURCE_DEBUG, LIST_ENTRY, ProcessLocksList, 8, 8, 4);
1689 TEST_FIELD(RTL_RESOURCE_DEBUG, DWORD, EntryCount, 16, 4, 4);
1690 TEST_FIELD(RTL_RESOURCE_DEBUG, DWORD, ContentionCount, 20, 4, 4);
1691 TEST_FIELD(RTL_RESOURCE_DEBUG, DWORD[ 2 ], Spare, 24, 8, 4);
1692 }
1693
1694 static void test_pack_SECURITY_CONTEXT_TRACKING_MODE(void)
1695 {
1696 /* SECURITY_CONTEXT_TRACKING_MODE */
1697 TEST_TYPE(SECURITY_CONTEXT_TRACKING_MODE, 1, 1);
1698 }
1699
1700 static void test_pack_SECURITY_DESCRIPTOR(void)
1701 {
1702 /* SECURITY_DESCRIPTOR (pack 4) */
1703 TEST_TYPE(SECURITY_DESCRIPTOR, 20, 4);
1704 TEST_FIELD(SECURITY_DESCRIPTOR, BYTE, Revision, 0, 1, 1);
1705 TEST_FIELD(SECURITY_DESCRIPTOR, BYTE, Sbz1, 1, 1, 1);
1706 TEST_FIELD(SECURITY_DESCRIPTOR, SECURITY_DESCRIPTOR_CONTROL, Control, 2, 2, 2);
1707 TEST_FIELD(SECURITY_DESCRIPTOR, PSID, Owner, 4, 4, 4);
1708 TEST_FIELD(SECURITY_DESCRIPTOR, PSID, Group, 8, 4, 4);
1709 TEST_FIELD(SECURITY_DESCRIPTOR, PACL, Sacl, 12, 4, 4);
1710 TEST_FIELD(SECURITY_DESCRIPTOR, PACL, Dacl, 16, 4, 4);
1711 }
1712
1713 static void test_pack_SECURITY_DESCRIPTOR_CONTROL(void)
1714 {
1715 /* SECURITY_DESCRIPTOR_CONTROL */
1716 TEST_TYPE(SECURITY_DESCRIPTOR_CONTROL, 2, 2);
1717 TEST_TYPE_UNSIGNED(SECURITY_DESCRIPTOR_CONTROL);
1718 }
1719
1720 static void test_pack_SECURITY_DESCRIPTOR_RELATIVE(void)
1721 {
1722 /* SECURITY_DESCRIPTOR_RELATIVE (pack 4) */
1723 TEST_TYPE(SECURITY_DESCRIPTOR_RELATIVE, 20, 4);
1724 TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, BYTE, Revision, 0, 1, 1);
1725 TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, BYTE, Sbz1, 1, 1, 1);
1726 TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, SECURITY_DESCRIPTOR_CONTROL, Control, 2, 2, 2);
1727 TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, DWORD, Owner, 4, 4, 4);
1728 TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, DWORD, Group, 8, 4, 4);
1729 TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, DWORD, Sacl, 12, 4, 4);
1730 TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, DWORD, Dacl, 16, 4, 4);
1731 }
1732
1733 static void test_pack_SECURITY_INFORMATION(void)
1734 {
1735 /* SECURITY_INFORMATION */
1736 TEST_TYPE(SECURITY_INFORMATION, 4, 4);
1737 TEST_TYPE_UNSIGNED(SECURITY_INFORMATION);
1738 }
1739
1740 static void test_pack_SECURITY_QUALITY_OF_SERVICE(void)
1741 {
1742 /* SECURITY_QUALITY_OF_SERVICE (pack 4) */
1743 TEST_FIELD(SECURITY_QUALITY_OF_SERVICE, DWORD, Length, 0, 4, 4);
1744 }
1745
1746 static void test_pack_SHORT(void)
1747 {
1748 /* SHORT */
1749 TEST_TYPE(SHORT, 2, 2);
1750 TEST_TYPE_SIGNED(SHORT);
1751 }
1752
1753 static void test_pack_SID(void)
1754 {
1755 /* SID (pack 4) */
1756 TEST_TYPE(SID, 12, 4);
1757 TEST_FIELD(SID, BYTE, Revision, 0, 1, 1);
1758 TEST_FIELD(SID, BYTE, SubAuthorityCount, 1, 1, 1);
1759 TEST_FIELD(SID, SID_IDENTIFIER_AUTHORITY, IdentifierAuthority, 2, 6, 1);
1760 TEST_FIELD(SID, DWORD[1], SubAuthority, 8, 4, 4);
1761 }
1762
1763 static void test_pack_SID_AND_ATTRIBUTES(void)
1764 {
1765 /* SID_AND_ATTRIBUTES (pack 4) */
1766 TEST_TYPE(SID_AND_ATTRIBUTES, 8, 4);
1767 TEST_FIELD(SID_AND_ATTRIBUTES, PSID, Sid, 0, 4, 4);
1768 TEST_FIELD(SID_AND_ATTRIBUTES, DWORD, Attributes, 4, 4, 4);
1769 }
1770
1771 static void test_pack_SID_IDENTIFIER_AUTHORITY(void)
1772 {
1773 /* SID_IDENTIFIER_AUTHORITY (pack 4) */
1774 TEST_TYPE(SID_IDENTIFIER_AUTHORITY, 6, 1);
1775 TEST_FIELD(SID_IDENTIFIER_AUTHORITY, BYTE[6], Value, 0, 6, 1);
1776 }
1777
1778 static void test_pack_SINGLE_LIST_ENTRY(void)
1779 {
1780 /* SINGLE_LIST_ENTRY (pack 4) */
1781 TEST_TYPE(SINGLE_LIST_ENTRY, 4, 4);
1782 TEST_FIELD(SINGLE_LIST_ENTRY, struct _SINGLE_LIST_ENTRY *, Next, 0, 4, 4);
1783 }
1784
1785 static void test_pack_SYSTEM_ALARM_ACE(void)
1786 {
1787 /* SYSTEM_ALARM_ACE (pack 4) */
1788 TEST_TYPE(SYSTEM_ALARM_ACE, 12, 4);
1789 TEST_FIELD(SYSTEM_ALARM_ACE, ACE_HEADER, Header, 0, 4, 2);
1790 TEST_FIELD(SYSTEM_ALARM_ACE, DWORD, Mask, 4, 4, 4);
1791 TEST_FIELD(SYSTEM_ALARM_ACE, DWORD, SidStart, 8, 4, 4);
1792 }
1793
1794 static void test_pack_SYSTEM_AUDIT_ACE(void)
1795 {
1796 /* SYSTEM_AUDIT_ACE (pack 4) */
1797 TEST_TYPE(SYSTEM_AUDIT_ACE, 12, 4);
1798 TEST_FIELD(SYSTEM_AUDIT_ACE, ACE_HEADER, Header, 0, 4, 2);
1799 TEST_FIELD(SYSTEM_AUDIT_ACE, DWORD, Mask, 4, 4, 4);
1800 TEST_FIELD(SYSTEM_AUDIT_ACE, DWORD, SidStart, 8, 4, 4);
1801 }
1802
1803 static void test_pack_TCHAR(void)
1804 {
1805 /* TCHAR */
1806 TEST_TYPE(TCHAR, 1, 1);
1807 }
1808
1809 static void test_pack_TOKEN_DEFAULT_DACL(void)
1810 {
1811 /* TOKEN_DEFAULT_DACL (pack 4) */
1812 TEST_TYPE(TOKEN_DEFAULT_DACL, 4, 4);
1813 TEST_FIELD(TOKEN_DEFAULT_DACL, PACL, DefaultDacl, 0, 4, 4);
1814 }
1815
1816 static void test_pack_TOKEN_GROUPS(void)
1817 {
1818 /* TOKEN_GROUPS (pack 4) */
1819 TEST_TYPE(TOKEN_GROUPS, 12, 4);
1820 TEST_FIELD(TOKEN_GROUPS, DWORD, GroupCount, 0, 4, 4);
1821 TEST_FIELD(TOKEN_GROUPS, SID_AND_ATTRIBUTES[ANYSIZE_ARRAY], Groups, 4, 8, 4);
1822 }
1823
1824 static void test_pack_TOKEN_OWNER(void)
1825 {
1826 /* TOKEN_OWNER (pack 4) */
1827 TEST_TYPE(TOKEN_OWNER, 4, 4);
1828 TEST_FIELD(TOKEN_OWNER, PSID, Owner, 0, 4, 4);
1829 }
1830
1831 static void test_pack_TOKEN_PRIMARY_GROUP(void)
1832 {
1833 /* TOKEN_PRIMARY_GROUP (pack 4) */
1834 TEST_TYPE(TOKEN_PRIMARY_GROUP, 4, 4);
1835 TEST_FIELD(TOKEN_PRIMARY_GROUP, PSID, PrimaryGroup, 0, 4, 4);
1836 }
1837
1838 static void test_pack_TOKEN_PRIVILEGES(void)
1839 {
1840 /* TOKEN_PRIVILEGES (pack 4) */
1841 TEST_TYPE(TOKEN_PRIVILEGES, 16, 4);
1842 TEST_FIELD(TOKEN_PRIVILEGES, DWORD, PrivilegeCount, 0, 4, 4);
1843 TEST_FIELD(TOKEN_PRIVILEGES, LUID_AND_ATTRIBUTES[ANYSIZE_ARRAY], Privileges, 4, 12, 4);
1844 }
1845
1846 static void test_pack_TOKEN_SOURCE(void)
1847 {
1848 /* TOKEN_SOURCE (pack 4) */
1849 TEST_TYPE(TOKEN_SOURCE, 16, 4);
1850 TEST_FIELD(TOKEN_SOURCE, char[TOKEN_SOURCE_LENGTH], SourceName, 0, 8, 1);
1851 TEST_FIELD(TOKEN_SOURCE, LUID, SourceIdentifier, 8, 8, 4);
1852 }
1853
1854 static void test_pack_TOKEN_STATISTICS(void)
1855 {
1856 /* TOKEN_STATISTICS (pack 4) */
1857 TEST_FIELD(TOKEN_STATISTICS, LUID, TokenId, 0, 8, 4);
1858 TEST_FIELD(TOKEN_STATISTICS, LUID, AuthenticationId, 8, 8, 4);
1859 TEST_FIELD(TOKEN_STATISTICS, LARGE_INTEGER, ExpirationTime, 16, 8, 4);
1860 }
1861
1862 static void test_pack_TOKEN_USER(void)
1863 {
1864 /* TOKEN_USER (pack 4) */
1865 TEST_TYPE(TOKEN_USER, 8, 4);
1866 TEST_FIELD(TOKEN_USER, SID_AND_ATTRIBUTES, User, 0, 8, 4);
1867 }
1868
1869 static void test_pack_ULARGE_INTEGER(void)
1870 {
1871 /* ULARGE_INTEGER (pack 4) */
1872 }
1873
1874 static void test_pack_ULONGLONG(void)
1875 {
1876 /* ULONGLONG */
1877 TEST_TYPE(ULONGLONG, 8, 8);
1878 TEST_TYPE_UNSIGNED(ULONGLONG);
1879 }
1880
1881 static void test_pack_WAITORTIMERCALLBACKFUNC(void)
1882 {
1883 /* WAITORTIMERCALLBACKFUNC */
1884 TEST_TYPE(WAITORTIMERCALLBACKFUNC, 4, 4);
1885 }
1886
1887 static void test_pack_WCHAR(void)
1888 {
1889 /* WCHAR */
1890 TEST_TYPE(WCHAR, 2, 2);
1891 TEST_TYPE_UNSIGNED(WCHAR);
1892 }
1893
1894 static void test_pack_ATOM(void)
1895 {
1896 /* ATOM */
1897 TEST_TYPE(ATOM, 2, 2);
1898 TEST_TYPE_UNSIGNED(ATOM);
1899 }
1900
1901 static void test_pack_BOOL(void)
1902 {
1903 /* BOOL */
1904 TEST_TYPE(BOOL, 4, 4);
1905 TEST_TYPE_SIGNED(BOOL);
1906 }
1907
1908 static void test_pack_BYTE(void)
1909 {
1910 /* BYTE */
1911 TEST_TYPE(BYTE, 1, 1);
1912 TEST_TYPE_UNSIGNED(BYTE);
1913 }
1914
1915 static void test_pack_COLORREF(void)
1916 {
1917 /* COLORREF */
1918 TEST_TYPE(COLORREF, 4, 4);
1919 TEST_TYPE_UNSIGNED(COLORREF);
1920 }
1921
1922 static void test_pack_DWORD(void)
1923 {
1924 /* DWORD */
1925 TEST_TYPE(DWORD, 4, 4);
1926 TEST_TYPE_UNSIGNED(DWORD);
1927 }
1928
1929 static void test_pack_FARPROC(void)
1930 {
1931 /* FARPROC */
1932 TEST_TYPE(FARPROC, 4, 4);
1933 }
1934
1935 static void test_pack_FLOAT(void)
1936 {
1937 /* FLOAT */
1938 TEST_TYPE(FLOAT, 4, 4);
1939 }
1940
1941 static void test_pack_GLOBALHANDLE(void)
1942 {
1943 /* GLOBALHANDLE */
1944 TEST_TYPE(GLOBALHANDLE, 4, 4);
1945 }
1946
1947 static void test_pack_HCURSOR(void)
1948 {
1949 /* HCURSOR */
1950 TEST_TYPE(HCURSOR, 4, 4);
1951 TEST_TYPE_UNSIGNED(HCURSOR);
1952 }
1953
1954 static void test_pack_HFILE(void)
1955 {
1956 /* HFILE */
1957 TEST_TYPE(HFILE, 4, 4);
1958 TEST_TYPE_SIGNED(HFILE);
1959 }
1960
1961 static void test_pack_HGDIOBJ(void)
1962 {
1963 /* HGDIOBJ */
1964 TEST_TYPE(HGDIOBJ, 4, 4);
1965 }
1966
1967 static void test_pack_HGLOBAL(void)
1968 {
1969 /* HGLOBAL */
1970 TEST_TYPE(HGLOBAL, 4, 4);
1971 }
1972
1973 static void test_pack_HLOCAL(void)
1974 {
1975 /* HLOCAL */
1976 TEST_TYPE(HLOCAL, 4, 4);
1977 }
1978
1979 static void test_pack_HMODULE(void)
1980 {
1981 /* HMODULE */
1982 TEST_TYPE(HMODULE, 4, 4);
1983 TEST_TYPE_UNSIGNED(HMODULE);
1984 }
1985
1986 static void test_pack_INT(void)
1987 {
1988 /* INT */
1989 TEST_TYPE(INT, 4, 4);
1990 TEST_TYPE_SIGNED(INT);
1991 }
1992
1993 static void test_pack_LOCALHANDLE(void)
1994 {
1995 /* LOCALHANDLE */
1996 TEST_TYPE(LOCALHANDLE, 4, 4);
1997 }
1998
1999 static void test_pack_LPARAM(void)
2000 {
2001 /* LPARAM */
2002 TEST_TYPE(LPARAM, 4, 4);
2003 }
2004
2005 static void test_pack_LPCRECT(void)
2006 {
2007 /* LPCRECT */
2008 TEST_TYPE(LPCRECT, 4, 4);
2009 TEST_TYPE_POINTER(LPCRECT, 16, 4);
2010 }
2011
2012 static void test_pack_LPCRECTL(void)
2013 {
2014 /* LPCRECTL */
2015 TEST_TYPE(LPCRECTL, 4, 4);
2016 TEST_TYPE_POINTER(LPCRECTL, 16, 4);
2017 }
2018
2019 static void test_pack_LPCVOID(void)
2020 {
2021 /* LPCVOID */
2022 TEST_TYPE(LPCVOID, 4, 4);
2023 }
2024
2025 static void test_pack_LPPOINT(void)
2026 {
2027 /* LPPOINT */
2028 TEST_TYPE(LPPOINT, 4, 4);
2029 TEST_TYPE_POINTER(LPPOINT, 8, 4);
2030 }
2031
2032 static void test_pack_LPPOINTS(void)
2033 {
2034 /* LPPOINTS */
2035 TEST_TYPE(LPPOINTS, 4, 4);
2036 TEST_TYPE_POINTER(LPPOINTS, 4, 2);
2037 }
2038
2039 static void test_pack_LPRECT(void)
2040 {
2041 /* LPRECT */
2042 TEST_TYPE(LPRECT, 4, 4);
2043 TEST_TYPE_POINTER(LPRECT, 16, 4);
2044 }
2045
2046 static void test_pack_LPRECTL(void)
2047 {
2048 /* LPRECTL */
2049 TEST_TYPE(LPRECTL, 4, 4);
2050 TEST_TYPE_POINTER(LPRECTL, 16, 4);
2051 }
2052
2053 static void test_pack_LPSIZE(void)
2054 {
2055 /* LPSIZE */
2056 TEST_TYPE(LPSIZE, 4, 4);
2057 TEST_TYPE_POINTER(LPSIZE, 8, 4);
2058 }
2059
2060 static void test_pack_LRESULT(void)
2061 {
2062 /* LRESULT */
2063 TEST_TYPE(LRESULT, 4, 4);
2064 }
2065
2066 static void test_pack_POINT(void)
2067 {
2068 /* POINT (pack 4) */
2069 TEST_TYPE(POINT, 8, 4);
2070 TEST_FIELD(POINT, LONG, x, 0, 4, 4);
2071 TEST_FIELD(POINT, LONG, y, 4, 4, 4);
2072 }
2073
2074 static void test_pack_POINTL(void)
2075 {
2076 /* POINTL (pack 4) */
2077 TEST_TYPE(POINTL, 8, 4);
2078 TEST_FIELD(POINTL, LONG, x, 0, 4, 4);
2079 TEST_FIELD(POINTL, LONG, y, 4, 4, 4);
2080 }
2081
2082 static void test_pack_POINTS(void)
2083 {
2084 /* POINTS (pack 4) */
2085 TEST_TYPE(POINTS, 4, 2);
2086 TEST_FIELD(POINTS, SHORT, x, 0, 2, 2);
2087 TEST_FIELD(POINTS, SHORT, y, 2, 2, 2);
2088 }
2089
2090 static void test_pack_PPOINT(void)
2091 {
2092 /* PPOINT */
2093 TEST_TYPE(PPOINT, 4, 4);
2094 TEST_TYPE_POINTER(PPOINT, 8, 4);
2095 }
2096
2097 static void test_pack_PPOINTL(void)
2098 {
2099 /* PPOINTL */
2100 TEST_TYPE(PPOINTL, 4, 4);
2101 TEST_TYPE_POINTER(PPOINTL, 8, 4);
2102 }
2103
2104 static void test_pack_PPOINTS(void)
2105 {
2106 /* PPOINTS */
2107 TEST_TYPE(PPOINTS, 4, 4);
2108 TEST_TYPE_POINTER(PPOINTS, 4, 2);
2109 }
2110
2111 static void test_pack_PRECT(void)
2112 {
2113 /* PRECT */
2114 TEST_TYPE(PRECT, 4, 4);
2115 TEST_TYPE_POINTER(PRECT, 16, 4);
2116 }
2117
2118 static void test_pack_PRECTL(void)
2119 {
2120 /* PRECTL */
2121 TEST_TYPE(PRECTL, 4, 4);
2122 TEST_TYPE_POINTER(PRECTL, 16, 4);
2123 }
2124
2125 static void test_pack_PROC(void)
2126 {
2127 /* PROC */
2128 TEST_TYPE(PROC, 4, 4);
2129 }
2130
2131 static void test_pack_PSIZE(void)
2132 {
2133 /* PSIZE */
2134 TEST_TYPE(PSIZE, 4, 4);
2135 TEST_TYPE_POINTER(PSIZE, 8, 4);
2136 }
2137
2138 static void test_pack_PSZ(void)
2139 {
2140 /* PSZ */
2141 TEST_TYPE(PSZ, 4, 4);
2142 }
2143
2144 static void test_pack_RECT(void)
2145 {
2146 /* RECT (pack 4) */
2147 TEST_TYPE(RECT, 16, 4);
2148 TEST_FIELD(RECT, LONG, left, 0, 4, 4);
2149 TEST_FIELD(RECT, LONG, top, 4, 4, 4);
2150 TEST_FIELD(RECT, LONG, right, 8, 4, 4);
2151 TEST_FIELD(RECT, LONG, bottom, 12, 4, 4);
2152 }
2153
2154 static void test_pack_RECTL(void)
2155 {
2156 /* RECTL (pack 4) */
2157 TEST_TYPE(RECTL, 16, 4);
2158 TEST_FIELD(RECTL, LONG, left, 0, 4, 4);
2159 TEST_FIELD(RECTL, LONG, top, 4, 4, 4);
2160 TEST_FIELD(RECTL, LONG, right, 8, 4, 4);
2161 TEST_FIELD(RECTL, LONG, bottom, 12, 4, 4);
2162 }
2163
2164 static void test_pack_SIZE(void)
2165 {
2166 /* SIZE (pack 4) */
2167 TEST_TYPE(SIZE, 8, 4);
2168 TEST_FIELD(SIZE, LONG, cx, 0, 4, 4);
2169 TEST_FIELD(SIZE, LONG, cy, 4, 4, 4);
2170 }
2171
2172 static void test_pack_SIZEL(void)
2173 {
2174 /* SIZEL */
2175 TEST_TYPE(SIZEL, 8, 4);
2176 }
2177
2178 static void test_pack_UCHAR(void)
2179 {
2180 /* UCHAR */
2181 TEST_TYPE(UCHAR, 1, 1);
2182 TEST_TYPE_UNSIGNED(UCHAR);
2183 }
2184
2185 static void test_pack_UINT(void)
2186 {
2187 /* UINT */
2188 TEST_TYPE(UINT, 4, 4);
2189 TEST_TYPE_UNSIGNED(UINT);
2190 }
2191
2192 static void test_pack_ULONG(void)
2193 {
2194 /* ULONG */
2195 TEST_TYPE(ULONG, 4, 4);
2196 TEST_TYPE_UNSIGNED(ULONG);
2197 }
2198
2199 static void test_pack_USHORT(void)
2200 {
2201 /* USHORT */
2202 TEST_TYPE(USHORT, 2, 2);
2203 TEST_TYPE_UNSIGNED(USHORT);
2204 }
2205
2206 static void test_pack_WORD(void)
2207 {
2208 /* WORD */
2209 TEST_TYPE(WORD, 2, 2);
2210 TEST_TYPE_UNSIGNED(WORD);
2211 }
2212
2213 static void test_pack_WPARAM(void)
2214 {
2215 /* WPARAM */
2216 TEST_TYPE(WPARAM, 4, 4);
2217 }
2218
2219 static void test_pack(void)
2220 {
2221 test_pack_ACCESS_ALLOWED_ACE();
2222 test_pack_ACCESS_DENIED_ACE();
2223 test_pack_ACCESS_MASK();
2224 test_pack_ACE_HEADER();
2225 test_pack_ACL();
2226 test_pack_ACL_REVISION_INFORMATION();
2227 test_pack_ACL_SIZE_INFORMATION();
2228 test_pack_ATOM();
2229 test_pack_BOOL();
2230 test_pack_BOOLEAN();
2231 test_pack_BYTE();
2232 test_pack_CCHAR();
2233 test_pack_CHAR();
2234 test_pack_COLORREF();
2235 test_pack_DWORD();
2236 test_pack_DWORD32();
2237 test_pack_DWORD64();
2238 test_pack_DWORDLONG();
2239 test_pack_DWORD_PTR();
2240 test_pack_EXCEPTION_POINTERS();
2241 test_pack_EXCEPTION_RECORD();
2242 test_pack_EXECUTION_STATE();
2243 test_pack_FARPROC();
2244 test_pack_FLOAT();
2245 test_pack_FLOATING_SAVE_AREA();
2246 test_pack_FPO_DATA();
2247 test_pack_GENERIC_MAPPING();
2248 test_pack_GLOBALHANDLE();
2249 test_pack_HALF_PTR();
2250 test_pack_HANDLE();
2251 test_pack_HCURSOR();
2252 test_pack_HFILE();
2253 test_pack_HGDIOBJ();
2254 test_pack_HGLOBAL();
2255 test_pack_HLOCAL();
2256 test_pack_HMODULE();
2257 test_pack_HRESULT();
2258 test_pack_IMAGE_ARCHIVE_MEMBER_HEADER();
2259 test_pack_IMAGE_AUX_SYMBOL();
2260 test_pack_IMAGE_BASE_RELOCATION();
2261 test_pack_IMAGE_BOUND_FORWARDER_REF();
2262 test_pack_IMAGE_BOUND_IMPORT_DESCRIPTOR();
2263 test_pack_IMAGE_COFF_SYMBOLS_HEADER();
2264 test_pack_IMAGE_DATA_DIRECTORY();
2265 test_pack_IMAGE_DEBUG_DIRECTORY();
2266 test_pack_IMAGE_DEBUG_MISC();
2267 test_pack_IMAGE_DOS_HEADER();
2268 test_pack_IMAGE_EXPORT_DIRECTORY();
2269 test_pack_IMAGE_FILE_HEADER();
2270 test_pack_IMAGE_FUNCTION_ENTRY();
2271 test_pack_IMAGE_IMPORT_BY_NAME();
2272 test_pack_IMAGE_IMPORT_DESCRIPTOR();
2273 test_pack_IMAGE_LINENUMBER();
2274 test_pack_IMAGE_LOAD_CONFIG_DIRECTORY();
2275 test_pack_IMAGE_NT_HEADERS();
2276 test_pack_IMAGE_OPTIONAL_HEADER();
2277 test_pack_IMAGE_OS2_HEADER();
2278 test_pack_IMAGE_RELOCATION();
2279 test_pack_IMAGE_RESOURCE_DATA_ENTRY();
2280 test_pack_IMAGE_RESOURCE_DIRECTORY();
2281 test_pack_IMAGE_RESOURCE_DIRECTORY_ENTRY();
2282 test_pack_IMAGE_RESOURCE_DIRECTORY_STRING();
2283 test_pack_IMAGE_RESOURCE_DIR_STRING_U();
2284 test_pack_IMAGE_SECTION_HEADER();
2285 test_pack_IMAGE_SEPARATE_DEBUG_HEADER();
2286 test_pack_IMAGE_SYMBOL();
2287 test_pack_IMAGE_THUNK_DATA();
2288 test_pack_IMAGE_TLS_DIRECTORY();
2289 test_pack_IMAGE_VXD_HEADER();
2290 test_pack_INT();
2291 test_pack_INT16();
2292 test_pack_INT32();
2293 test_pack_INT64();
2294 test_pack_INT8();
2295 test_pack_INT_PTR();
2296 test_pack_IO_COUNTERS();
2297 test_pack_LANGID();
2298 test_pack_LARGE_INTEGER();
2299 test_pack_LCID();
2300 test_pack_LIST_ENTRY();
2301 test_pack_LOCALHANDLE();
2302 test_pack_LONG();
2303 test_pack_LONG32();
2304 test_pack_LONG64();
2305 test_pack_LONGLONG();
2306 test_pack_LONG_PTR();
2307 test_pack_LPARAM();
2308 test_pack_LPCRECT();
2309 test_pack_LPCRECTL();
2310 test_pack_LPCVOID();
2311 test_pack_LPPOINT();
2312 test_pack_LPPOINTS();
2313 test_pack_LPRECT();
2314 test_pack_LPRECTL();
2315 test_pack_LPSIZE();
2316 test_pack_LPTOP_LEVEL_EXCEPTION_FILTER();
2317 test_pack_LRESULT();
2318 test_pack_LUID();
2319 test_pack_LUID_AND_ATTRIBUTES();
2320 test_pack_MEMORY_BASIC_INFORMATION();
2321 test_pack_MESSAGE_RESOURCE_BLOCK();
2322 test_pack_MESSAGE_RESOURCE_DATA();
2323 test_pack_MESSAGE_RESOURCE_ENTRY();
2324 test_pack_NT_TIB();
2325 test_pack_OBJECT_TYPE_LIST();
2326 test_pack_PACCESS_ALLOWED_ACE();
2327 test_pack_PACCESS_DENIED_ACE();
2328 test_pack_PACCESS_TOKEN();
2329 test_pack_PACE_HEADER();
2330 test_pack_PACL();
2331 test_pack_PACL_REVISION_INFORMATION();
2332 test_pack_PACL_SIZE_INFORMATION();
2333 test_pack_PCCH();
2334 test_pack_PCH();
2335 test_pack_PCSTR();
2336 test_pack_PCTSTR();
2337 test_pack_PCWCH();
2338 test_pack_PCWSTR();
2339 test_pack_PEXCEPTION_POINTERS();
2340 test_pack_PEXCEPTION_RECORD();
2341 test_pack_PFLOATING_SAVE_AREA();
2342 test_pack_PFPO_DATA();
2343 test_pack_PGENERIC_MAPPING();
2344 test_pack_PHANDLE();
2345 test_pack_PIMAGE_ARCHIVE_MEMBER_HEADER();
2346 test_pack_PIMAGE_AUX_SYMBOL();
2347 test_pack_PIMAGE_BASE_RELOCATION();
2348 test_pack_PIMAGE_BOUND_FORWARDER_REF();
2349 test_pack_PIMAGE_BOUND_IMPORT_DESCRIPTOR();
2350 test_pack_PIMAGE_COFF_SYMBOLS_HEADER();
2351 test_pack_PIMAGE_DATA_DIRECTORY();
2352 test_pack_PIMAGE_DEBUG_DIRECTORY();
2353 test_pack_PIMAGE_DEBUG_MISC();
2354 test_pack_PIMAGE_DOS_HEADER();
2355 test_pack_PIMAGE_EXPORT_DIRECTORY();
2356 test_pack_PIMAGE_FILE_HEADER();
2357 test_pack_PIMAGE_FUNCTION_ENTRY();
2358 test_pack_PIMAGE_IMPORT_BY_NAME();
2359 test_pack_PIMAGE_IMPORT_DESCRIPTOR();
2360 test_pack_PIMAGE_LINENUMBER();
2361 test_pack_PIMAGE_LOAD_CONFIG_DIRECTORY();
2362 test_pack_PIMAGE_NT_HEADERS();
2363 test_pack_PIMAGE_OPTIONAL_HEADER();
2364 test_pack_PIMAGE_OS2_HEADER();
2365 test_pack_PIMAGE_RELOCATION();
2366 test_pack_PIMAGE_RESOURCE_DATA_ENTRY();
2367 test_pack_PIMAGE_RESOURCE_DIRECTORY();
2368 test_pack_PIMAGE_RESOURCE_DIRECTORY_ENTRY();
2369 test_pack_PIMAGE_RESOURCE_DIRECTORY_STRING();
2370 test_pack_PIMAGE_RESOURCE_DIR_STRING_U();
2371 test_pack_PIMAGE_SECTION_HEADER();
2372 test_pack_PIMAGE_SEPARATE_DEBUG_HEADER();
2373 test_pack_PIMAGE_SYMBOL();
2374 test_pack_PIMAGE_THUNK_DATA();
2375 test_pack_PIMAGE_TLS_CALLBACK();
2376 test_pack_PIMAGE_TLS_DIRECTORY();
2377 test_pack_PIMAGE_VXD_HEADER();
2378 test_pack_PIO_COUNTERS();
2379 test_pack_PISECURITY_DESCRIPTOR();
2380 test_pack_PISECURITY_DESCRIPTOR_RELATIVE();
2381 test_pack_PISID();
2382 test_pack_PLARGE_INTEGER();
2383 test_pack_PLIST_ENTRY();
2384 test_pack_PLUID();
2385 test_pack_PLUID_AND_ATTRIBUTES();
2386 test_pack_PMEMORY_BASIC_INFORMATION();
2387 test_pack_PMESSAGE_RESOURCE_BLOCK();
2388 test_pack_PMESSAGE_RESOURCE_DATA();
2389 test_pack_PMESSAGE_RESOURCE_ENTRY();
2390 test_pack_PNT_TIB();
2391 test_pack_POBJECT_TYPE_LIST();
2392 test_pack_POINT();
2393 test_pack_POINTL();
2394 test_pack_POINTS();
2395 test_pack_PPOINT();
2396 test_pack_PPOINTL();
2397 test_pack_PPOINTS();
2398 test_pack_PPRIVILEGE_SET();
2399 test_pack_PRECT();
2400 test_pack_PRECTL();
2401 test_pack_PRIVILEGE_SET();
2402 test_pack_PRLIST_ENTRY();
2403 test_pack_PROC();
2404 test_pack_PRTL_CRITICAL_SECTION();
2405 test_pack_PRTL_CRITICAL_SECTION_DEBUG();
2406 test_pack_PRTL_OSVERSIONINFOEXW();
2407 test_pack_PRTL_OSVERSIONINFOW();
2408 test_pack_PRTL_RESOURCE_DEBUG();
2409 test_pack_PSECURITY_DESCRIPTOR();
2410 test_pack_PSECURITY_QUALITY_OF_SERVICE();
2411 test_pack_PSID();
2412 test_pack_PSID_IDENTIFIER_AUTHORITY();
2413 test_pack_PSINGLE_LIST_ENTRY();
2414 test_pack_PSIZE();
2415 test_pack_PSTR();
2416 test_pack_PSYSTEM_ALARM_ACE();
2417 test_pack_PSYSTEM_AUDIT_ACE();
2418 test_pack_PSZ();
2419 test_pack_PTOKEN_GROUPS();
2420 test_pack_PTOKEN_PRIVILEGES();
2421 test_pack_PTOKEN_USER();
2422 test_pack_PTOP_LEVEL_EXCEPTION_FILTER();
2423 test_pack_PTSTR();
2424 test_pack_PULARGE_INTEGER();
2425 test_pack_PVECTORED_EXCEPTION_HANDLER();
2426 test_pack_PVOID();
2427 test_pack_PWCH();
2428 test_pack_PWSTR();
2429 test_pack_RECT();
2430 test_pack_RECTL();
2431 test_pack_RTL_CRITICAL_SECTION();
2432 test_pack_RTL_CRITICAL_SECTION_DEBUG();
2433 test_pack_RTL_OSVERSIONINFOEXW();
2434 test_pack_RTL_OSVERSIONINFOW();
2435 test_pack_RTL_RESOURCE_DEBUG();
2436 test_pack_SECURITY_CONTEXT_TRACKING_MODE();
2437 test_pack_SECURITY_DESCRIPTOR();
2438 test_pack_SECURITY_DESCRIPTOR_CONTROL();
2439 test_pack_SECURITY_DESCRIPTOR_RELATIVE();
2440 test_pack_SECURITY_INFORMATION();
2441 test_pack_SECURITY_QUALITY_OF_SERVICE();
2442 test_pack_SHORT();
2443 test_pack_SID();
2444 test_pack_SID_AND_ATTRIBUTES();
2445 test_pack_SID_IDENTIFIER_AUTHORITY();
2446 test_pack_SINGLE_LIST_ENTRY();
2447 test_pack_SIZE();
2448 test_pack_SIZEL();
2449 test_pack_SIZE_T();
2450 test_pack_SSIZE_T();
2451 test_pack_SYSTEM_ALARM_ACE();
2452 test_pack_SYSTEM_AUDIT_ACE();
2453 test_pack_TCHAR();
2454 test_pack_TOKEN_DEFAULT_DACL();
2455 test_pack_TOKEN_GROUPS();
2456 test_pack_TOKEN_OWNER();
2457 test_pack_TOKEN_PRIMARY_GROUP();
2458 test_pack_TOKEN_PRIVILEGES();
2459 test_pack_TOKEN_SOURCE();
2460 test_pack_TOKEN_STATISTICS();
2461 test_pack_TOKEN_USER();
2462 test_pack_UCHAR();
2463 test_pack_UHALF_PTR();
2464 test_pack_UINT();
2465 test_pack_UINT16();
2466 test_pack_UINT32();
2467 test_pack_UINT64();
2468 test_pack_UINT8();
2469 test_pack_UINT_PTR();
2470 test_pack_ULARGE_INTEGER();
2471 test_pack_ULONG();
2472 test_pack_ULONG32();
2473 test_pack_ULONG64();
2474 test_pack_ULONGLONG();
2475 test_pack_ULONG_PTR();
2476 test_pack_USHORT();
2477 test_pack_WAITORTIMERCALLBACKFUNC();
2478 test_pack_WCHAR();
2479 test_pack_WORD();
2480 test_pack_WPARAM();
2481 }
2482
2483 START_TEST(generated)
2484 {
2485 test_pack();
2486 }