gdiplus: Implement GdipCloneFontFamily.
[wine.git] / dlls / ntdll / tests / generated.c
blob4818c9e50ebca6edf54929ae1c04a76975538d31
1 /* File generated automatically from tools/winapi/test.dat; do not edit! */
2 /* This file can be copied, modified and distributed without restriction. */
4 /*
5 * Unit tests for data structure packing
6 */
8 #define WINVER 0x0501
9 #define _WIN32_IE 0x0501
10 #define _WIN32_WINNT 0x0501
12 #define WINE_NOWINSOCK
14 #include "ntdll_test.h"
16 #include "wine/test.h"
18 /***********************************************************************
19 * Compatibility macros
22 #define DWORD_PTR UINT_PTR
23 #define LONG_PTR INT_PTR
24 #define ULONG_PTR UINT_PTR
26 /***********************************************************************
27 * Windows API extension
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
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
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)
48 #endif
50 #if defined(TYPE_ALIGNMENT) && defined(_MSC_VER) && _MSC_VER >= 800 && !defined(__cplusplus)
51 #pragma warning(disable:4116)
52 #endif
54 #if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT)
55 # define TYPE_ALIGNMENT _TYPE_ALIGNMENT
56 #endif
58 /***********************************************************************
59 * Test helper macros
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
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))
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
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
90 #define TEST_TYPE_SIZE(type, size) \
91 ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type)))
93 /***********************************************************************
94 * Test macros
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); \
102 #define TEST_TYPE(type, size, align) \
103 TEST_TYPE_ALIGNMENT(type, align); \
104 TEST_TYPE_SIZE(type, size)
106 #define TEST_TYPE_POINTER(type, size, align) \
107 TEST__TYPE_ALIGNMENT(*(type)0, align); \
108 TEST_TYPE_SIZE(*(type)0, size)
110 #define TEST_TYPE_SIGNED(type) \
111 ok((type) -1 < 0, "(" #type ") -1 < 0\n");
113 #define TEST_TYPE_UNSIGNED(type) \
114 ok((type) -1 > 0, "(" #type ") -1 > 0\n");
116 static void test_pack_DWORD32(void)
118 /* DWORD32 */
119 TEST_TYPE(DWORD32, 4, 4);
120 TEST_TYPE_UNSIGNED(DWORD32);
123 static void test_pack_DWORD64(void)
125 /* DWORD64 */
126 TEST_TYPE(DWORD64, 8, 8);
127 TEST_TYPE_UNSIGNED(DWORD64);
130 static void test_pack_DWORD_PTR(void)
132 /* DWORD_PTR */
133 TEST_TYPE(DWORD_PTR, 4, 4);
136 static void test_pack_HALF_PTR(void)
138 /* HALF_PTR */
139 TEST_TYPE(HALF_PTR, 2, 2);
140 TEST_TYPE_SIGNED(HALF_PTR);
143 static void test_pack_INT16(void)
145 /* INT16 */
146 TEST_TYPE(INT16, 2, 2);
147 TEST_TYPE_SIGNED(INT16);
150 static void test_pack_INT32(void)
152 /* INT32 */
153 TEST_TYPE(INT32, 4, 4);
154 TEST_TYPE_SIGNED(INT32);
157 static void test_pack_INT64(void)
159 /* INT64 */
160 TEST_TYPE(INT64, 8, 8);
161 TEST_TYPE_SIGNED(INT64);
164 static void test_pack_INT8(void)
166 /* INT8 */
167 TEST_TYPE(INT8, 1, 1);
168 TEST_TYPE_SIGNED(INT8);
171 static void test_pack_INT_PTR(void)
173 /* INT_PTR */
174 TEST_TYPE(INT_PTR, 4, 4);
175 TEST_TYPE_SIGNED(INT_PTR);
178 static void test_pack_LONG32(void)
180 /* LONG32 */
181 TEST_TYPE(LONG32, 4, 4);
182 TEST_TYPE_SIGNED(LONG32);
185 static void test_pack_LONG64(void)
187 /* LONG64 */
188 TEST_TYPE(LONG64, 8, 8);
189 TEST_TYPE_SIGNED(LONG64);
192 static void test_pack_LONG_PTR(void)
194 /* LONG_PTR */
195 TEST_TYPE(LONG_PTR, 4, 4);
196 TEST_TYPE_SIGNED(LONG_PTR);
199 static void test_pack_SIZE_T(void)
201 /* SIZE_T */
202 TEST_TYPE(SIZE_T, 4, 4);
205 static void test_pack_SSIZE_T(void)
207 /* SSIZE_T */
208 TEST_TYPE(SSIZE_T, 4, 4);
211 static void test_pack_UHALF_PTR(void)
213 /* UHALF_PTR */
214 TEST_TYPE(UHALF_PTR, 2, 2);
215 TEST_TYPE_UNSIGNED(UHALF_PTR);
218 static void test_pack_UINT16(void)
220 /* UINT16 */
221 TEST_TYPE(UINT16, 2, 2);
222 TEST_TYPE_UNSIGNED(UINT16);
225 static void test_pack_UINT32(void)
227 /* UINT32 */
228 TEST_TYPE(UINT32, 4, 4);
229 TEST_TYPE_UNSIGNED(UINT32);
232 static void test_pack_UINT64(void)
234 /* UINT64 */
235 TEST_TYPE(UINT64, 8, 8);
236 TEST_TYPE_UNSIGNED(UINT64);
239 static void test_pack_UINT8(void)
241 /* UINT8 */
242 TEST_TYPE(UINT8, 1, 1);
243 TEST_TYPE_UNSIGNED(UINT8);
246 static void test_pack_UINT_PTR(void)
248 /* UINT_PTR */
249 TEST_TYPE(UINT_PTR, 4, 4);
250 TEST_TYPE_UNSIGNED(UINT_PTR);
253 static void test_pack_ULONG32(void)
255 /* ULONG32 */
256 TEST_TYPE(ULONG32, 4, 4);
257 TEST_TYPE_UNSIGNED(ULONG32);
260 static void test_pack_ULONG64(void)
262 /* ULONG64 */
263 TEST_TYPE(ULONG64, 8, 8);
264 TEST_TYPE_UNSIGNED(ULONG64);
267 static void test_pack_ULONG_PTR(void)
269 /* ULONG_PTR */
270 TEST_TYPE(ULONG_PTR, 4, 4);
271 TEST_TYPE_UNSIGNED(ULONG_PTR);
274 static void test_pack_ACCESS_ALLOWED_ACE(void)
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);
283 static void test_pack_ACCESS_DENIED_ACE(void)
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);
292 static void test_pack_ACCESS_MASK(void)
294 /* ACCESS_MASK */
295 TEST_TYPE(ACCESS_MASK, 4, 4);
296 TEST_TYPE_UNSIGNED(ACCESS_MASK);
299 static void test_pack_ACE_HEADER(void)
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);
308 static void test_pack_ACL(void)
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);
319 static void test_pack_ACL_REVISION_INFORMATION(void)
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);
326 static void test_pack_ACL_SIZE_INFORMATION(void)
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);
335 static void test_pack_BOOLEAN(void)
337 /* BOOLEAN */
338 TEST_TYPE(BOOLEAN, 1, 1);
339 TEST_TYPE_UNSIGNED(BOOLEAN);
342 static void test_pack_CCHAR(void)
344 /* CCHAR */
345 TEST_TYPE(CCHAR, 1, 1);
346 TEST_TYPE_SIGNED(CCHAR);
349 static void test_pack_CHAR(void)
351 /* CHAR */
352 TEST_TYPE(CHAR, 1, 1);
353 TEST_TYPE_SIGNED(CHAR);
356 static void test_pack_DWORDLONG(void)
358 /* DWORDLONG */
359 TEST_TYPE(DWORDLONG, 8, 8);
360 TEST_TYPE_UNSIGNED(DWORDLONG);
363 static void test_pack_EXCEPTION_POINTERS(void)
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);
371 static void test_pack_EXCEPTION_RECORD(void)
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);
383 static void test_pack_EXECUTION_STATE(void)
385 /* EXECUTION_STATE */
386 TEST_TYPE(EXECUTION_STATE, 4, 4);
387 TEST_TYPE_UNSIGNED(EXECUTION_STATE);
390 static void test_pack_FLOATING_SAVE_AREA(void)
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);
405 static void test_pack_FPO_DATA(void)
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);
415 static void test_pack_GENERIC_MAPPING(void)
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);
425 static void test_pack_HANDLE(void)
427 /* HANDLE */
428 TEST_TYPE(HANDLE, 4, 4);
431 static void test_pack_HRESULT(void)
433 /* HRESULT */
434 TEST_TYPE(HRESULT, 4, 4);
437 static void test_pack_IMAGE_ARCHIVE_MEMBER_HEADER(void)
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);
450 static void test_pack_IMAGE_AUX_SYMBOL(void)
452 /* IMAGE_AUX_SYMBOL (pack 2) */
455 static void test_pack_IMAGE_BASE_RELOCATION(void)
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);
463 static void test_pack_IMAGE_BOUND_FORWARDER_REF(void)
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);
472 static void test_pack_IMAGE_BOUND_IMPORT_DESCRIPTOR(void)
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);
481 static void test_pack_IMAGE_COFF_SYMBOLS_HEADER(void)
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);
495 static void test_pack_IMAGE_DATA_DIRECTORY(void)
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);
503 static void test_pack_IMAGE_DEBUG_DIRECTORY(void)
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);
517 static void test_pack_IMAGE_DEBUG_MISC(void)
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);
528 static void test_pack_IMAGE_DOS_HEADER(void)
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);
553 static void test_pack_IMAGE_EXPORT_DIRECTORY(void)
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);
570 static void test_pack_IMAGE_FILE_HEADER(void)
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);
583 static void test_pack_IMAGE_FUNCTION_ENTRY(void)
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);
592 static void test_pack_IMAGE_IMPORT_BY_NAME(void)
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);
600 static void test_pack_IMAGE_IMPORT_DESCRIPTOR(void)
602 /* IMAGE_IMPORT_DESCRIPTOR (pack 4) */
605 static void test_pack_IMAGE_LINENUMBER(void)
607 /* IMAGE_LINENUMBER (pack 2) */
610 static void test_pack_IMAGE_LOAD_CONFIG_DIRECTORY(void)
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);
636 static void test_pack_IMAGE_NT_HEADERS(void)
638 /* IMAGE_NT_HEADERS */
639 TEST_TYPE(IMAGE_NT_HEADERS, 248, 4);
642 static void test_pack_IMAGE_OS2_HEADER(void)
644 /* IMAGE_OS2_HEADER (pack 2) */
645 TEST_TYPE(IMAGE_OS2_HEADER, 64, 2);
646 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_magic, 0, 2, 2);
647 TEST_FIELD(IMAGE_OS2_HEADER, BYTE, ne_ver, 2, 1, 1);
648 TEST_FIELD(IMAGE_OS2_HEADER, BYTE, ne_rev, 3, 1, 1);
649 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_enttab, 4, 2, 2);
650 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_cbenttab, 6, 2, 2);
651 TEST_FIELD(IMAGE_OS2_HEADER, LONG, ne_crc, 8, 4, 2);
652 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_flags, 12, 2, 2);
653 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_autodata, 14, 2, 2);
654 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_heap, 16, 2, 2);
655 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_stack, 18, 2, 2);
656 TEST_FIELD(IMAGE_OS2_HEADER, DWORD, ne_csip, 20, 4, 2);
657 TEST_FIELD(IMAGE_OS2_HEADER, DWORD, ne_sssp, 24, 4, 2);
658 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_cseg, 28, 2, 2);
659 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_cmod, 30, 2, 2);
660 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_cbnrestab, 32, 2, 2);
661 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_segtab, 34, 2, 2);
662 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_rsrctab, 36, 2, 2);
663 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_restab, 38, 2, 2);
664 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_modtab, 40, 2, 2);
665 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_imptab, 42, 2, 2);
666 TEST_FIELD(IMAGE_OS2_HEADER, DWORD, ne_nrestab, 44, 4, 2);
667 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_cmovent, 48, 2, 2);
668 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_align, 50, 2, 2);
669 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_cres, 52, 2, 2);
670 TEST_FIELD(IMAGE_OS2_HEADER, BYTE, ne_exetyp, 54, 1, 1);
671 TEST_FIELD(IMAGE_OS2_HEADER, BYTE, ne_flagsothers, 55, 1, 1);
672 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_pretthunks, 56, 2, 2);
673 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_psegrefbytes, 58, 2, 2);
674 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_swaparea, 60, 2, 2);
675 TEST_FIELD(IMAGE_OS2_HEADER, WORD, ne_expver, 62, 2, 2);
678 static void test_pack_IMAGE_RELOCATION(void)
680 /* IMAGE_RELOCATION (pack 2) */
683 static void test_pack_IMAGE_RESOURCE_DATA_ENTRY(void)
685 /* IMAGE_RESOURCE_DATA_ENTRY (pack 4) */
686 TEST_TYPE(IMAGE_RESOURCE_DATA_ENTRY, 16, 4);
687 TEST_FIELD(IMAGE_RESOURCE_DATA_ENTRY, DWORD, OffsetToData, 0, 4, 4);
688 TEST_FIELD(IMAGE_RESOURCE_DATA_ENTRY, DWORD, Size, 4, 4, 4);
689 TEST_FIELD(IMAGE_RESOURCE_DATA_ENTRY, DWORD, CodePage, 8, 4, 4);
690 TEST_FIELD(IMAGE_RESOURCE_DATA_ENTRY, DWORD, Reserved, 12, 4, 4);
693 static void test_pack_IMAGE_RESOURCE_DIRECTORY(void)
695 /* IMAGE_RESOURCE_DIRECTORY (pack 4) */
696 TEST_TYPE(IMAGE_RESOURCE_DIRECTORY, 16, 4);
697 TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, DWORD, Characteristics, 0, 4, 4);
698 TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, DWORD, TimeDateStamp, 4, 4, 4);
699 TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, WORD, MajorVersion, 8, 2, 2);
700 TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, WORD, MinorVersion, 10, 2, 2);
701 TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, WORD, NumberOfNamedEntries, 12, 2, 2);
702 TEST_FIELD(IMAGE_RESOURCE_DIRECTORY, WORD, NumberOfIdEntries, 14, 2, 2);
705 static void test_pack_IMAGE_RESOURCE_DIRECTORY_ENTRY(void)
707 /* IMAGE_RESOURCE_DIRECTORY_ENTRY (pack 4) */
710 static void test_pack_IMAGE_RESOURCE_DIRECTORY_STRING(void)
712 /* IMAGE_RESOURCE_DIRECTORY_STRING (pack 4) */
713 TEST_TYPE(IMAGE_RESOURCE_DIRECTORY_STRING, 4, 2);
714 TEST_FIELD(IMAGE_RESOURCE_DIRECTORY_STRING, WORD, Length, 0, 2, 2);
715 TEST_FIELD(IMAGE_RESOURCE_DIRECTORY_STRING, CHAR[ 1 ], NameString, 2, 1, 1);
718 static void test_pack_IMAGE_RESOURCE_DIR_STRING_U(void)
720 /* IMAGE_RESOURCE_DIR_STRING_U (pack 4) */
721 TEST_TYPE(IMAGE_RESOURCE_DIR_STRING_U, 4, 2);
722 TEST_FIELD(IMAGE_RESOURCE_DIR_STRING_U, WORD, Length, 0, 2, 2);
723 TEST_FIELD(IMAGE_RESOURCE_DIR_STRING_U, WCHAR[ 1 ], NameString, 2, 2, 2);
726 static void test_pack_IMAGE_SECTION_HEADER(void)
728 /* IMAGE_SECTION_HEADER (pack 4) */
729 TEST_FIELD(IMAGE_SECTION_HEADER, BYTE[IMAGE_SIZEOF_SHORT_NAME], Name, 0, 8, 1);
732 static void test_pack_IMAGE_SEPARATE_DEBUG_HEADER(void)
734 /* IMAGE_SEPARATE_DEBUG_HEADER (pack 4) */
735 TEST_TYPE(IMAGE_SEPARATE_DEBUG_HEADER, 48, 4);
736 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, WORD, Signature, 0, 2, 2);
737 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, WORD, Flags, 2, 2, 2);
738 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, WORD, Machine, 4, 2, 2);
739 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, WORD, Characteristics, 6, 2, 2);
740 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, TimeDateStamp, 8, 4, 4);
741 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, CheckSum, 12, 4, 4);
742 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, ImageBase, 16, 4, 4);
743 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, SizeOfImage, 20, 4, 4);
744 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, NumberOfSections, 24, 4, 4);
745 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, ExportedNamesSize, 28, 4, 4);
746 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, DebugDirectorySize, 32, 4, 4);
747 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD, SectionAlignment, 36, 4, 4);
748 TEST_FIELD(IMAGE_SEPARATE_DEBUG_HEADER, DWORD[ 2 ], Reserved, 40, 8, 4);
751 static void test_pack_IMAGE_SYMBOL(void)
753 /* IMAGE_SYMBOL (pack 2) */
756 static void test_pack_IMAGE_THUNK_DATA(void)
758 /* IMAGE_THUNK_DATA */
761 static void test_pack_IMAGE_TLS_DIRECTORY(void)
763 /* IMAGE_TLS_DIRECTORY */
764 TEST_TYPE(IMAGE_TLS_DIRECTORY, 24, 4);
767 static void test_pack_IMAGE_VXD_HEADER(void)
769 /* IMAGE_VXD_HEADER (pack 2) */
770 TEST_TYPE(IMAGE_VXD_HEADER, 196, 2);
771 TEST_FIELD(IMAGE_VXD_HEADER, WORD, e32_magic, 0, 2, 2);
772 TEST_FIELD(IMAGE_VXD_HEADER, BYTE, e32_border, 2, 1, 1);
773 TEST_FIELD(IMAGE_VXD_HEADER, BYTE, e32_worder, 3, 1, 1);
774 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_level, 4, 4, 2);
775 TEST_FIELD(IMAGE_VXD_HEADER, WORD, e32_cpu, 8, 2, 2);
776 TEST_FIELD(IMAGE_VXD_HEADER, WORD, e32_os, 10, 2, 2);
777 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_ver, 12, 4, 2);
778 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_mflags, 16, 4, 2);
779 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_mpages, 20, 4, 2);
780 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_startobj, 24, 4, 2);
781 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_eip, 28, 4, 2);
782 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_stackobj, 32, 4, 2);
783 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_esp, 36, 4, 2);
784 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_pagesize, 40, 4, 2);
785 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_lastpagesize, 44, 4, 2);
786 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_fixupsize, 48, 4, 2);
787 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_fixupsum, 52, 4, 2);
788 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_ldrsize, 56, 4, 2);
789 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_ldrsum, 60, 4, 2);
790 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_objtab, 64, 4, 2);
791 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_objcnt, 68, 4, 2);
792 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_objmap, 72, 4, 2);
793 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_itermap, 76, 4, 2);
794 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_rsrctab, 80, 4, 2);
795 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_rsrccnt, 84, 4, 2);
796 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_restab, 88, 4, 2);
797 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_enttab, 92, 4, 2);
798 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_dirtab, 96, 4, 2);
799 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_dircnt, 100, 4, 2);
800 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_fpagetab, 104, 4, 2);
801 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_frectab, 108, 4, 2);
802 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_impmod, 112, 4, 2);
803 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_impmodcnt, 116, 4, 2);
804 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_impproc, 120, 4, 2);
805 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_pagesum, 124, 4, 2);
806 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_datapage, 128, 4, 2);
807 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_preload, 132, 4, 2);
808 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_nrestab, 136, 4, 2);
809 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_cbnrestab, 140, 4, 2);
810 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_nressum, 144, 4, 2);
811 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_autodata, 148, 4, 2);
812 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_debuginfo, 152, 4, 2);
813 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_debuglen, 156, 4, 2);
814 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_instpreload, 160, 4, 2);
815 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_instdemand, 164, 4, 2);
816 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_heapsize, 168, 4, 2);
817 TEST_FIELD(IMAGE_VXD_HEADER, BYTE[12], e32_res3, 172, 12, 1);
818 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_winresoff, 184, 4, 2);
819 TEST_FIELD(IMAGE_VXD_HEADER, DWORD, e32_winreslen, 188, 4, 2);
820 TEST_FIELD(IMAGE_VXD_HEADER, WORD, e32_devid, 192, 2, 2);
821 TEST_FIELD(IMAGE_VXD_HEADER, WORD, e32_ddkver, 194, 2, 2);
824 static void test_pack_IO_COUNTERS(void)
826 /* IO_COUNTERS (pack 8) */
827 TEST_TYPE(IO_COUNTERS, 48, 8);
828 TEST_FIELD(IO_COUNTERS, ULONGLONG, ReadOperationCount, 0, 8, 8);
829 TEST_FIELD(IO_COUNTERS, ULONGLONG, WriteOperationCount, 8, 8, 8);
830 TEST_FIELD(IO_COUNTERS, ULONGLONG, OtherOperationCount, 16, 8, 8);
831 TEST_FIELD(IO_COUNTERS, ULONGLONG, ReadTransferCount, 24, 8, 8);
832 TEST_FIELD(IO_COUNTERS, ULONGLONG, WriteTransferCount, 32, 8, 8);
833 TEST_FIELD(IO_COUNTERS, ULONGLONG, OtherTransferCount, 40, 8, 8);
836 static void test_pack_LANGID(void)
838 /* LANGID */
839 TEST_TYPE(LANGID, 2, 2);
840 TEST_TYPE_UNSIGNED(LANGID);
843 static void test_pack_LARGE_INTEGER(void)
845 /* LARGE_INTEGER (pack 4) */
848 static void test_pack_LCID(void)
850 /* LCID */
851 TEST_TYPE(LCID, 4, 4);
852 TEST_TYPE_UNSIGNED(LCID);
855 static void test_pack_LIST_ENTRY(void)
857 /* LIST_ENTRY (pack 4) */
858 TEST_TYPE(LIST_ENTRY, 8, 4);
859 TEST_FIELD(LIST_ENTRY, struct _LIST_ENTRY *, Flink, 0, 4, 4);
860 TEST_FIELD(LIST_ENTRY, struct _LIST_ENTRY *, Blink, 4, 4, 4);
863 static void test_pack_LONG(void)
865 /* LONG */
866 TEST_TYPE(LONG, 4, 4);
867 TEST_TYPE_SIGNED(LONG);
870 static void test_pack_LONGLONG(void)
872 /* LONGLONG */
873 TEST_TYPE(LONGLONG, 8, 8);
874 TEST_TYPE_SIGNED(LONGLONG);
877 static void test_pack_LUID(void)
879 /* LUID (pack 4) */
880 TEST_TYPE(LUID, 8, 4);
881 TEST_FIELD(LUID, DWORD, LowPart, 0, 4, 4);
882 TEST_FIELD(LUID, LONG, HighPart, 4, 4, 4);
885 static void test_pack_LUID_AND_ATTRIBUTES(void)
887 /* LUID_AND_ATTRIBUTES (pack 4) */
888 TEST_TYPE(LUID_AND_ATTRIBUTES, 12, 4);
889 TEST_FIELD(LUID_AND_ATTRIBUTES, LUID, Luid, 0, 8, 4);
890 TEST_FIELD(LUID_AND_ATTRIBUTES, DWORD, Attributes, 8, 4, 4);
893 static void test_pack_MEMORY_BASIC_INFORMATION(void)
895 /* MEMORY_BASIC_INFORMATION (pack 4) */
896 TEST_TYPE(MEMORY_BASIC_INFORMATION, 28, 4);
897 TEST_FIELD(MEMORY_BASIC_INFORMATION, LPVOID, BaseAddress, 0, 4, 4);
898 TEST_FIELD(MEMORY_BASIC_INFORMATION, LPVOID, AllocationBase, 4, 4, 4);
899 TEST_FIELD(MEMORY_BASIC_INFORMATION, DWORD, AllocationProtect, 8, 4, 4);
900 TEST_FIELD(MEMORY_BASIC_INFORMATION, SIZE_T, RegionSize, 12, 4, 4);
901 TEST_FIELD(MEMORY_BASIC_INFORMATION, DWORD, State, 16, 4, 4);
902 TEST_FIELD(MEMORY_BASIC_INFORMATION, DWORD, Protect, 20, 4, 4);
903 TEST_FIELD(MEMORY_BASIC_INFORMATION, DWORD, Type, 24, 4, 4);
906 static void test_pack_MESSAGE_RESOURCE_BLOCK(void)
908 /* MESSAGE_RESOURCE_BLOCK (pack 4) */
909 TEST_TYPE(MESSAGE_RESOURCE_BLOCK, 12, 4);
910 TEST_FIELD(MESSAGE_RESOURCE_BLOCK, DWORD, LowId, 0, 4, 4);
911 TEST_FIELD(MESSAGE_RESOURCE_BLOCK, DWORD, HighId, 4, 4, 4);
912 TEST_FIELD(MESSAGE_RESOURCE_BLOCK, DWORD, OffsetToEntries, 8, 4, 4);
915 static void test_pack_MESSAGE_RESOURCE_DATA(void)
917 /* MESSAGE_RESOURCE_DATA (pack 4) */
918 TEST_TYPE(MESSAGE_RESOURCE_DATA, 16, 4);
919 TEST_FIELD(MESSAGE_RESOURCE_DATA, DWORD, NumberOfBlocks, 0, 4, 4);
920 TEST_FIELD(MESSAGE_RESOURCE_DATA, MESSAGE_RESOURCE_BLOCK[ 1 ], Blocks, 4, 12, 4);
923 static void test_pack_MESSAGE_RESOURCE_ENTRY(void)
925 /* MESSAGE_RESOURCE_ENTRY (pack 4) */
926 TEST_TYPE(MESSAGE_RESOURCE_ENTRY, 6, 2);
927 TEST_FIELD(MESSAGE_RESOURCE_ENTRY, WORD, Length, 0, 2, 2);
928 TEST_FIELD(MESSAGE_RESOURCE_ENTRY, WORD, Flags, 2, 2, 2);
929 TEST_FIELD(MESSAGE_RESOURCE_ENTRY, BYTE[1], Text, 4, 1, 1);
932 static void test_pack_NT_TIB(void)
934 /* NT_TIB (pack 4) */
935 TEST_FIELD(NT_TIB, struct _EXCEPTION_REGISTRATION_RECORD *, ExceptionList, 0, 4, 4);
936 TEST_FIELD(NT_TIB, PVOID, StackBase, 4, 4, 4);
937 TEST_FIELD(NT_TIB, PVOID, StackLimit, 8, 4, 4);
938 TEST_FIELD(NT_TIB, PVOID, SubSystemTib, 12, 4, 4);
941 static void test_pack_OBJECT_TYPE_LIST(void)
943 /* OBJECT_TYPE_LIST (pack 4) */
944 TEST_TYPE(OBJECT_TYPE_LIST, 8, 4);
945 TEST_FIELD(OBJECT_TYPE_LIST, WORD, Level, 0, 2, 2);
946 TEST_FIELD(OBJECT_TYPE_LIST, WORD, Sbz, 2, 2, 2);
947 TEST_FIELD(OBJECT_TYPE_LIST, GUID *, ObjectType, 4, 4, 4);
950 static void test_pack_PACCESS_ALLOWED_ACE(void)
952 /* PACCESS_ALLOWED_ACE */
953 TEST_TYPE(PACCESS_ALLOWED_ACE, 4, 4);
954 TEST_TYPE_POINTER(PACCESS_ALLOWED_ACE, 12, 4);
957 static void test_pack_PACCESS_DENIED_ACE(void)
959 /* PACCESS_DENIED_ACE */
960 TEST_TYPE(PACCESS_DENIED_ACE, 4, 4);
961 TEST_TYPE_POINTER(PACCESS_DENIED_ACE, 12, 4);
964 static void test_pack_PACCESS_TOKEN(void)
966 /* PACCESS_TOKEN */
967 TEST_TYPE(PACCESS_TOKEN, 4, 4);
970 static void test_pack_PACE_HEADER(void)
972 /* PACE_HEADER */
973 TEST_TYPE(PACE_HEADER, 4, 4);
974 TEST_TYPE_POINTER(PACE_HEADER, 4, 2);
977 static void test_pack_PACL(void)
979 /* PACL */
980 TEST_TYPE(PACL, 4, 4);
981 TEST_TYPE_POINTER(PACL, 8, 2);
984 static void test_pack_PACL_REVISION_INFORMATION(void)
986 /* PACL_REVISION_INFORMATION */
987 TEST_TYPE(PACL_REVISION_INFORMATION, 4, 4);
988 TEST_TYPE_POINTER(PACL_REVISION_INFORMATION, 4, 4);
991 static void test_pack_PACL_SIZE_INFORMATION(void)
993 /* PACL_SIZE_INFORMATION */
994 TEST_TYPE(PACL_SIZE_INFORMATION, 4, 4);
995 TEST_TYPE_POINTER(PACL_SIZE_INFORMATION, 12, 4);
998 static void test_pack_PCCH(void)
1000 /* PCCH */
1001 TEST_TYPE(PCCH, 4, 4);
1002 TEST_TYPE_POINTER(PCCH, 1, 1);
1005 static void test_pack_PCH(void)
1007 /* PCH */
1008 TEST_TYPE(PCH, 4, 4);
1009 TEST_TYPE_POINTER(PCH, 1, 1);
1012 static void test_pack_PCSTR(void)
1014 /* PCSTR */
1015 TEST_TYPE(PCSTR, 4, 4);
1016 TEST_TYPE_POINTER(PCSTR, 1, 1);
1019 static void test_pack_PCTSTR(void)
1021 /* PCTSTR */
1022 TEST_TYPE(PCTSTR, 4, 4);
1025 static void test_pack_PCWCH(void)
1027 /* PCWCH */
1028 TEST_TYPE(PCWCH, 4, 4);
1029 TEST_TYPE_POINTER(PCWCH, 2, 2);
1032 static void test_pack_PCWSTR(void)
1034 /* PCWSTR */
1035 TEST_TYPE(PCWSTR, 4, 4);
1036 TEST_TYPE_POINTER(PCWSTR, 2, 2);
1039 static void test_pack_PEXCEPTION_POINTERS(void)
1041 /* PEXCEPTION_POINTERS */
1042 TEST_TYPE(PEXCEPTION_POINTERS, 4, 4);
1043 TEST_TYPE_POINTER(PEXCEPTION_POINTERS, 8, 4);
1046 static void test_pack_PEXCEPTION_RECORD(void)
1048 /* PEXCEPTION_RECORD */
1049 TEST_TYPE(PEXCEPTION_RECORD, 4, 4);
1050 TEST_TYPE_POINTER(PEXCEPTION_RECORD, 80, 4);
1053 static void test_pack_PFLOATING_SAVE_AREA(void)
1055 /* PFLOATING_SAVE_AREA */
1056 TEST_TYPE(PFLOATING_SAVE_AREA, 4, 4);
1057 TEST_TYPE_POINTER(PFLOATING_SAVE_AREA, 112, 4);
1060 static void test_pack_PFPO_DATA(void)
1062 /* PFPO_DATA */
1063 TEST_TYPE(PFPO_DATA, 4, 4);
1064 TEST_TYPE_POINTER(PFPO_DATA, 16, 4);
1067 static void test_pack_PGENERIC_MAPPING(void)
1069 /* PGENERIC_MAPPING */
1070 TEST_TYPE(PGENERIC_MAPPING, 4, 4);
1071 TEST_TYPE_POINTER(PGENERIC_MAPPING, 16, 4);
1074 static void test_pack_PHANDLE(void)
1076 /* PHANDLE */
1077 TEST_TYPE(PHANDLE, 4, 4);
1078 TEST_TYPE_POINTER(PHANDLE, 4, 4);
1081 static void test_pack_PIMAGE_ARCHIVE_MEMBER_HEADER(void)
1083 /* PIMAGE_ARCHIVE_MEMBER_HEADER */
1084 TEST_TYPE(PIMAGE_ARCHIVE_MEMBER_HEADER, 4, 4);
1085 TEST_TYPE_POINTER(PIMAGE_ARCHIVE_MEMBER_HEADER, 60, 1);
1088 static void test_pack_PIMAGE_AUX_SYMBOL(void)
1090 /* PIMAGE_AUX_SYMBOL */
1091 TEST_TYPE(PIMAGE_AUX_SYMBOL, 4, 4);
1094 static void test_pack_PIMAGE_BASE_RELOCATION(void)
1096 /* PIMAGE_BASE_RELOCATION */
1097 TEST_TYPE(PIMAGE_BASE_RELOCATION, 4, 4);
1098 TEST_TYPE_POINTER(PIMAGE_BASE_RELOCATION, 8, 4);
1101 static void test_pack_PIMAGE_BOUND_FORWARDER_REF(void)
1103 /* PIMAGE_BOUND_FORWARDER_REF */
1104 TEST_TYPE(PIMAGE_BOUND_FORWARDER_REF, 4, 4);
1105 TEST_TYPE_POINTER(PIMAGE_BOUND_FORWARDER_REF, 8, 4);
1108 static void test_pack_PIMAGE_BOUND_IMPORT_DESCRIPTOR(void)
1110 /* PIMAGE_BOUND_IMPORT_DESCRIPTOR */
1111 TEST_TYPE(PIMAGE_BOUND_IMPORT_DESCRIPTOR, 4, 4);
1112 TEST_TYPE_POINTER(PIMAGE_BOUND_IMPORT_DESCRIPTOR, 8, 4);
1115 static void test_pack_PIMAGE_COFF_SYMBOLS_HEADER(void)
1117 /* PIMAGE_COFF_SYMBOLS_HEADER */
1118 TEST_TYPE(PIMAGE_COFF_SYMBOLS_HEADER, 4, 4);
1119 TEST_TYPE_POINTER(PIMAGE_COFF_SYMBOLS_HEADER, 32, 4);
1122 static void test_pack_PIMAGE_DATA_DIRECTORY(void)
1124 /* PIMAGE_DATA_DIRECTORY */
1125 TEST_TYPE(PIMAGE_DATA_DIRECTORY, 4, 4);
1126 TEST_TYPE_POINTER(PIMAGE_DATA_DIRECTORY, 8, 4);
1129 static void test_pack_PIMAGE_DEBUG_DIRECTORY(void)
1131 /* PIMAGE_DEBUG_DIRECTORY */
1132 TEST_TYPE(PIMAGE_DEBUG_DIRECTORY, 4, 4);
1133 TEST_TYPE_POINTER(PIMAGE_DEBUG_DIRECTORY, 28, 4);
1136 static void test_pack_PIMAGE_DEBUG_MISC(void)
1138 /* PIMAGE_DEBUG_MISC */
1139 TEST_TYPE(PIMAGE_DEBUG_MISC, 4, 4);
1140 TEST_TYPE_POINTER(PIMAGE_DEBUG_MISC, 16, 4);
1143 static void test_pack_PIMAGE_DOS_HEADER(void)
1145 /* PIMAGE_DOS_HEADER */
1146 TEST_TYPE(PIMAGE_DOS_HEADER, 4, 4);
1147 TEST_TYPE_POINTER(PIMAGE_DOS_HEADER, 64, 2);
1150 static void test_pack_PIMAGE_EXPORT_DIRECTORY(void)
1152 /* PIMAGE_EXPORT_DIRECTORY */
1153 TEST_TYPE(PIMAGE_EXPORT_DIRECTORY, 4, 4);
1154 TEST_TYPE_POINTER(PIMAGE_EXPORT_DIRECTORY, 40, 4);
1157 static void test_pack_PIMAGE_FILE_HEADER(void)
1159 /* PIMAGE_FILE_HEADER */
1160 TEST_TYPE(PIMAGE_FILE_HEADER, 4, 4);
1161 TEST_TYPE_POINTER(PIMAGE_FILE_HEADER, 20, 4);
1164 static void test_pack_PIMAGE_FUNCTION_ENTRY(void)
1166 /* PIMAGE_FUNCTION_ENTRY */
1167 TEST_TYPE(PIMAGE_FUNCTION_ENTRY, 4, 4);
1168 TEST_TYPE_POINTER(PIMAGE_FUNCTION_ENTRY, 12, 4);
1171 static void test_pack_PIMAGE_IMPORT_BY_NAME(void)
1173 /* PIMAGE_IMPORT_BY_NAME */
1174 TEST_TYPE(PIMAGE_IMPORT_BY_NAME, 4, 4);
1175 TEST_TYPE_POINTER(PIMAGE_IMPORT_BY_NAME, 4, 2);
1178 static void test_pack_PIMAGE_IMPORT_DESCRIPTOR(void)
1180 /* PIMAGE_IMPORT_DESCRIPTOR */
1181 TEST_TYPE(PIMAGE_IMPORT_DESCRIPTOR, 4, 4);
1184 static void test_pack_PIMAGE_LINENUMBER(void)
1186 /* PIMAGE_LINENUMBER */
1187 TEST_TYPE(PIMAGE_LINENUMBER, 4, 4);
1190 static void test_pack_PIMAGE_LOAD_CONFIG_DIRECTORY(void)
1192 /* PIMAGE_LOAD_CONFIG_DIRECTORY */
1193 TEST_TYPE(PIMAGE_LOAD_CONFIG_DIRECTORY, 4, 4);
1194 TEST_TYPE_POINTER(PIMAGE_LOAD_CONFIG_DIRECTORY, 72, 4);
1197 static void test_pack_PIMAGE_NT_HEADERS(void)
1199 /* PIMAGE_NT_HEADERS */
1200 TEST_TYPE(PIMAGE_NT_HEADERS, 4, 4);
1203 static void test_pack_PIMAGE_OPTIONAL_HEADER(void)
1205 /* PIMAGE_OPTIONAL_HEADER */
1206 TEST_TYPE(PIMAGE_OPTIONAL_HEADER, 4, 4);
1209 static void test_pack_PIMAGE_OS2_HEADER(void)
1211 /* PIMAGE_OS2_HEADER */
1212 TEST_TYPE(PIMAGE_OS2_HEADER, 4, 4);
1213 TEST_TYPE_POINTER(PIMAGE_OS2_HEADER, 64, 2);
1216 static void test_pack_PIMAGE_RELOCATION(void)
1218 /* PIMAGE_RELOCATION */
1219 TEST_TYPE(PIMAGE_RELOCATION, 4, 4);
1222 static void test_pack_PIMAGE_RESOURCE_DATA_ENTRY(void)
1224 /* PIMAGE_RESOURCE_DATA_ENTRY */
1225 TEST_TYPE(PIMAGE_RESOURCE_DATA_ENTRY, 4, 4);
1226 TEST_TYPE_POINTER(PIMAGE_RESOURCE_DATA_ENTRY, 16, 4);
1229 static void test_pack_PIMAGE_RESOURCE_DIRECTORY(void)
1231 /* PIMAGE_RESOURCE_DIRECTORY */
1232 TEST_TYPE(PIMAGE_RESOURCE_DIRECTORY, 4, 4);
1233 TEST_TYPE_POINTER(PIMAGE_RESOURCE_DIRECTORY, 16, 4);
1236 static void test_pack_PIMAGE_RESOURCE_DIRECTORY_ENTRY(void)
1238 /* PIMAGE_RESOURCE_DIRECTORY_ENTRY */
1239 TEST_TYPE(PIMAGE_RESOURCE_DIRECTORY_ENTRY, 4, 4);
1242 static void test_pack_PIMAGE_RESOURCE_DIRECTORY_STRING(void)
1244 /* PIMAGE_RESOURCE_DIRECTORY_STRING */
1245 TEST_TYPE(PIMAGE_RESOURCE_DIRECTORY_STRING, 4, 4);
1246 TEST_TYPE_POINTER(PIMAGE_RESOURCE_DIRECTORY_STRING, 4, 2);
1249 static void test_pack_PIMAGE_RESOURCE_DIR_STRING_U(void)
1251 /* PIMAGE_RESOURCE_DIR_STRING_U */
1252 TEST_TYPE(PIMAGE_RESOURCE_DIR_STRING_U, 4, 4);
1253 TEST_TYPE_POINTER(PIMAGE_RESOURCE_DIR_STRING_U, 4, 2);
1256 static void test_pack_PIMAGE_SECTION_HEADER(void)
1258 /* PIMAGE_SECTION_HEADER */
1259 TEST_TYPE(PIMAGE_SECTION_HEADER, 4, 4);
1262 static void test_pack_PIMAGE_SEPARATE_DEBUG_HEADER(void)
1264 /* PIMAGE_SEPARATE_DEBUG_HEADER */
1265 TEST_TYPE(PIMAGE_SEPARATE_DEBUG_HEADER, 4, 4);
1266 TEST_TYPE_POINTER(PIMAGE_SEPARATE_DEBUG_HEADER, 48, 4);
1269 static void test_pack_PIMAGE_SYMBOL(void)
1271 /* PIMAGE_SYMBOL */
1272 TEST_TYPE(PIMAGE_SYMBOL, 4, 4);
1275 static void test_pack_PIMAGE_THUNK_DATA(void)
1277 /* PIMAGE_THUNK_DATA */
1278 TEST_TYPE(PIMAGE_THUNK_DATA, 4, 4);
1281 static void test_pack_PIMAGE_TLS_CALLBACK(void)
1283 /* PIMAGE_TLS_CALLBACK */
1284 TEST_TYPE(PIMAGE_TLS_CALLBACK, 4, 4);
1287 static void test_pack_PIMAGE_TLS_DIRECTORY(void)
1289 /* PIMAGE_TLS_DIRECTORY */
1290 TEST_TYPE(PIMAGE_TLS_DIRECTORY, 4, 4);
1293 static void test_pack_PIMAGE_VXD_HEADER(void)
1295 /* PIMAGE_VXD_HEADER */
1296 TEST_TYPE(PIMAGE_VXD_HEADER, 4, 4);
1297 TEST_TYPE_POINTER(PIMAGE_VXD_HEADER, 196, 2);
1300 static void test_pack_PIO_COUNTERS(void)
1302 /* PIO_COUNTERS */
1303 TEST_TYPE(PIO_COUNTERS, 4, 4);
1304 TEST_TYPE_POINTER(PIO_COUNTERS, 48, 8);
1307 static void test_pack_PISECURITY_DESCRIPTOR(void)
1309 /* PISECURITY_DESCRIPTOR */
1310 TEST_TYPE(PISECURITY_DESCRIPTOR, 4, 4);
1311 TEST_TYPE_POINTER(PISECURITY_DESCRIPTOR, 20, 4);
1314 static void test_pack_PISECURITY_DESCRIPTOR_RELATIVE(void)
1316 /* PISECURITY_DESCRIPTOR_RELATIVE */
1317 TEST_TYPE(PISECURITY_DESCRIPTOR_RELATIVE, 4, 4);
1318 TEST_TYPE_POINTER(PISECURITY_DESCRIPTOR_RELATIVE, 20, 4);
1321 static void test_pack_PISID(void)
1323 /* PISID */
1324 TEST_TYPE(PISID, 4, 4);
1325 TEST_TYPE_POINTER(PISID, 12, 4);
1328 static void test_pack_PLARGE_INTEGER(void)
1330 /* PLARGE_INTEGER */
1331 TEST_TYPE(PLARGE_INTEGER, 4, 4);
1334 static void test_pack_PLIST_ENTRY(void)
1336 /* PLIST_ENTRY */
1337 TEST_TYPE(PLIST_ENTRY, 4, 4);
1338 TEST_TYPE_POINTER(PLIST_ENTRY, 8, 4);
1341 static void test_pack_PLUID(void)
1343 /* PLUID */
1344 TEST_TYPE(PLUID, 4, 4);
1345 TEST_TYPE_POINTER(PLUID, 8, 4);
1348 static void test_pack_PLUID_AND_ATTRIBUTES(void)
1350 /* PLUID_AND_ATTRIBUTES */
1351 TEST_TYPE(PLUID_AND_ATTRIBUTES, 4, 4);
1352 TEST_TYPE_POINTER(PLUID_AND_ATTRIBUTES, 12, 4);
1355 static void test_pack_PMEMORY_BASIC_INFORMATION(void)
1357 /* PMEMORY_BASIC_INFORMATION */
1358 TEST_TYPE(PMEMORY_BASIC_INFORMATION, 4, 4);
1359 TEST_TYPE_POINTER(PMEMORY_BASIC_INFORMATION, 28, 4);
1362 static void test_pack_PMESSAGE_RESOURCE_BLOCK(void)
1364 /* PMESSAGE_RESOURCE_BLOCK */
1365 TEST_TYPE(PMESSAGE_RESOURCE_BLOCK, 4, 4);
1366 TEST_TYPE_POINTER(PMESSAGE_RESOURCE_BLOCK, 12, 4);
1369 static void test_pack_PMESSAGE_RESOURCE_DATA(void)
1371 /* PMESSAGE_RESOURCE_DATA */
1372 TEST_TYPE(PMESSAGE_RESOURCE_DATA, 4, 4);
1373 TEST_TYPE_POINTER(PMESSAGE_RESOURCE_DATA, 16, 4);
1376 static void test_pack_PMESSAGE_RESOURCE_ENTRY(void)
1378 /* PMESSAGE_RESOURCE_ENTRY */
1379 TEST_TYPE(PMESSAGE_RESOURCE_ENTRY, 4, 4);
1380 TEST_TYPE_POINTER(PMESSAGE_RESOURCE_ENTRY, 6, 2);
1383 static void test_pack_PNT_TIB(void)
1385 /* PNT_TIB */
1386 TEST_TYPE(PNT_TIB, 4, 4);
1389 static void test_pack_POBJECT_TYPE_LIST(void)
1391 /* POBJECT_TYPE_LIST */
1392 TEST_TYPE(POBJECT_TYPE_LIST, 4, 4);
1393 TEST_TYPE_POINTER(POBJECT_TYPE_LIST, 8, 4);
1396 static void test_pack_PPRIVILEGE_SET(void)
1398 /* PPRIVILEGE_SET */
1399 TEST_TYPE(PPRIVILEGE_SET, 4, 4);
1400 TEST_TYPE_POINTER(PPRIVILEGE_SET, 20, 4);
1403 static void test_pack_PRIVILEGE_SET(void)
1405 /* PRIVILEGE_SET (pack 4) */
1406 TEST_TYPE(PRIVILEGE_SET, 20, 4);
1407 TEST_FIELD(PRIVILEGE_SET, DWORD, PrivilegeCount, 0, 4, 4);
1408 TEST_FIELD(PRIVILEGE_SET, DWORD, Control, 4, 4, 4);
1409 TEST_FIELD(PRIVILEGE_SET, LUID_AND_ATTRIBUTES[ANYSIZE_ARRAY], Privilege, 8, 12, 4);
1412 static void test_pack_PRLIST_ENTRY(void)
1414 /* PRLIST_ENTRY */
1415 TEST_TYPE(PRLIST_ENTRY, 4, 4);
1416 TEST_TYPE_POINTER(PRLIST_ENTRY, 8, 4);
1419 static void test_pack_PRTL_CRITICAL_SECTION(void)
1421 /* PRTL_CRITICAL_SECTION */
1422 TEST_TYPE(PRTL_CRITICAL_SECTION, 4, 4);
1423 TEST_TYPE_POINTER(PRTL_CRITICAL_SECTION, 24, 4);
1426 static void test_pack_PRTL_CRITICAL_SECTION_DEBUG(void)
1428 /* PRTL_CRITICAL_SECTION_DEBUG */
1429 TEST_TYPE(PRTL_CRITICAL_SECTION_DEBUG, 4, 4);
1432 static void test_pack_PRTL_OSVERSIONINFOEXW(void)
1434 /* PRTL_OSVERSIONINFOEXW */
1435 TEST_TYPE(PRTL_OSVERSIONINFOEXW, 4, 4);
1436 TEST_TYPE_POINTER(PRTL_OSVERSIONINFOEXW, 284, 4);
1439 static void test_pack_PRTL_OSVERSIONINFOW(void)
1441 /* PRTL_OSVERSIONINFOW */
1442 TEST_TYPE(PRTL_OSVERSIONINFOW, 4, 4);
1443 TEST_TYPE_POINTER(PRTL_OSVERSIONINFOW, 276, 4);
1446 static void test_pack_PRTL_RESOURCE_DEBUG(void)
1448 /* PRTL_RESOURCE_DEBUG */
1449 TEST_TYPE(PRTL_RESOURCE_DEBUG, 4, 4);
1452 static void test_pack_PSECURITY_DESCRIPTOR(void)
1454 /* PSECURITY_DESCRIPTOR */
1455 TEST_TYPE(PSECURITY_DESCRIPTOR, 4, 4);
1458 static void test_pack_PSECURITY_QUALITY_OF_SERVICE(void)
1460 /* PSECURITY_QUALITY_OF_SERVICE */
1461 TEST_TYPE(PSECURITY_QUALITY_OF_SERVICE, 4, 4);
1464 static void test_pack_PSID(void)
1466 /* PSID */
1467 TEST_TYPE(PSID, 4, 4);
1470 static void test_pack_PSID_IDENTIFIER_AUTHORITY(void)
1472 /* PSID_IDENTIFIER_AUTHORITY */
1473 TEST_TYPE(PSID_IDENTIFIER_AUTHORITY, 4, 4);
1474 TEST_TYPE_POINTER(PSID_IDENTIFIER_AUTHORITY, 6, 1);
1477 static void test_pack_PSINGLE_LIST_ENTRY(void)
1479 /* PSINGLE_LIST_ENTRY */
1480 TEST_TYPE(PSINGLE_LIST_ENTRY, 4, 4);
1481 TEST_TYPE_POINTER(PSINGLE_LIST_ENTRY, 4, 4);
1484 static void test_pack_PSTR(void)
1486 /* PSTR */
1487 TEST_TYPE(PSTR, 4, 4);
1488 TEST_TYPE_POINTER(PSTR, 1, 1);
1491 static void test_pack_PSYSTEM_ALARM_ACE(void)
1493 /* PSYSTEM_ALARM_ACE */
1494 TEST_TYPE(PSYSTEM_ALARM_ACE, 4, 4);
1495 TEST_TYPE_POINTER(PSYSTEM_ALARM_ACE, 12, 4);
1498 static void test_pack_PSYSTEM_AUDIT_ACE(void)
1500 /* PSYSTEM_AUDIT_ACE */
1501 TEST_TYPE(PSYSTEM_AUDIT_ACE, 4, 4);
1502 TEST_TYPE_POINTER(PSYSTEM_AUDIT_ACE, 12, 4);
1505 static void test_pack_PTOKEN_GROUPS(void)
1507 /* PTOKEN_GROUPS */
1508 TEST_TYPE(PTOKEN_GROUPS, 4, 4);
1509 TEST_TYPE_POINTER(PTOKEN_GROUPS, 12, 4);
1512 static void test_pack_PTOKEN_PRIVILEGES(void)
1514 /* PTOKEN_PRIVILEGES */
1515 TEST_TYPE(PTOKEN_PRIVILEGES, 4, 4);
1516 TEST_TYPE_POINTER(PTOKEN_PRIVILEGES, 16, 4);
1519 static void test_pack_PTOKEN_USER(void)
1521 /* PTOKEN_USER */
1522 TEST_TYPE(PTOKEN_USER, 4, 4);
1523 TEST_TYPE_POINTER(PTOKEN_USER, 8, 4);
1526 static void test_pack_PTSTR(void)
1528 /* PTSTR */
1529 TEST_TYPE(PTSTR, 4, 4);
1532 static void test_pack_PULARGE_INTEGER(void)
1534 /* PULARGE_INTEGER */
1535 TEST_TYPE(PULARGE_INTEGER, 4, 4);
1538 static void test_pack_PVECTORED_EXCEPTION_HANDLER(void)
1540 /* PVECTORED_EXCEPTION_HANDLER */
1541 TEST_TYPE(PVECTORED_EXCEPTION_HANDLER, 4, 4);
1544 static void test_pack_PVOID(void)
1546 /* PVOID */
1547 TEST_TYPE(PVOID, 4, 4);
1550 static void test_pack_PWCH(void)
1552 /* PWCH */
1553 TEST_TYPE(PWCH, 4, 4);
1554 TEST_TYPE_POINTER(PWCH, 2, 2);
1557 static void test_pack_PWSTR(void)
1559 /* PWSTR */
1560 TEST_TYPE(PWSTR, 4, 4);
1561 TEST_TYPE_POINTER(PWSTR, 2, 2);
1564 static void test_pack_RTL_CRITICAL_SECTION(void)
1566 /* RTL_CRITICAL_SECTION (pack 4) */
1567 TEST_TYPE(RTL_CRITICAL_SECTION, 24, 4);
1568 TEST_FIELD(RTL_CRITICAL_SECTION, PRTL_CRITICAL_SECTION_DEBUG, DebugInfo, 0, 4, 4);
1569 TEST_FIELD(RTL_CRITICAL_SECTION, LONG, LockCount, 4, 4, 4);
1570 TEST_FIELD(RTL_CRITICAL_SECTION, LONG, RecursionCount, 8, 4, 4);
1571 TEST_FIELD(RTL_CRITICAL_SECTION, HANDLE, OwningThread, 12, 4, 4);
1572 TEST_FIELD(RTL_CRITICAL_SECTION, HANDLE, LockSemaphore, 16, 4, 4);
1573 TEST_FIELD(RTL_CRITICAL_SECTION, ULONG_PTR, SpinCount, 20, 4, 4);
1576 static void test_pack_RTL_CRITICAL_SECTION_DEBUG(void)
1578 /* RTL_CRITICAL_SECTION_DEBUG (pack 4) */
1579 TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, WORD, Type, 0, 2, 2);
1580 TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, WORD, CreatorBackTraceIndex, 2, 2, 2);
1581 TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, struct _RTL_CRITICAL_SECTION *, CriticalSection, 4, 4, 4);
1582 TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, LIST_ENTRY, ProcessLocksList, 8, 8, 4);
1583 TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, DWORD, EntryCount, 16, 4, 4);
1584 TEST_FIELD(RTL_CRITICAL_SECTION_DEBUG, DWORD, ContentionCount, 20, 4, 4);
1587 static void test_pack_RTL_OSVERSIONINFOEXW(void)
1589 /* RTL_OSVERSIONINFOEXW (pack 4) */
1590 TEST_TYPE(RTL_OSVERSIONINFOEXW, 284, 4);
1591 TEST_FIELD(RTL_OSVERSIONINFOEXW, DWORD, dwOSVersionInfoSize, 0, 4, 4);
1592 TEST_FIELD(RTL_OSVERSIONINFOEXW, DWORD, dwMajorVersion, 4, 4, 4);
1593 TEST_FIELD(RTL_OSVERSIONINFOEXW, DWORD, dwMinorVersion, 8, 4, 4);
1594 TEST_FIELD(RTL_OSVERSIONINFOEXW, DWORD, dwBuildNumber, 12, 4, 4);
1595 TEST_FIELD(RTL_OSVERSIONINFOEXW, DWORD, dwPlatformId, 16, 4, 4);
1596 TEST_FIELD(RTL_OSVERSIONINFOEXW, WCHAR[128], szCSDVersion, 20, 256, 2);
1597 TEST_FIELD(RTL_OSVERSIONINFOEXW, WORD, wServicePackMajor, 276, 2, 2);
1598 TEST_FIELD(RTL_OSVERSIONINFOEXW, WORD, wServicePackMinor, 278, 2, 2);
1599 TEST_FIELD(RTL_OSVERSIONINFOEXW, WORD, wSuiteMask, 280, 2, 2);
1600 TEST_FIELD(RTL_OSVERSIONINFOEXW, BYTE, wProductType, 282, 1, 1);
1601 TEST_FIELD(RTL_OSVERSIONINFOEXW, BYTE, wReserved, 283, 1, 1);
1604 static void test_pack_RTL_OSVERSIONINFOW(void)
1606 /* RTL_OSVERSIONINFOW (pack 4) */
1607 TEST_TYPE(RTL_OSVERSIONINFOW, 276, 4);
1608 TEST_FIELD(RTL_OSVERSIONINFOW, DWORD, dwOSVersionInfoSize, 0, 4, 4);
1609 TEST_FIELD(RTL_OSVERSIONINFOW, DWORD, dwMajorVersion, 4, 4, 4);
1610 TEST_FIELD(RTL_OSVERSIONINFOW, DWORD, dwMinorVersion, 8, 4, 4);
1611 TEST_FIELD(RTL_OSVERSIONINFOW, DWORD, dwBuildNumber, 12, 4, 4);
1612 TEST_FIELD(RTL_OSVERSIONINFOW, DWORD, dwPlatformId, 16, 4, 4);
1613 TEST_FIELD(RTL_OSVERSIONINFOW, WCHAR[128], szCSDVersion, 20, 256, 2);
1616 static void test_pack_RTL_RESOURCE_DEBUG(void)
1618 /* RTL_RESOURCE_DEBUG (pack 4) */
1619 TEST_FIELD(RTL_RESOURCE_DEBUG, WORD, Type, 0, 2, 2);
1620 TEST_FIELD(RTL_RESOURCE_DEBUG, WORD, CreatorBackTraceIndex, 2, 2, 2);
1621 TEST_FIELD(RTL_RESOURCE_DEBUG, struct _RTL_CRITICAL_SECTION *, CriticalSection, 4, 4, 4);
1622 TEST_FIELD(RTL_RESOURCE_DEBUG, LIST_ENTRY, ProcessLocksList, 8, 8, 4);
1623 TEST_FIELD(RTL_RESOURCE_DEBUG, DWORD, EntryCount, 16, 4, 4);
1624 TEST_FIELD(RTL_RESOURCE_DEBUG, DWORD, ContentionCount, 20, 4, 4);
1627 static void test_pack_SECURITY_CONTEXT_TRACKING_MODE(void)
1629 /* SECURITY_CONTEXT_TRACKING_MODE */
1630 TEST_TYPE(SECURITY_CONTEXT_TRACKING_MODE, 1, 1);
1633 static void test_pack_SECURITY_DESCRIPTOR(void)
1635 /* SECURITY_DESCRIPTOR (pack 4) */
1636 TEST_TYPE(SECURITY_DESCRIPTOR, 20, 4);
1637 TEST_FIELD(SECURITY_DESCRIPTOR, BYTE, Revision, 0, 1, 1);
1638 TEST_FIELD(SECURITY_DESCRIPTOR, BYTE, Sbz1, 1, 1, 1);
1639 TEST_FIELD(SECURITY_DESCRIPTOR, SECURITY_DESCRIPTOR_CONTROL, Control, 2, 2, 2);
1640 TEST_FIELD(SECURITY_DESCRIPTOR, PSID, Owner, 4, 4, 4);
1641 TEST_FIELD(SECURITY_DESCRIPTOR, PSID, Group, 8, 4, 4);
1642 TEST_FIELD(SECURITY_DESCRIPTOR, PACL, Sacl, 12, 4, 4);
1643 TEST_FIELD(SECURITY_DESCRIPTOR, PACL, Dacl, 16, 4, 4);
1646 static void test_pack_SECURITY_DESCRIPTOR_CONTROL(void)
1648 /* SECURITY_DESCRIPTOR_CONTROL */
1649 TEST_TYPE(SECURITY_DESCRIPTOR_CONTROL, 2, 2);
1650 TEST_TYPE_UNSIGNED(SECURITY_DESCRIPTOR_CONTROL);
1653 static void test_pack_SECURITY_DESCRIPTOR_RELATIVE(void)
1655 /* SECURITY_DESCRIPTOR_RELATIVE (pack 4) */
1656 TEST_TYPE(SECURITY_DESCRIPTOR_RELATIVE, 20, 4);
1657 TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, BYTE, Revision, 0, 1, 1);
1658 TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, BYTE, Sbz1, 1, 1, 1);
1659 TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, SECURITY_DESCRIPTOR_CONTROL, Control, 2, 2, 2);
1660 TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, DWORD, Owner, 4, 4, 4);
1661 TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, DWORD, Group, 8, 4, 4);
1662 TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, DWORD, Sacl, 12, 4, 4);
1663 TEST_FIELD(SECURITY_DESCRIPTOR_RELATIVE, DWORD, Dacl, 16, 4, 4);
1666 static void test_pack_SECURITY_INFORMATION(void)
1668 /* SECURITY_INFORMATION */
1669 TEST_TYPE(SECURITY_INFORMATION, 4, 4);
1670 TEST_TYPE_UNSIGNED(SECURITY_INFORMATION);
1673 static void test_pack_SECURITY_QUALITY_OF_SERVICE(void)
1675 /* SECURITY_QUALITY_OF_SERVICE (pack 4) */
1676 TEST_FIELD(SECURITY_QUALITY_OF_SERVICE, DWORD, Length, 0, 4, 4);
1679 static void test_pack_SHORT(void)
1681 /* SHORT */
1682 TEST_TYPE(SHORT, 2, 2);
1683 TEST_TYPE_SIGNED(SHORT);
1686 static void test_pack_SID(void)
1688 /* SID (pack 4) */
1689 TEST_TYPE(SID, 12, 4);
1690 TEST_FIELD(SID, BYTE, Revision, 0, 1, 1);
1691 TEST_FIELD(SID, BYTE, SubAuthorityCount, 1, 1, 1);
1692 TEST_FIELD(SID, SID_IDENTIFIER_AUTHORITY, IdentifierAuthority, 2, 6, 1);
1693 TEST_FIELD(SID, DWORD[1], SubAuthority, 8, 4, 4);
1696 static void test_pack_SID_AND_ATTRIBUTES(void)
1698 /* SID_AND_ATTRIBUTES (pack 4) */
1699 TEST_TYPE(SID_AND_ATTRIBUTES, 8, 4);
1700 TEST_FIELD(SID_AND_ATTRIBUTES, PSID, Sid, 0, 4, 4);
1701 TEST_FIELD(SID_AND_ATTRIBUTES, DWORD, Attributes, 4, 4, 4);
1704 static void test_pack_SID_IDENTIFIER_AUTHORITY(void)
1706 /* SID_IDENTIFIER_AUTHORITY (pack 4) */
1707 TEST_TYPE(SID_IDENTIFIER_AUTHORITY, 6, 1);
1708 TEST_FIELD(SID_IDENTIFIER_AUTHORITY, BYTE[6], Value, 0, 6, 1);
1711 static void test_pack_SINGLE_LIST_ENTRY(void)
1713 /* SINGLE_LIST_ENTRY (pack 4) */
1714 TEST_TYPE(SINGLE_LIST_ENTRY, 4, 4);
1715 TEST_FIELD(SINGLE_LIST_ENTRY, struct _SINGLE_LIST_ENTRY *, Next, 0, 4, 4);
1718 static void test_pack_SYSTEM_ALARM_ACE(void)
1720 /* SYSTEM_ALARM_ACE (pack 4) */
1721 TEST_TYPE(SYSTEM_ALARM_ACE, 12, 4);
1722 TEST_FIELD(SYSTEM_ALARM_ACE, ACE_HEADER, Header, 0, 4, 2);
1723 TEST_FIELD(SYSTEM_ALARM_ACE, DWORD, Mask, 4, 4, 4);
1724 TEST_FIELD(SYSTEM_ALARM_ACE, DWORD, SidStart, 8, 4, 4);
1727 static void test_pack_SYSTEM_AUDIT_ACE(void)
1729 /* SYSTEM_AUDIT_ACE (pack 4) */
1730 TEST_TYPE(SYSTEM_AUDIT_ACE, 12, 4);
1731 TEST_FIELD(SYSTEM_AUDIT_ACE, ACE_HEADER, Header, 0, 4, 2);
1732 TEST_FIELD(SYSTEM_AUDIT_ACE, DWORD, Mask, 4, 4, 4);
1733 TEST_FIELD(SYSTEM_AUDIT_ACE, DWORD, SidStart, 8, 4, 4);
1736 static void test_pack_TCHAR(void)
1738 /* TCHAR */
1739 TEST_TYPE(TCHAR, 1, 1);
1742 static void test_pack_TOKEN_DEFAULT_DACL(void)
1744 /* TOKEN_DEFAULT_DACL (pack 4) */
1745 TEST_TYPE(TOKEN_DEFAULT_DACL, 4, 4);
1746 TEST_FIELD(TOKEN_DEFAULT_DACL, PACL, DefaultDacl, 0, 4, 4);
1749 static void test_pack_TOKEN_GROUPS(void)
1751 /* TOKEN_GROUPS (pack 4) */
1752 TEST_TYPE(TOKEN_GROUPS, 12, 4);
1753 TEST_FIELD(TOKEN_GROUPS, DWORD, GroupCount, 0, 4, 4);
1754 TEST_FIELD(TOKEN_GROUPS, SID_AND_ATTRIBUTES[ANYSIZE_ARRAY], Groups, 4, 8, 4);
1757 static void test_pack_TOKEN_OWNER(void)
1759 /* TOKEN_OWNER (pack 4) */
1760 TEST_TYPE(TOKEN_OWNER, 4, 4);
1761 TEST_FIELD(TOKEN_OWNER, PSID, Owner, 0, 4, 4);
1764 static void test_pack_TOKEN_PRIMARY_GROUP(void)
1766 /* TOKEN_PRIMARY_GROUP (pack 4) */
1767 TEST_TYPE(TOKEN_PRIMARY_GROUP, 4, 4);
1768 TEST_FIELD(TOKEN_PRIMARY_GROUP, PSID, PrimaryGroup, 0, 4, 4);
1771 static void test_pack_TOKEN_PRIVILEGES(void)
1773 /* TOKEN_PRIVILEGES (pack 4) */
1774 TEST_TYPE(TOKEN_PRIVILEGES, 16, 4);
1775 TEST_FIELD(TOKEN_PRIVILEGES, DWORD, PrivilegeCount, 0, 4, 4);
1776 TEST_FIELD(TOKEN_PRIVILEGES, LUID_AND_ATTRIBUTES[ANYSIZE_ARRAY], Privileges, 4, 12, 4);
1779 static void test_pack_TOKEN_SOURCE(void)
1781 /* TOKEN_SOURCE (pack 4) */
1782 TEST_TYPE(TOKEN_SOURCE, 16, 4);
1783 TEST_FIELD(TOKEN_SOURCE, char[TOKEN_SOURCE_LENGTH], SourceName, 0, 8, 1);
1784 TEST_FIELD(TOKEN_SOURCE, LUID, SourceIdentifier, 8, 8, 4);
1787 static void test_pack_TOKEN_STATISTICS(void)
1789 /* TOKEN_STATISTICS (pack 4) */
1790 TEST_FIELD(TOKEN_STATISTICS, LUID, TokenId, 0, 8, 4);
1791 TEST_FIELD(TOKEN_STATISTICS, LUID, AuthenticationId, 8, 8, 4);
1792 TEST_FIELD(TOKEN_STATISTICS, LARGE_INTEGER, ExpirationTime, 16, 8, 4);
1795 static void test_pack_TOKEN_USER(void)
1797 /* TOKEN_USER (pack 4) */
1798 TEST_TYPE(TOKEN_USER, 8, 4);
1799 TEST_FIELD(TOKEN_USER, SID_AND_ATTRIBUTES, User, 0, 8, 4);
1802 static void test_pack_ULARGE_INTEGER(void)
1804 /* ULARGE_INTEGER (pack 4) */
1807 static void test_pack_ULONGLONG(void)
1809 /* ULONGLONG */
1810 TEST_TYPE(ULONGLONG, 8, 8);
1811 TEST_TYPE_UNSIGNED(ULONGLONG);
1814 static void test_pack_WAITORTIMERCALLBACKFUNC(void)
1816 /* WAITORTIMERCALLBACKFUNC */
1817 TEST_TYPE(WAITORTIMERCALLBACKFUNC, 4, 4);
1820 static void test_pack_WCHAR(void)
1822 /* WCHAR */
1823 TEST_TYPE(WCHAR, 2, 2);
1824 TEST_TYPE_UNSIGNED(WCHAR);
1827 static void test_pack_ATOM(void)
1829 /* ATOM */
1830 TEST_TYPE(ATOM, 2, 2);
1831 TEST_TYPE_UNSIGNED(ATOM);
1834 static void test_pack_BOOL(void)
1836 /* BOOL */
1837 TEST_TYPE(BOOL, 4, 4);
1838 TEST_TYPE_SIGNED(BOOL);
1841 static void test_pack_BYTE(void)
1843 /* BYTE */
1844 TEST_TYPE(BYTE, 1, 1);
1845 TEST_TYPE_UNSIGNED(BYTE);
1848 static void test_pack_COLORREF(void)
1850 /* COLORREF */
1851 TEST_TYPE(COLORREF, 4, 4);
1852 TEST_TYPE_UNSIGNED(COLORREF);
1855 static void test_pack_DWORD(void)
1857 /* DWORD */
1858 TEST_TYPE(DWORD, 4, 4);
1859 TEST_TYPE_UNSIGNED(DWORD);
1862 static void test_pack_FARPROC(void)
1864 /* FARPROC */
1865 TEST_TYPE(FARPROC, 4, 4);
1868 static void test_pack_FLOAT(void)
1870 /* FLOAT */
1871 TEST_TYPE(FLOAT, 4, 4);
1874 static void test_pack_GLOBALHANDLE(void)
1876 /* GLOBALHANDLE */
1877 TEST_TYPE(GLOBALHANDLE, 4, 4);
1880 static void test_pack_HCURSOR(void)
1882 /* HCURSOR */
1883 TEST_TYPE(HCURSOR, 4, 4);
1884 TEST_TYPE_UNSIGNED(HCURSOR);
1887 static void test_pack_HFILE(void)
1889 /* HFILE */
1890 TEST_TYPE(HFILE, 4, 4);
1891 TEST_TYPE_SIGNED(HFILE);
1894 static void test_pack_HGDIOBJ(void)
1896 /* HGDIOBJ */
1897 TEST_TYPE(HGDIOBJ, 4, 4);
1900 static void test_pack_HGLOBAL(void)
1902 /* HGLOBAL */
1903 TEST_TYPE(HGLOBAL, 4, 4);
1906 static void test_pack_HLOCAL(void)
1908 /* HLOCAL */
1909 TEST_TYPE(HLOCAL, 4, 4);
1912 static void test_pack_HMODULE(void)
1914 /* HMODULE */
1915 TEST_TYPE(HMODULE, 4, 4);
1916 TEST_TYPE_UNSIGNED(HMODULE);
1919 static void test_pack_INT(void)
1921 /* INT */
1922 TEST_TYPE(INT, 4, 4);
1923 TEST_TYPE_SIGNED(INT);
1926 static void test_pack_LOCALHANDLE(void)
1928 /* LOCALHANDLE */
1929 TEST_TYPE(LOCALHANDLE, 4, 4);
1932 static void test_pack_LPARAM(void)
1934 /* LPARAM */
1935 TEST_TYPE(LPARAM, 4, 4);
1938 static void test_pack_LPCRECT(void)
1940 /* LPCRECT */
1941 TEST_TYPE(LPCRECT, 4, 4);
1942 TEST_TYPE_POINTER(LPCRECT, 16, 4);
1945 static void test_pack_LPCRECTL(void)
1947 /* LPCRECTL */
1948 TEST_TYPE(LPCRECTL, 4, 4);
1949 TEST_TYPE_POINTER(LPCRECTL, 16, 4);
1952 static void test_pack_LPCVOID(void)
1954 /* LPCVOID */
1955 TEST_TYPE(LPCVOID, 4, 4);
1958 static void test_pack_LPPOINT(void)
1960 /* LPPOINT */
1961 TEST_TYPE(LPPOINT, 4, 4);
1962 TEST_TYPE_POINTER(LPPOINT, 8, 4);
1965 static void test_pack_LPRECT(void)
1967 /* LPRECT */
1968 TEST_TYPE(LPRECT, 4, 4);
1969 TEST_TYPE_POINTER(LPRECT, 16, 4);
1972 static void test_pack_LPRECTL(void)
1974 /* LPRECTL */
1975 TEST_TYPE(LPRECTL, 4, 4);
1976 TEST_TYPE_POINTER(LPRECTL, 16, 4);
1979 static void test_pack_LPSIZE(void)
1981 /* LPSIZE */
1982 TEST_TYPE(LPSIZE, 4, 4);
1983 TEST_TYPE_POINTER(LPSIZE, 8, 4);
1986 static void test_pack_LRESULT(void)
1988 /* LRESULT */
1989 TEST_TYPE(LRESULT, 4, 4);
1992 static void test_pack_POINT(void)
1994 /* POINT (pack 4) */
1995 TEST_TYPE(POINT, 8, 4);
1996 TEST_FIELD(POINT, LONG, x, 0, 4, 4);
1997 TEST_FIELD(POINT, LONG, y, 4, 4, 4);
2000 static void test_pack_POINTL(void)
2002 /* POINTL (pack 4) */
2003 TEST_TYPE(POINTL, 8, 4);
2004 TEST_FIELD(POINTL, LONG, x, 0, 4, 4);
2005 TEST_FIELD(POINTL, LONG, y, 4, 4, 4);
2008 static void test_pack_PPOINT(void)
2010 /* PPOINT */
2011 TEST_TYPE(PPOINT, 4, 4);
2012 TEST_TYPE_POINTER(PPOINT, 8, 4);
2015 static void test_pack_PPOINTL(void)
2017 /* PPOINTL */
2018 TEST_TYPE(PPOINTL, 4, 4);
2019 TEST_TYPE_POINTER(PPOINTL, 8, 4);
2022 static void test_pack_PRECT(void)
2024 /* PRECT */
2025 TEST_TYPE(PRECT, 4, 4);
2026 TEST_TYPE_POINTER(PRECT, 16, 4);
2029 static void test_pack_PRECTL(void)
2031 /* PRECTL */
2032 TEST_TYPE(PRECTL, 4, 4);
2033 TEST_TYPE_POINTER(PRECTL, 16, 4);
2036 static void test_pack_PROC(void)
2038 /* PROC */
2039 TEST_TYPE(PROC, 4, 4);
2042 static void test_pack_PSIZE(void)
2044 /* PSIZE */
2045 TEST_TYPE(PSIZE, 4, 4);
2046 TEST_TYPE_POINTER(PSIZE, 8, 4);
2049 static void test_pack_PSZ(void)
2051 /* PSZ */
2052 TEST_TYPE(PSZ, 4, 4);
2055 static void test_pack_RECT(void)
2057 /* RECT (pack 4) */
2058 TEST_TYPE(RECT, 16, 4);
2059 TEST_FIELD(RECT, LONG, left, 0, 4, 4);
2060 TEST_FIELD(RECT, LONG, top, 4, 4, 4);
2061 TEST_FIELD(RECT, LONG, right, 8, 4, 4);
2062 TEST_FIELD(RECT, LONG, bottom, 12, 4, 4);
2065 static void test_pack_RECTL(void)
2067 /* RECTL (pack 4) */
2068 TEST_TYPE(RECTL, 16, 4);
2069 TEST_FIELD(RECTL, LONG, left, 0, 4, 4);
2070 TEST_FIELD(RECTL, LONG, top, 4, 4, 4);
2071 TEST_FIELD(RECTL, LONG, right, 8, 4, 4);
2072 TEST_FIELD(RECTL, LONG, bottom, 12, 4, 4);
2075 static void test_pack_SIZE(void)
2077 /* SIZE (pack 4) */
2078 TEST_TYPE(SIZE, 8, 4);
2079 TEST_FIELD(SIZE, LONG, cx, 0, 4, 4);
2080 TEST_FIELD(SIZE, LONG, cy, 4, 4, 4);
2083 static void test_pack_SIZEL(void)
2085 /* SIZEL */
2086 TEST_TYPE(SIZEL, 8, 4);
2089 static void test_pack_UCHAR(void)
2091 /* UCHAR */
2092 TEST_TYPE(UCHAR, 1, 1);
2093 TEST_TYPE_UNSIGNED(UCHAR);
2096 static void test_pack_UINT(void)
2098 /* UINT */
2099 TEST_TYPE(UINT, 4, 4);
2100 TEST_TYPE_UNSIGNED(UINT);
2103 static void test_pack_ULONG(void)
2105 /* ULONG */
2106 TEST_TYPE(ULONG, 4, 4);
2107 TEST_TYPE_UNSIGNED(ULONG);
2110 static void test_pack_USHORT(void)
2112 /* USHORT */
2113 TEST_TYPE(USHORT, 2, 2);
2114 TEST_TYPE_UNSIGNED(USHORT);
2117 static void test_pack_WORD(void)
2119 /* WORD */
2120 TEST_TYPE(WORD, 2, 2);
2121 TEST_TYPE_UNSIGNED(WORD);
2124 static void test_pack_WPARAM(void)
2126 /* WPARAM */
2127 TEST_TYPE(WPARAM, 4, 4);
2130 static void test_pack(void)
2132 test_pack_ACCESS_ALLOWED_ACE();
2133 test_pack_ACCESS_DENIED_ACE();
2134 test_pack_ACCESS_MASK();
2135 test_pack_ACE_HEADER();
2136 test_pack_ACL();
2137 test_pack_ACL_REVISION_INFORMATION();
2138 test_pack_ACL_SIZE_INFORMATION();
2139 test_pack_ATOM();
2140 test_pack_BOOL();
2141 test_pack_BOOLEAN();
2142 test_pack_BYTE();
2143 test_pack_CCHAR();
2144 test_pack_CHAR();
2145 test_pack_COLORREF();
2146 test_pack_DWORD();
2147 test_pack_DWORD32();
2148 test_pack_DWORD64();
2149 test_pack_DWORDLONG();
2150 test_pack_DWORD_PTR();
2151 test_pack_EXCEPTION_POINTERS();
2152 test_pack_EXCEPTION_RECORD();
2153 test_pack_EXECUTION_STATE();
2154 test_pack_FARPROC();
2155 test_pack_FLOAT();
2156 test_pack_FLOATING_SAVE_AREA();
2157 test_pack_FPO_DATA();
2158 test_pack_GENERIC_MAPPING();
2159 test_pack_GLOBALHANDLE();
2160 test_pack_HALF_PTR();
2161 test_pack_HANDLE();
2162 test_pack_HCURSOR();
2163 test_pack_HFILE();
2164 test_pack_HGDIOBJ();
2165 test_pack_HGLOBAL();
2166 test_pack_HLOCAL();
2167 test_pack_HMODULE();
2168 test_pack_HRESULT();
2169 test_pack_IMAGE_ARCHIVE_MEMBER_HEADER();
2170 test_pack_IMAGE_AUX_SYMBOL();
2171 test_pack_IMAGE_BASE_RELOCATION();
2172 test_pack_IMAGE_BOUND_FORWARDER_REF();
2173 test_pack_IMAGE_BOUND_IMPORT_DESCRIPTOR();
2174 test_pack_IMAGE_COFF_SYMBOLS_HEADER();
2175 test_pack_IMAGE_DATA_DIRECTORY();
2176 test_pack_IMAGE_DEBUG_DIRECTORY();
2177 test_pack_IMAGE_DEBUG_MISC();
2178 test_pack_IMAGE_DOS_HEADER();
2179 test_pack_IMAGE_EXPORT_DIRECTORY();
2180 test_pack_IMAGE_FILE_HEADER();
2181 test_pack_IMAGE_FUNCTION_ENTRY();
2182 test_pack_IMAGE_IMPORT_BY_NAME();
2183 test_pack_IMAGE_IMPORT_DESCRIPTOR();
2184 test_pack_IMAGE_LINENUMBER();
2185 test_pack_IMAGE_LOAD_CONFIG_DIRECTORY();
2186 test_pack_IMAGE_NT_HEADERS();
2187 test_pack_IMAGE_OS2_HEADER();
2188 test_pack_IMAGE_RELOCATION();
2189 test_pack_IMAGE_RESOURCE_DATA_ENTRY();
2190 test_pack_IMAGE_RESOURCE_DIRECTORY();
2191 test_pack_IMAGE_RESOURCE_DIRECTORY_ENTRY();
2192 test_pack_IMAGE_RESOURCE_DIRECTORY_STRING();
2193 test_pack_IMAGE_RESOURCE_DIR_STRING_U();
2194 test_pack_IMAGE_SECTION_HEADER();
2195 test_pack_IMAGE_SEPARATE_DEBUG_HEADER();
2196 test_pack_IMAGE_SYMBOL();
2197 test_pack_IMAGE_THUNK_DATA();
2198 test_pack_IMAGE_TLS_DIRECTORY();
2199 test_pack_IMAGE_VXD_HEADER();
2200 test_pack_INT();
2201 test_pack_INT16();
2202 test_pack_INT32();
2203 test_pack_INT64();
2204 test_pack_INT8();
2205 test_pack_INT_PTR();
2206 test_pack_IO_COUNTERS();
2207 test_pack_LANGID();
2208 test_pack_LARGE_INTEGER();
2209 test_pack_LCID();
2210 test_pack_LIST_ENTRY();
2211 test_pack_LOCALHANDLE();
2212 test_pack_LONG();
2213 test_pack_LONG32();
2214 test_pack_LONG64();
2215 test_pack_LONGLONG();
2216 test_pack_LONG_PTR();
2217 test_pack_LPARAM();
2218 test_pack_LPCRECT();
2219 test_pack_LPCRECTL();
2220 test_pack_LPCVOID();
2221 test_pack_LPPOINT();
2222 test_pack_LPRECT();
2223 test_pack_LPRECTL();
2224 test_pack_LPSIZE();
2225 test_pack_LRESULT();
2226 test_pack_LUID();
2227 test_pack_LUID_AND_ATTRIBUTES();
2228 test_pack_MEMORY_BASIC_INFORMATION();
2229 test_pack_MESSAGE_RESOURCE_BLOCK();
2230 test_pack_MESSAGE_RESOURCE_DATA();
2231 test_pack_MESSAGE_RESOURCE_ENTRY();
2232 test_pack_NT_TIB();
2233 test_pack_OBJECT_TYPE_LIST();
2234 test_pack_PACCESS_ALLOWED_ACE();
2235 test_pack_PACCESS_DENIED_ACE();
2236 test_pack_PACCESS_TOKEN();
2237 test_pack_PACE_HEADER();
2238 test_pack_PACL();
2239 test_pack_PACL_REVISION_INFORMATION();
2240 test_pack_PACL_SIZE_INFORMATION();
2241 test_pack_PCCH();
2242 test_pack_PCH();
2243 test_pack_PCSTR();
2244 test_pack_PCTSTR();
2245 test_pack_PCWCH();
2246 test_pack_PCWSTR();
2247 test_pack_PEXCEPTION_POINTERS();
2248 test_pack_PEXCEPTION_RECORD();
2249 test_pack_PFLOATING_SAVE_AREA();
2250 test_pack_PFPO_DATA();
2251 test_pack_PGENERIC_MAPPING();
2252 test_pack_PHANDLE();
2253 test_pack_PIMAGE_ARCHIVE_MEMBER_HEADER();
2254 test_pack_PIMAGE_AUX_SYMBOL();
2255 test_pack_PIMAGE_BASE_RELOCATION();
2256 test_pack_PIMAGE_BOUND_FORWARDER_REF();
2257 test_pack_PIMAGE_BOUND_IMPORT_DESCRIPTOR();
2258 test_pack_PIMAGE_COFF_SYMBOLS_HEADER();
2259 test_pack_PIMAGE_DATA_DIRECTORY();
2260 test_pack_PIMAGE_DEBUG_DIRECTORY();
2261 test_pack_PIMAGE_DEBUG_MISC();
2262 test_pack_PIMAGE_DOS_HEADER();
2263 test_pack_PIMAGE_EXPORT_DIRECTORY();
2264 test_pack_PIMAGE_FILE_HEADER();
2265 test_pack_PIMAGE_FUNCTION_ENTRY();
2266 test_pack_PIMAGE_IMPORT_BY_NAME();
2267 test_pack_PIMAGE_IMPORT_DESCRIPTOR();
2268 test_pack_PIMAGE_LINENUMBER();
2269 test_pack_PIMAGE_LOAD_CONFIG_DIRECTORY();
2270 test_pack_PIMAGE_NT_HEADERS();
2271 test_pack_PIMAGE_OPTIONAL_HEADER();
2272 test_pack_PIMAGE_OS2_HEADER();
2273 test_pack_PIMAGE_RELOCATION();
2274 test_pack_PIMAGE_RESOURCE_DATA_ENTRY();
2275 test_pack_PIMAGE_RESOURCE_DIRECTORY();
2276 test_pack_PIMAGE_RESOURCE_DIRECTORY_ENTRY();
2277 test_pack_PIMAGE_RESOURCE_DIRECTORY_STRING();
2278 test_pack_PIMAGE_RESOURCE_DIR_STRING_U();
2279 test_pack_PIMAGE_SECTION_HEADER();
2280 test_pack_PIMAGE_SEPARATE_DEBUG_HEADER();
2281 test_pack_PIMAGE_SYMBOL();
2282 test_pack_PIMAGE_THUNK_DATA();
2283 test_pack_PIMAGE_TLS_CALLBACK();
2284 test_pack_PIMAGE_TLS_DIRECTORY();
2285 test_pack_PIMAGE_VXD_HEADER();
2286 test_pack_PIO_COUNTERS();
2287 test_pack_PISECURITY_DESCRIPTOR();
2288 test_pack_PISECURITY_DESCRIPTOR_RELATIVE();
2289 test_pack_PISID();
2290 test_pack_PLARGE_INTEGER();
2291 test_pack_PLIST_ENTRY();
2292 test_pack_PLUID();
2293 test_pack_PLUID_AND_ATTRIBUTES();
2294 test_pack_PMEMORY_BASIC_INFORMATION();
2295 test_pack_PMESSAGE_RESOURCE_BLOCK();
2296 test_pack_PMESSAGE_RESOURCE_DATA();
2297 test_pack_PMESSAGE_RESOURCE_ENTRY();
2298 test_pack_PNT_TIB();
2299 test_pack_POBJECT_TYPE_LIST();
2300 test_pack_POINT();
2301 test_pack_POINTL();
2302 test_pack_PPOINT();
2303 test_pack_PPOINTL();
2304 test_pack_PPRIVILEGE_SET();
2305 test_pack_PRECT();
2306 test_pack_PRECTL();
2307 test_pack_PRIVILEGE_SET();
2308 test_pack_PRLIST_ENTRY();
2309 test_pack_PROC();
2310 test_pack_PRTL_CRITICAL_SECTION();
2311 test_pack_PRTL_CRITICAL_SECTION_DEBUG();
2312 test_pack_PRTL_OSVERSIONINFOEXW();
2313 test_pack_PRTL_OSVERSIONINFOW();
2314 test_pack_PRTL_RESOURCE_DEBUG();
2315 test_pack_PSECURITY_DESCRIPTOR();
2316 test_pack_PSECURITY_QUALITY_OF_SERVICE();
2317 test_pack_PSID();
2318 test_pack_PSID_IDENTIFIER_AUTHORITY();
2319 test_pack_PSINGLE_LIST_ENTRY();
2320 test_pack_PSIZE();
2321 test_pack_PSTR();
2322 test_pack_PSYSTEM_ALARM_ACE();
2323 test_pack_PSYSTEM_AUDIT_ACE();
2324 test_pack_PSZ();
2325 test_pack_PTOKEN_GROUPS();
2326 test_pack_PTOKEN_PRIVILEGES();
2327 test_pack_PTOKEN_USER();
2328 test_pack_PTSTR();
2329 test_pack_PULARGE_INTEGER();
2330 test_pack_PVECTORED_EXCEPTION_HANDLER();
2331 test_pack_PVOID();
2332 test_pack_PWCH();
2333 test_pack_PWSTR();
2334 test_pack_RECT();
2335 test_pack_RECTL();
2336 test_pack_RTL_CRITICAL_SECTION();
2337 test_pack_RTL_CRITICAL_SECTION_DEBUG();
2338 test_pack_RTL_OSVERSIONINFOEXW();
2339 test_pack_RTL_OSVERSIONINFOW();
2340 test_pack_RTL_RESOURCE_DEBUG();
2341 test_pack_SECURITY_CONTEXT_TRACKING_MODE();
2342 test_pack_SECURITY_DESCRIPTOR();
2343 test_pack_SECURITY_DESCRIPTOR_CONTROL();
2344 test_pack_SECURITY_DESCRIPTOR_RELATIVE();
2345 test_pack_SECURITY_INFORMATION();
2346 test_pack_SECURITY_QUALITY_OF_SERVICE();
2347 test_pack_SHORT();
2348 test_pack_SID();
2349 test_pack_SID_AND_ATTRIBUTES();
2350 test_pack_SID_IDENTIFIER_AUTHORITY();
2351 test_pack_SINGLE_LIST_ENTRY();
2352 test_pack_SIZE();
2353 test_pack_SIZEL();
2354 test_pack_SIZE_T();
2355 test_pack_SSIZE_T();
2356 test_pack_SYSTEM_ALARM_ACE();
2357 test_pack_SYSTEM_AUDIT_ACE();
2358 test_pack_TCHAR();
2359 test_pack_TOKEN_DEFAULT_DACL();
2360 test_pack_TOKEN_GROUPS();
2361 test_pack_TOKEN_OWNER();
2362 test_pack_TOKEN_PRIMARY_GROUP();
2363 test_pack_TOKEN_PRIVILEGES();
2364 test_pack_TOKEN_SOURCE();
2365 test_pack_TOKEN_STATISTICS();
2366 test_pack_TOKEN_USER();
2367 test_pack_UCHAR();
2368 test_pack_UHALF_PTR();
2369 test_pack_UINT();
2370 test_pack_UINT16();
2371 test_pack_UINT32();
2372 test_pack_UINT64();
2373 test_pack_UINT8();
2374 test_pack_UINT_PTR();
2375 test_pack_ULARGE_INTEGER();
2376 test_pack_ULONG();
2377 test_pack_ULONG32();
2378 test_pack_ULONG64();
2379 test_pack_ULONGLONG();
2380 test_pack_ULONG_PTR();
2381 test_pack_USHORT();
2382 test_pack_WAITORTIMERCALLBACKFUNC();
2383 test_pack_WCHAR();
2384 test_pack_WORD();
2385 test_pack_WPARAM();
2388 START_TEST(generated)
2390 test_pack();