1 /* File generated automatically from tools/winapi/tests.dat; do not edit! */
2 /* This file can be copied, modified and distributed without restriction. */
5 * Unit tests for data structure packing
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 _TYPE_ALIGNMENT(type) __alignof(type)
32 #elif defined(__GNUC__)
33 # define _TYPE_ALIGNMENT(type) __alignof__(type)
36 * FIXME: May not be possible without a compiler extension
37 * (if type is not just a name that is, otherwise the normal
38 * TYPE_ALIGNMENT can be used)
42 #if defined(TYPE_ALIGNMENT) && defined(_MSC_VER) && _MSC_VER >= 800 && !defined(__cplusplus)
43 #pragma warning(disable:4116)
46 #if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT)
47 # define TYPE_ALIGNMENT _TYPE_ALIGNMENT
50 /***********************************************************************
54 #define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size);
57 # define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align);
59 # define TEST_TYPE_ALIGN(type, align)
62 #ifdef _TYPE_ALIGNMENT
63 # define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align);
64 # define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align);
66 # define TEST_TARGET_ALIGN(type, align)
67 # define TEST_FIELD_ALIGN(type, field, align)
70 #define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset);
72 #define TEST_TARGET_SIZE(type, size) TEST_TYPE_SIZE(*(type)0, size)
73 #define TEST_FIELD_SIZE(type, field, size) TEST_TYPE_SIZE((((type*)0)->field), size)
74 #define TEST_TYPE_SIGNED(type) C_ASSERT((type) -1 < 0);
75 #define TEST_TYPE_UNSIGNED(type) C_ASSERT((type) -1 > 0);
80 static void test_pack_DWORD32(void)
83 TEST_TYPE_SIZE (DWORD32, 4)
84 TEST_TYPE_ALIGN (DWORD32, 4)
85 TEST_TYPE_UNSIGNED(DWORD32)
88 static void test_pack_DWORD64(void)
91 TEST_TYPE_SIZE (DWORD64, 8)
92 TEST_TYPE_ALIGN (DWORD64, 8)
93 TEST_TYPE_UNSIGNED(DWORD64)
96 static void test_pack_DWORD_PTR(void)
99 TEST_TYPE_SIZE (DWORD_PTR, 8)
100 TEST_TYPE_ALIGN (DWORD_PTR, 8)
103 static void test_pack_HALF_PTR(void)
106 TEST_TYPE_SIZE (HALF_PTR, 4)
107 TEST_TYPE_ALIGN (HALF_PTR, 4)
108 TEST_TYPE_SIGNED(HALF_PTR)
111 static void test_pack_INT16(void)
114 TEST_TYPE_SIZE (INT16, 2)
115 TEST_TYPE_ALIGN (INT16, 2)
116 TEST_TYPE_SIGNED(INT16)
119 static void test_pack_INT32(void)
122 TEST_TYPE_SIZE (INT32, 4)
123 TEST_TYPE_ALIGN (INT32, 4)
124 TEST_TYPE_SIGNED(INT32)
127 static void test_pack_INT64(void)
130 TEST_TYPE_SIZE (INT64, 8)
131 TEST_TYPE_ALIGN (INT64, 8)
132 TEST_TYPE_SIGNED(INT64)
135 static void test_pack_INT8(void)
138 TEST_TYPE_SIZE (INT8, 1)
139 TEST_TYPE_ALIGN (INT8, 1)
140 TEST_TYPE_SIGNED(INT8)
143 static void test_pack_INT_PTR(void)
146 TEST_TYPE_SIZE (INT_PTR, 8)
147 TEST_TYPE_ALIGN (INT_PTR, 8)
148 TEST_TYPE_SIGNED(INT_PTR)
151 static void test_pack_LONG32(void)
154 TEST_TYPE_SIZE (LONG32, 4)
155 TEST_TYPE_ALIGN (LONG32, 4)
156 TEST_TYPE_SIGNED(LONG32)
159 static void test_pack_LONG64(void)
162 TEST_TYPE_SIZE (LONG64, 8)
163 TEST_TYPE_ALIGN (LONG64, 8)
164 TEST_TYPE_SIGNED(LONG64)
167 static void test_pack_LONG_PTR(void)
170 TEST_TYPE_SIZE (LONG_PTR, 8)
171 TEST_TYPE_ALIGN (LONG_PTR, 8)
172 TEST_TYPE_SIGNED(LONG_PTR)
175 static void test_pack_SIZE_T(void)
178 TEST_TYPE_SIZE (SIZE_T, 8)
179 TEST_TYPE_ALIGN (SIZE_T, 8)
182 static void test_pack_SSIZE_T(void)
185 TEST_TYPE_SIZE (SSIZE_T, 8)
186 TEST_TYPE_ALIGN (SSIZE_T, 8)
189 static void test_pack_UHALF_PTR(void)
192 TEST_TYPE_SIZE (UHALF_PTR, 4)
193 TEST_TYPE_ALIGN (UHALF_PTR, 4)
194 TEST_TYPE_UNSIGNED(UHALF_PTR)
197 static void test_pack_UINT16(void)
200 TEST_TYPE_SIZE (UINT16, 2)
201 TEST_TYPE_ALIGN (UINT16, 2)
202 TEST_TYPE_UNSIGNED(UINT16)
205 static void test_pack_UINT32(void)
208 TEST_TYPE_SIZE (UINT32, 4)
209 TEST_TYPE_ALIGN (UINT32, 4)
210 TEST_TYPE_UNSIGNED(UINT32)
213 static void test_pack_UINT64(void)
216 TEST_TYPE_SIZE (UINT64, 8)
217 TEST_TYPE_ALIGN (UINT64, 8)
218 TEST_TYPE_UNSIGNED(UINT64)
221 static void test_pack_UINT8(void)
224 TEST_TYPE_SIZE (UINT8, 1)
225 TEST_TYPE_ALIGN (UINT8, 1)
226 TEST_TYPE_UNSIGNED(UINT8)
229 static void test_pack_UINT_PTR(void)
232 TEST_TYPE_SIZE (UINT_PTR, 8)
233 TEST_TYPE_ALIGN (UINT_PTR, 8)
234 TEST_TYPE_UNSIGNED(UINT_PTR)
237 static void test_pack_ULONG32(void)
240 TEST_TYPE_SIZE (ULONG32, 4)
241 TEST_TYPE_ALIGN (ULONG32, 4)
242 TEST_TYPE_UNSIGNED(ULONG32)
245 static void test_pack_ULONG64(void)
248 TEST_TYPE_SIZE (ULONG64, 8)
249 TEST_TYPE_ALIGN (ULONG64, 8)
250 TEST_TYPE_UNSIGNED(ULONG64)
253 static void test_pack_ULONG_PTR(void)
256 TEST_TYPE_SIZE (ULONG_PTR, 8)
257 TEST_TYPE_ALIGN (ULONG_PTR, 8)
258 TEST_TYPE_UNSIGNED(ULONG_PTR)
261 static void test_pack_ACCESS_ALLOWED_ACE(void)
263 /* ACCESS_ALLOWED_ACE */
264 TEST_TYPE_SIZE (ACCESS_ALLOWED_ACE, 12)
265 TEST_TYPE_ALIGN (ACCESS_ALLOWED_ACE, 4)
266 TEST_FIELD_SIZE (ACCESS_ALLOWED_ACE, Header, 4)
267 TEST_FIELD_ALIGN (ACCESS_ALLOWED_ACE, Header, 2)
268 TEST_FIELD_OFFSET(ACCESS_ALLOWED_ACE, Header, 0)
269 TEST_FIELD_SIZE (ACCESS_ALLOWED_ACE, Mask, 4)
270 TEST_FIELD_ALIGN (ACCESS_ALLOWED_ACE, Mask, 4)
271 TEST_FIELD_OFFSET(ACCESS_ALLOWED_ACE, Mask, 4)
272 TEST_FIELD_SIZE (ACCESS_ALLOWED_ACE, SidStart, 4)
273 TEST_FIELD_ALIGN (ACCESS_ALLOWED_ACE, SidStart, 4)
274 TEST_FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart, 8)
277 static void test_pack_ACCESS_DENIED_ACE(void)
279 /* ACCESS_DENIED_ACE */
280 TEST_TYPE_SIZE (ACCESS_DENIED_ACE, 12)
281 TEST_TYPE_ALIGN (ACCESS_DENIED_ACE, 4)
282 TEST_FIELD_SIZE (ACCESS_DENIED_ACE, Header, 4)
283 TEST_FIELD_ALIGN (ACCESS_DENIED_ACE, Header, 2)
284 TEST_FIELD_OFFSET(ACCESS_DENIED_ACE, Header, 0)
285 TEST_FIELD_SIZE (ACCESS_DENIED_ACE, Mask, 4)
286 TEST_FIELD_ALIGN (ACCESS_DENIED_ACE, Mask, 4)
287 TEST_FIELD_OFFSET(ACCESS_DENIED_ACE, Mask, 4)
288 TEST_FIELD_SIZE (ACCESS_DENIED_ACE, SidStart, 4)
289 TEST_FIELD_ALIGN (ACCESS_DENIED_ACE, SidStart, 4)
290 TEST_FIELD_OFFSET(ACCESS_DENIED_ACE, SidStart, 8)
293 static void test_pack_ACCESS_MASK(void)
296 TEST_TYPE_SIZE (ACCESS_MASK, 4)
297 TEST_TYPE_ALIGN (ACCESS_MASK, 4)
298 TEST_TYPE_UNSIGNED(ACCESS_MASK)
301 static void test_pack_ACE_HEADER(void)
304 TEST_TYPE_SIZE (ACE_HEADER, 4)
305 TEST_TYPE_ALIGN (ACE_HEADER, 2)
306 TEST_FIELD_SIZE (ACE_HEADER, AceType, 1)
307 TEST_FIELD_ALIGN (ACE_HEADER, AceType, 1)
308 TEST_FIELD_OFFSET(ACE_HEADER, AceType, 0)
309 TEST_FIELD_SIZE (ACE_HEADER, AceFlags, 1)
310 TEST_FIELD_ALIGN (ACE_HEADER, AceFlags, 1)
311 TEST_FIELD_OFFSET(ACE_HEADER, AceFlags, 1)
312 TEST_FIELD_SIZE (ACE_HEADER, AceSize, 2)
313 TEST_FIELD_ALIGN (ACE_HEADER, AceSize, 2)
314 TEST_FIELD_OFFSET(ACE_HEADER, AceSize, 2)
317 static void test_pack_ACL(void)
320 TEST_TYPE_SIZE (ACL, 8)
321 TEST_TYPE_ALIGN (ACL, 2)
322 TEST_FIELD_SIZE (ACL, AclRevision, 1)
323 TEST_FIELD_ALIGN (ACL, AclRevision, 1)
324 TEST_FIELD_OFFSET(ACL, AclRevision, 0)
325 TEST_FIELD_SIZE (ACL, Sbz1, 1)
326 TEST_FIELD_ALIGN (ACL, Sbz1, 1)
327 TEST_FIELD_OFFSET(ACL, Sbz1, 1)
328 TEST_FIELD_SIZE (ACL, AclSize, 2)
329 TEST_FIELD_ALIGN (ACL, AclSize, 2)
330 TEST_FIELD_OFFSET(ACL, AclSize, 2)
331 TEST_FIELD_SIZE (ACL, AceCount, 2)
332 TEST_FIELD_ALIGN (ACL, AceCount, 2)
333 TEST_FIELD_OFFSET(ACL, AceCount, 4)
334 TEST_FIELD_SIZE (ACL, Sbz2, 2)
335 TEST_FIELD_ALIGN (ACL, Sbz2, 2)
336 TEST_FIELD_OFFSET(ACL, Sbz2, 6)
339 static void test_pack_ACL_REVISION_INFORMATION(void)
341 /* ACL_REVISION_INFORMATION */
342 TEST_TYPE_SIZE (ACL_REVISION_INFORMATION, 4)
343 TEST_TYPE_ALIGN (ACL_REVISION_INFORMATION, 4)
344 TEST_FIELD_SIZE (ACL_REVISION_INFORMATION, AclRevision, 4)
345 TEST_FIELD_ALIGN (ACL_REVISION_INFORMATION, AclRevision, 4)
346 TEST_FIELD_OFFSET(ACL_REVISION_INFORMATION, AclRevision, 0)
349 static void test_pack_ACL_SIZE_INFORMATION(void)
351 /* ACL_SIZE_INFORMATION */
352 TEST_TYPE_SIZE (ACL_SIZE_INFORMATION, 12)
353 TEST_TYPE_ALIGN (ACL_SIZE_INFORMATION, 4)
354 TEST_FIELD_SIZE (ACL_SIZE_INFORMATION, AceCount, 4)
355 TEST_FIELD_ALIGN (ACL_SIZE_INFORMATION, AceCount, 4)
356 TEST_FIELD_OFFSET(ACL_SIZE_INFORMATION, AceCount, 0)
357 TEST_FIELD_SIZE (ACL_SIZE_INFORMATION, AclBytesInUse, 4)
358 TEST_FIELD_ALIGN (ACL_SIZE_INFORMATION, AclBytesInUse, 4)
359 TEST_FIELD_OFFSET(ACL_SIZE_INFORMATION, AclBytesInUse, 4)
360 TEST_FIELD_SIZE (ACL_SIZE_INFORMATION, AclBytesFree, 4)
361 TEST_FIELD_ALIGN (ACL_SIZE_INFORMATION, AclBytesFree, 4)
362 TEST_FIELD_OFFSET(ACL_SIZE_INFORMATION, AclBytesFree, 8)
365 static void test_pack_BOOLEAN(void)
368 TEST_TYPE_SIZE (BOOLEAN, 1)
369 TEST_TYPE_ALIGN (BOOLEAN, 1)
370 TEST_TYPE_UNSIGNED(BOOLEAN)
373 static void test_pack_CCHAR(void)
376 TEST_TYPE_SIZE (CCHAR, 1)
377 TEST_TYPE_ALIGN (CCHAR, 1)
378 TEST_TYPE_SIGNED(CCHAR)
381 static void test_pack_CHAR(void)
384 TEST_TYPE_SIZE (CHAR, 1)
385 TEST_TYPE_ALIGN (CHAR, 1)
386 TEST_TYPE_SIGNED(CHAR)
389 static void test_pack_DWORDLONG(void)
392 TEST_TYPE_SIZE (DWORDLONG, 8)
393 TEST_TYPE_ALIGN (DWORDLONG, 8)
394 TEST_TYPE_UNSIGNED(DWORDLONG)
397 static void test_pack_EXCEPTION_POINTERS(void)
399 /* EXCEPTION_POINTERS */
400 TEST_TYPE_SIZE (EXCEPTION_POINTERS, 16)
401 TEST_TYPE_ALIGN (EXCEPTION_POINTERS, 8)
402 TEST_FIELD_SIZE (EXCEPTION_POINTERS, ExceptionRecord, 8)
403 TEST_FIELD_ALIGN (EXCEPTION_POINTERS, ExceptionRecord, 8)
404 TEST_FIELD_OFFSET(EXCEPTION_POINTERS, ExceptionRecord, 0)
405 TEST_FIELD_SIZE (EXCEPTION_POINTERS, ContextRecord, 8)
406 TEST_FIELD_ALIGN (EXCEPTION_POINTERS, ContextRecord, 8)
407 TEST_FIELD_OFFSET(EXCEPTION_POINTERS, ContextRecord, 8)
410 static void test_pack_EXCEPTION_RECORD(void)
412 /* EXCEPTION_RECORD */
413 TEST_TYPE_SIZE (EXCEPTION_RECORD, 152)
414 TEST_TYPE_ALIGN (EXCEPTION_RECORD, 8)
415 TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionCode, 4)
416 TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionCode, 4)
417 TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionCode, 0)
418 TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionFlags, 4)
419 TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionFlags, 4)
420 TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionFlags, 4)
421 TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionRecord, 8)
422 TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionRecord, 8)
423 TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionRecord, 8)
424 TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionAddress, 8)
425 TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionAddress, 8)
426 TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionAddress, 16)
427 TEST_FIELD_SIZE (EXCEPTION_RECORD, NumberParameters, 4)
428 TEST_FIELD_ALIGN (EXCEPTION_RECORD, NumberParameters, 4)
429 TEST_FIELD_OFFSET(EXCEPTION_RECORD, NumberParameters, 24)
430 TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionInformation, 120)
431 TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionInformation, 8)
432 TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionInformation, 32)
435 static void test_pack_EXECUTION_STATE(void)
437 /* EXECUTION_STATE */
438 TEST_TYPE_SIZE (EXECUTION_STATE, 4)
439 TEST_TYPE_ALIGN (EXECUTION_STATE, 4)
440 TEST_TYPE_UNSIGNED(EXECUTION_STATE)
443 static void test_pack_FLOATING_SAVE_AREA(void)
445 /* FLOATING_SAVE_AREA */
446 TEST_TYPE_SIZE (FLOATING_SAVE_AREA, 112)
447 TEST_TYPE_ALIGN (FLOATING_SAVE_AREA, 4)
448 TEST_FIELD_SIZE (FLOATING_SAVE_AREA, ControlWord, 4)
449 TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, ControlWord, 4)
450 TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, ControlWord, 0)
451 TEST_FIELD_SIZE (FLOATING_SAVE_AREA, StatusWord, 4)
452 TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, StatusWord, 4)
453 TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, StatusWord, 4)
454 TEST_FIELD_SIZE (FLOATING_SAVE_AREA, TagWord, 4)
455 TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, TagWord, 4)
456 TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, TagWord, 8)
457 TEST_FIELD_SIZE (FLOATING_SAVE_AREA, ErrorOffset, 4)
458 TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, ErrorOffset, 4)
459 TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, ErrorOffset, 12)
460 TEST_FIELD_SIZE (FLOATING_SAVE_AREA, ErrorSelector, 4)
461 TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, ErrorSelector, 4)
462 TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, ErrorSelector, 16)
463 TEST_FIELD_SIZE (FLOATING_SAVE_AREA, DataOffset, 4)
464 TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, DataOffset, 4)
465 TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, DataOffset, 20)
466 TEST_FIELD_SIZE (FLOATING_SAVE_AREA, DataSelector, 4)
467 TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, DataSelector, 4)
468 TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, DataSelector, 24)
469 TEST_FIELD_SIZE (FLOATING_SAVE_AREA, RegisterArea, 80)
470 TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, RegisterArea, 1)
471 TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, RegisterArea, 28)
472 TEST_FIELD_SIZE (FLOATING_SAVE_AREA, Cr0NpxState, 4)
473 TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, Cr0NpxState, 4)
474 TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, Cr0NpxState, 108)
477 static void test_pack_FPO_DATA(void)
480 TEST_TYPE_SIZE (FPO_DATA, 16)
481 TEST_TYPE_ALIGN (FPO_DATA, 4)
482 TEST_FIELD_SIZE (FPO_DATA, ulOffStart, 4)
483 TEST_FIELD_ALIGN (FPO_DATA, ulOffStart, 4)
484 TEST_FIELD_OFFSET(FPO_DATA, ulOffStart, 0)
485 TEST_FIELD_SIZE (FPO_DATA, cbProcSize, 4)
486 TEST_FIELD_ALIGN (FPO_DATA, cbProcSize, 4)
487 TEST_FIELD_OFFSET(FPO_DATA, cbProcSize, 4)
488 TEST_FIELD_SIZE (FPO_DATA, cdwLocals, 4)
489 TEST_FIELD_ALIGN (FPO_DATA, cdwLocals, 4)
490 TEST_FIELD_OFFSET(FPO_DATA, cdwLocals, 8)
491 TEST_FIELD_SIZE (FPO_DATA, cdwParams, 2)
492 TEST_FIELD_ALIGN (FPO_DATA, cdwParams, 2)
493 TEST_FIELD_OFFSET(FPO_DATA, cdwParams, 12)
496 static void test_pack_GENERIC_MAPPING(void)
498 /* GENERIC_MAPPING */
499 TEST_TYPE_SIZE (GENERIC_MAPPING, 16)
500 TEST_TYPE_ALIGN (GENERIC_MAPPING, 4)
501 TEST_FIELD_SIZE (GENERIC_MAPPING, GenericRead, 4)
502 TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericRead, 4)
503 TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericRead, 0)
504 TEST_FIELD_SIZE (GENERIC_MAPPING, GenericWrite, 4)
505 TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericWrite, 4)
506 TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericWrite, 4)
507 TEST_FIELD_SIZE (GENERIC_MAPPING, GenericExecute, 4)
508 TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericExecute, 4)
509 TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericExecute, 8)
510 TEST_FIELD_SIZE (GENERIC_MAPPING, GenericAll, 4)
511 TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericAll, 4)
512 TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericAll, 12)
515 static void test_pack_HANDLE(void)
518 TEST_TYPE_SIZE (HANDLE, 8)
519 TEST_TYPE_ALIGN (HANDLE, 8)
522 static void test_pack_HRESULT(void)
525 TEST_TYPE_SIZE (HRESULT, 4)
526 TEST_TYPE_ALIGN (HRESULT, 4)
529 static void test_pack_IMAGE_ARCHIVE_MEMBER_HEADER(void)
531 /* IMAGE_ARCHIVE_MEMBER_HEADER */
532 TEST_TYPE_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, 60)
533 TEST_TYPE_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, 1)
534 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Name, 16)
535 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Name, 1)
536 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Name, 0)
537 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Date, 12)
538 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Date, 1)
539 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Date, 16)
540 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, UserID, 6)
541 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, UserID, 1)
542 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, UserID, 28)
543 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, GroupID, 6)
544 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, GroupID, 1)
545 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, GroupID, 34)
546 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Mode, 8)
547 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Mode, 1)
548 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Mode, 40)
549 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Size, 10)
550 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Size, 1)
551 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Size, 48)
552 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, EndHeader, 2)
553 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, EndHeader, 1)
554 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, EndHeader, 58)
557 static void test_pack_IMAGE_AUX_SYMBOL(void)
559 /* IMAGE_AUX_SYMBOL (pack 2) */
562 static void test_pack_IMAGE_BASE_RELOCATION(void)
564 /* IMAGE_BASE_RELOCATION */
565 TEST_TYPE_SIZE (IMAGE_BASE_RELOCATION, 8)
566 TEST_TYPE_ALIGN (IMAGE_BASE_RELOCATION, 4)
567 TEST_FIELD_SIZE (IMAGE_BASE_RELOCATION, VirtualAddress, 4)
568 TEST_FIELD_ALIGN (IMAGE_BASE_RELOCATION, VirtualAddress, 4)
569 TEST_FIELD_OFFSET(IMAGE_BASE_RELOCATION, VirtualAddress, 0)
570 TEST_FIELD_SIZE (IMAGE_BASE_RELOCATION, SizeOfBlock, 4)
571 TEST_FIELD_ALIGN (IMAGE_BASE_RELOCATION, SizeOfBlock, 4)
572 TEST_FIELD_OFFSET(IMAGE_BASE_RELOCATION, SizeOfBlock, 4)
575 static void test_pack_IMAGE_BOUND_FORWARDER_REF(void)
577 /* IMAGE_BOUND_FORWARDER_REF */
578 TEST_TYPE_SIZE (IMAGE_BOUND_FORWARDER_REF, 8)
579 TEST_TYPE_ALIGN (IMAGE_BOUND_FORWARDER_REF, 4)
580 TEST_FIELD_SIZE (IMAGE_BOUND_FORWARDER_REF, TimeDateStamp, 4)
581 TEST_FIELD_ALIGN (IMAGE_BOUND_FORWARDER_REF, TimeDateStamp, 4)
582 TEST_FIELD_OFFSET(IMAGE_BOUND_FORWARDER_REF, TimeDateStamp, 0)
583 TEST_FIELD_SIZE (IMAGE_BOUND_FORWARDER_REF, OffsetModuleName, 2)
584 TEST_FIELD_ALIGN (IMAGE_BOUND_FORWARDER_REF, OffsetModuleName, 2)
585 TEST_FIELD_OFFSET(IMAGE_BOUND_FORWARDER_REF, OffsetModuleName, 4)
586 TEST_FIELD_SIZE (IMAGE_BOUND_FORWARDER_REF, Reserved, 2)
587 TEST_FIELD_ALIGN (IMAGE_BOUND_FORWARDER_REF, Reserved, 2)
588 TEST_FIELD_OFFSET(IMAGE_BOUND_FORWARDER_REF, Reserved, 6)
591 static void test_pack_IMAGE_BOUND_IMPORT_DESCRIPTOR(void)
593 /* IMAGE_BOUND_IMPORT_DESCRIPTOR */
594 TEST_TYPE_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, 8)
595 TEST_TYPE_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, 4)
596 TEST_FIELD_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, TimeDateStamp, 4)
597 TEST_FIELD_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, TimeDateStamp, 4)
598 TEST_FIELD_OFFSET(IMAGE_BOUND_IMPORT_DESCRIPTOR, TimeDateStamp, 0)
599 TEST_FIELD_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, OffsetModuleName, 2)
600 TEST_FIELD_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, OffsetModuleName, 2)
601 TEST_FIELD_OFFSET(IMAGE_BOUND_IMPORT_DESCRIPTOR, OffsetModuleName, 4)
602 TEST_FIELD_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, NumberOfModuleForwarderRefs, 2)
603 TEST_FIELD_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, NumberOfModuleForwarderRefs, 2)
604 TEST_FIELD_OFFSET(IMAGE_BOUND_IMPORT_DESCRIPTOR, NumberOfModuleForwarderRefs, 6)
607 static void test_pack_IMAGE_COFF_SYMBOLS_HEADER(void)
609 /* IMAGE_COFF_SYMBOLS_HEADER */
610 TEST_TYPE_SIZE (IMAGE_COFF_SYMBOLS_HEADER, 32)
611 TEST_TYPE_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, 4)
612 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, NumberOfSymbols, 4)
613 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, NumberOfSymbols, 4)
614 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, NumberOfSymbols, 0)
615 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstSymbol, 4)
616 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstSymbol, 4)
617 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstSymbol, 4)
618 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, NumberOfLinenumbers, 4)
619 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, NumberOfLinenumbers, 4)
620 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, NumberOfLinenumbers, 8)
621 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstLinenumber, 4)
622 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstLinenumber, 4)
623 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstLinenumber, 12)
624 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfCode, 4)
625 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfCode, 4)
626 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfCode, 16)
627 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfCode, 4)
628 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfCode, 4)
629 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfCode, 20)
630 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfData, 4)
631 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfData, 4)
632 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfData, 24)
633 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfData, 4)
634 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfData, 4)
635 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfData, 28)
638 static void test_pack_IMAGE_DATA_DIRECTORY(void)
640 /* IMAGE_DATA_DIRECTORY */
641 TEST_TYPE_SIZE (IMAGE_DATA_DIRECTORY, 8)
642 TEST_TYPE_ALIGN (IMAGE_DATA_DIRECTORY, 4)
643 TEST_FIELD_SIZE (IMAGE_DATA_DIRECTORY, VirtualAddress, 4)
644 TEST_FIELD_ALIGN (IMAGE_DATA_DIRECTORY, VirtualAddress, 4)
645 TEST_FIELD_OFFSET(IMAGE_DATA_DIRECTORY, VirtualAddress, 0)
646 TEST_FIELD_SIZE (IMAGE_DATA_DIRECTORY, Size, 4)
647 TEST_FIELD_ALIGN (IMAGE_DATA_DIRECTORY, Size, 4)
648 TEST_FIELD_OFFSET(IMAGE_DATA_DIRECTORY, Size, 4)
651 static void test_pack_IMAGE_DEBUG_DIRECTORY(void)
653 /* IMAGE_DEBUG_DIRECTORY */
654 TEST_TYPE_SIZE (IMAGE_DEBUG_DIRECTORY, 28)
655 TEST_TYPE_ALIGN (IMAGE_DEBUG_DIRECTORY, 4)
656 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, Characteristics, 4)
657 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, Characteristics, 4)
658 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, Characteristics, 0)
659 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, TimeDateStamp, 4)
660 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, TimeDateStamp, 4)
661 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, TimeDateStamp, 4)
662 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, MajorVersion, 2)
663 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, MajorVersion, 2)
664 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, MajorVersion, 8)
665 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, MinorVersion, 2)
666 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, MinorVersion, 2)
667 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, MinorVersion, 10)
668 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, Type, 4)
669 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, Type, 4)
670 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, Type, 12)
671 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, SizeOfData, 4)
672 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, SizeOfData, 4)
673 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, SizeOfData, 16)
674 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, AddressOfRawData, 4)
675 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, AddressOfRawData, 4)
676 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, AddressOfRawData, 20)
677 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, PointerToRawData, 4)
678 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, PointerToRawData, 4)
679 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, PointerToRawData, 24)
682 static void test_pack_IMAGE_DEBUG_MISC(void)
684 /* IMAGE_DEBUG_MISC */
685 TEST_TYPE_SIZE (IMAGE_DEBUG_MISC, 16)
686 TEST_TYPE_ALIGN (IMAGE_DEBUG_MISC, 4)
687 TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, DataType, 4)
688 TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, DataType, 4)
689 TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, DataType, 0)
690 TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Length, 4)
691 TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Length, 4)
692 TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Length, 4)
693 TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Unicode, 1)
694 TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Unicode, 1)
695 TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Unicode, 8)
696 TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Reserved, 3)
697 TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Reserved, 1)
698 TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Reserved, 9)
699 TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Data, 1)
700 TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Data, 1)
701 TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Data, 12)
704 static void test_pack_IMAGE_DOS_HEADER(void)
706 /* IMAGE_DOS_HEADER (pack 2) */
707 TEST_TYPE_SIZE (IMAGE_DOS_HEADER, 64)
708 TEST_TYPE_ALIGN (IMAGE_DOS_HEADER, 2)
709 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_magic, 2)
710 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_magic, 2)
711 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_magic, 0)
712 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cblp, 2)
713 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cblp, 2)
714 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cblp, 2)
715 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cp, 2)
716 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cp, 2)
717 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cp, 4)
718 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_crlc, 2)
719 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_crlc, 2)
720 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_crlc, 6)
721 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cparhdr, 2)
722 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cparhdr, 2)
723 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cparhdr, 8)
724 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_minalloc, 2)
725 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_minalloc, 2)
726 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_minalloc, 10)
727 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_maxalloc, 2)
728 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_maxalloc, 2)
729 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_maxalloc, 12)
730 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_ss, 2)
731 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_ss, 2)
732 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_ss, 14)
733 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_sp, 2)
734 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_sp, 2)
735 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_sp, 16)
736 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_csum, 2)
737 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_csum, 2)
738 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_csum, 18)
739 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_ip, 2)
740 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_ip, 2)
741 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_ip, 20)
742 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cs, 2)
743 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cs, 2)
744 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cs, 22)
745 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_lfarlc, 2)
746 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_lfarlc, 2)
747 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_lfarlc, 24)
748 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_ovno, 2)
749 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_ovno, 2)
750 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_ovno, 26)
751 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_res, 8)
752 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_res, 2)
753 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_res, 28)
754 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_oemid, 2)
755 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_oemid, 2)
756 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_oemid, 36)
757 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_oeminfo, 2)
758 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_oeminfo, 2)
759 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_oeminfo, 38)
760 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_res2, 20)
761 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_res2, 2)
762 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_res2, 40)
763 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_lfanew, 4)
764 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_lfanew, 2)
765 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_lfanew, 60)
768 static void test_pack_IMAGE_EXPORT_DIRECTORY(void)
770 /* IMAGE_EXPORT_DIRECTORY */
771 TEST_TYPE_SIZE (IMAGE_EXPORT_DIRECTORY, 40)
772 TEST_TYPE_ALIGN (IMAGE_EXPORT_DIRECTORY, 4)
773 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, Characteristics, 4)
774 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, Characteristics, 4)
775 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, Characteristics, 0)
776 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, TimeDateStamp, 4)
777 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, TimeDateStamp, 4)
778 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, TimeDateStamp, 4)
779 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, MajorVersion, 2)
780 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, MajorVersion, 2)
781 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, MajorVersion, 8)
782 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, MinorVersion, 2)
783 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, MinorVersion, 2)
784 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, MinorVersion, 10)
785 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, Name, 4)
786 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, Name, 4)
787 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, Name, 12)
788 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, Base, 4)
789 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, Base, 4)
790 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, Base, 16)
791 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, NumberOfFunctions, 4)
792 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, NumberOfFunctions, 4)
793 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, NumberOfFunctions, 20)
794 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, NumberOfNames, 4)
795 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, NumberOfNames, 4)
796 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, NumberOfNames, 24)
797 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, AddressOfFunctions, 4)
798 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, AddressOfFunctions, 4)
799 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, AddressOfFunctions, 28)
800 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, AddressOfNames, 4)
801 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, AddressOfNames, 4)
802 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, AddressOfNames, 32)
803 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, AddressOfNameOrdinals, 4)
804 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, AddressOfNameOrdinals, 4)
805 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, AddressOfNameOrdinals, 36)
808 static void test_pack_IMAGE_FILE_HEADER(void)
810 /* IMAGE_FILE_HEADER */
811 TEST_TYPE_SIZE (IMAGE_FILE_HEADER, 20)
812 TEST_TYPE_ALIGN (IMAGE_FILE_HEADER, 4)
813 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, Machine, 2)
814 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, Machine, 2)
815 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, Machine, 0)
816 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, NumberOfSections, 2)
817 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, NumberOfSections, 2)
818 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, NumberOfSections, 2)
819 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, TimeDateStamp, 4)
820 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, TimeDateStamp, 4)
821 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, TimeDateStamp, 4)
822 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, PointerToSymbolTable, 4)
823 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, PointerToSymbolTable, 4)
824 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, PointerToSymbolTable, 8)
825 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, NumberOfSymbols, 4)
826 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, NumberOfSymbols, 4)
827 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, NumberOfSymbols, 12)
828 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, SizeOfOptionalHeader, 2)
829 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, SizeOfOptionalHeader, 2)
830 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, SizeOfOptionalHeader, 16)
831 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, Characteristics, 2)
832 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, Characteristics, 2)
833 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, Characteristics, 18)
836 static void test_pack_IMAGE_FUNCTION_ENTRY(void)
838 /* IMAGE_FUNCTION_ENTRY */
839 TEST_TYPE_SIZE (IMAGE_FUNCTION_ENTRY, 12)
840 TEST_TYPE_ALIGN (IMAGE_FUNCTION_ENTRY, 4)
841 TEST_FIELD_SIZE (IMAGE_FUNCTION_ENTRY, StartingAddress, 4)
842 TEST_FIELD_ALIGN (IMAGE_FUNCTION_ENTRY, StartingAddress, 4)
843 TEST_FIELD_OFFSET(IMAGE_FUNCTION_ENTRY, StartingAddress, 0)
844 TEST_FIELD_SIZE (IMAGE_FUNCTION_ENTRY, EndingAddress, 4)
845 TEST_FIELD_ALIGN (IMAGE_FUNCTION_ENTRY, EndingAddress, 4)
846 TEST_FIELD_OFFSET(IMAGE_FUNCTION_ENTRY, EndingAddress, 4)
847 TEST_FIELD_SIZE (IMAGE_FUNCTION_ENTRY, EndOfPrologue, 4)
848 TEST_FIELD_ALIGN (IMAGE_FUNCTION_ENTRY, EndOfPrologue, 4)
849 TEST_FIELD_OFFSET(IMAGE_FUNCTION_ENTRY, EndOfPrologue, 8)
852 static void test_pack_IMAGE_IMPORT_BY_NAME(void)
854 /* IMAGE_IMPORT_BY_NAME */
855 TEST_TYPE_SIZE (IMAGE_IMPORT_BY_NAME, 4)
856 TEST_TYPE_ALIGN (IMAGE_IMPORT_BY_NAME, 2)
857 TEST_FIELD_SIZE (IMAGE_IMPORT_BY_NAME, Hint, 2)
858 TEST_FIELD_ALIGN (IMAGE_IMPORT_BY_NAME, Hint, 2)
859 TEST_FIELD_OFFSET(IMAGE_IMPORT_BY_NAME, Hint, 0)
860 TEST_FIELD_SIZE (IMAGE_IMPORT_BY_NAME, Name, 1)
861 TEST_FIELD_ALIGN (IMAGE_IMPORT_BY_NAME, Name, 1)
862 TEST_FIELD_OFFSET(IMAGE_IMPORT_BY_NAME, Name, 2)
865 static void test_pack_IMAGE_IMPORT_DESCRIPTOR(void)
867 /* IMAGE_IMPORT_DESCRIPTOR */
870 static void test_pack_IMAGE_LINENUMBER(void)
872 /* IMAGE_LINENUMBER (pack 2) */
875 static void test_pack_IMAGE_LOAD_CONFIG_DIRECTORY(void)
877 /* IMAGE_LOAD_CONFIG_DIRECTORY */
878 TEST_TYPE_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, 88)
879 TEST_TYPE_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, 8)
880 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, Size, 4)
881 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, Size, 4)
882 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, Size, 0)
883 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, TimeDateStamp, 4)
884 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, TimeDateStamp, 4)
885 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, TimeDateStamp, 4)
886 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, MajorVersion, 2)
887 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, MajorVersion, 2)
888 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, MajorVersion, 8)
889 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, MinorVersion, 2)
890 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, MinorVersion, 2)
891 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, MinorVersion, 10)
892 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsClear, 4)
893 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsClear, 4)
894 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsClear, 12)
895 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsSet, 4)
896 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsSet, 4)
897 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsSet, 16)
898 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, CriticalSectionDefaultTimeout, 4)
899 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, CriticalSectionDefaultTimeout, 4)
900 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, CriticalSectionDefaultTimeout, 20)
901 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitFreeBlockThreshold, 4)
902 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitFreeBlockThreshold, 4)
903 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitFreeBlockThreshold, 24)
904 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitTotalFreeThreshold, 4)
905 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitTotalFreeThreshold, 4)
906 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitTotalFreeThreshold, 28)
907 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, LockPrefixTable, 8)
908 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, LockPrefixTable, 8)
909 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, LockPrefixTable, 32)
910 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, MaximumAllocationSize, 4)
911 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, MaximumAllocationSize, 4)
912 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, MaximumAllocationSize, 40)
913 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, VirtualMemoryThreshold, 4)
914 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, VirtualMemoryThreshold, 4)
915 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, VirtualMemoryThreshold, 44)
916 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, ProcessHeapFlags, 4)
917 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, ProcessHeapFlags, 4)
918 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, ProcessHeapFlags, 48)
919 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, ProcessAffinityMask, 4)
920 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, ProcessAffinityMask, 4)
921 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, ProcessAffinityMask, 52)
922 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, CSDVersion, 2)
923 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, CSDVersion, 2)
924 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, CSDVersion, 56)
925 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, Reserved1, 2)
926 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, Reserved1, 2)
927 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, Reserved1, 58)
928 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, EditList, 8)
929 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, EditList, 8)
930 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, EditList, 64)
931 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, SecurityCookie, 4)
932 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, SecurityCookie, 4)
933 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, SecurityCookie, 72)
934 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerTable, 4)
935 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerTable, 4)
936 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerTable, 76)
937 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerCount, 4)
938 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerCount, 4)
939 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerCount, 80)
942 static void test_pack_IMAGE_NT_HEADERS(void)
944 /* IMAGE_NT_HEADERS */
945 TEST_TYPE_SIZE (IMAGE_NT_HEADERS, 264)
946 TEST_TYPE_ALIGN (IMAGE_NT_HEADERS, 8)
949 static void test_pack_IMAGE_NT_HEADERS32(void)
951 /* IMAGE_NT_HEADERS32 */
952 TEST_TYPE_SIZE (IMAGE_NT_HEADERS32, 248)
953 TEST_TYPE_ALIGN (IMAGE_NT_HEADERS32, 4)
954 TEST_FIELD_SIZE (IMAGE_NT_HEADERS32, Signature, 4)
955 TEST_FIELD_ALIGN (IMAGE_NT_HEADERS32, Signature, 4)
956 TEST_FIELD_OFFSET(IMAGE_NT_HEADERS32, Signature, 0)
957 TEST_FIELD_SIZE (IMAGE_NT_HEADERS32, FileHeader, 20)
958 TEST_FIELD_ALIGN (IMAGE_NT_HEADERS32, FileHeader, 4)
959 TEST_FIELD_OFFSET(IMAGE_NT_HEADERS32, FileHeader, 4)
960 TEST_FIELD_SIZE (IMAGE_NT_HEADERS32, OptionalHeader, 224)
961 TEST_FIELD_ALIGN (IMAGE_NT_HEADERS32, OptionalHeader, 4)
962 TEST_FIELD_OFFSET(IMAGE_NT_HEADERS32, OptionalHeader, 24)
965 static void test_pack_IMAGE_NT_HEADERS64(void)
967 /* IMAGE_NT_HEADERS64 */
968 TEST_TYPE_SIZE (IMAGE_NT_HEADERS64, 264)
969 TEST_TYPE_ALIGN (IMAGE_NT_HEADERS64, 8)
970 TEST_FIELD_SIZE (IMAGE_NT_HEADERS64, Signature, 4)
971 TEST_FIELD_ALIGN (IMAGE_NT_HEADERS64, Signature, 4)
972 TEST_FIELD_OFFSET(IMAGE_NT_HEADERS64, Signature, 0)
973 TEST_FIELD_SIZE (IMAGE_NT_HEADERS64, FileHeader, 20)
974 TEST_FIELD_ALIGN (IMAGE_NT_HEADERS64, FileHeader, 4)
975 TEST_FIELD_OFFSET(IMAGE_NT_HEADERS64, FileHeader, 4)
976 TEST_FIELD_SIZE (IMAGE_NT_HEADERS64, OptionalHeader, 240)
977 TEST_FIELD_ALIGN (IMAGE_NT_HEADERS64, OptionalHeader, 8)
978 TEST_FIELD_OFFSET(IMAGE_NT_HEADERS64, OptionalHeader, 24)
981 static void test_pack_IMAGE_OPTIONAL_HEADER(void)
983 /* IMAGE_OPTIONAL_HEADER */
984 TEST_TYPE_SIZE (IMAGE_OPTIONAL_HEADER, 240)
985 TEST_TYPE_ALIGN (IMAGE_OPTIONAL_HEADER, 8)
988 static void test_pack_IMAGE_OPTIONAL_HEADER32(void)
990 /* IMAGE_OPTIONAL_HEADER32 */
991 TEST_TYPE_SIZE (IMAGE_OPTIONAL_HEADER32, 224)
992 TEST_TYPE_ALIGN (IMAGE_OPTIONAL_HEADER32, 4)
993 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, Magic, 2)
994 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, Magic, 2)
995 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, Magic, 0)
996 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MajorLinkerVersion, 1)
997 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MajorLinkerVersion, 1)
998 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MajorLinkerVersion, 2)
999 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MinorLinkerVersion, 1)
1000 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MinorLinkerVersion, 1)
1001 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MinorLinkerVersion, 3)
1002 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfCode, 4)
1003 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfCode, 4)
1004 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfCode, 4)
1005 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfInitializedData, 4)
1006 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfInitializedData, 4)
1007 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfInitializedData, 8)
1008 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfUninitializedData, 4)
1009 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfUninitializedData, 4)
1010 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfUninitializedData, 12)
1011 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, AddressOfEntryPoint, 4)
1012 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, AddressOfEntryPoint, 4)
1013 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, AddressOfEntryPoint, 16)
1014 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, BaseOfCode, 4)
1015 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, BaseOfCode, 4)
1016 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, BaseOfCode, 20)
1017 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, BaseOfData, 4)
1018 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, BaseOfData, 4)
1019 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, BaseOfData, 24)
1020 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, ImageBase, 4)
1021 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, ImageBase, 4)
1022 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, ImageBase, 28)
1023 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SectionAlignment, 4)
1024 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SectionAlignment, 4)
1025 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SectionAlignment, 32)
1026 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, FileAlignment, 4)
1027 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, FileAlignment, 4)
1028 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, FileAlignment, 36)
1029 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MajorOperatingSystemVersion, 2)
1030 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MajorOperatingSystemVersion, 2)
1031 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MajorOperatingSystemVersion, 40)
1032 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MinorOperatingSystemVersion, 2)
1033 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MinorOperatingSystemVersion, 2)
1034 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MinorOperatingSystemVersion, 42)
1035 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MajorImageVersion, 2)
1036 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MajorImageVersion, 2)
1037 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MajorImageVersion, 44)
1038 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MinorImageVersion, 2)
1039 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MinorImageVersion, 2)
1040 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MinorImageVersion, 46)
1041 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MajorSubsystemVersion, 2)
1042 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MajorSubsystemVersion, 2)
1043 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MajorSubsystemVersion, 48)
1044 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MinorSubsystemVersion, 2)
1045 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MinorSubsystemVersion, 2)
1046 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MinorSubsystemVersion, 50)
1047 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, Win32VersionValue, 4)
1048 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, Win32VersionValue, 4)
1049 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, Win32VersionValue, 52)
1050 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfImage, 4)
1051 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfImage, 4)
1052 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfImage, 56)
1053 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfHeaders, 4)
1054 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfHeaders, 4)
1055 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfHeaders, 60)
1056 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, CheckSum, 4)
1057 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, CheckSum, 4)
1058 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, CheckSum, 64)
1059 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, Subsystem, 2)
1060 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, Subsystem, 2)
1061 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, Subsystem, 68)
1062 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, DllCharacteristics, 2)
1063 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, DllCharacteristics, 2)
1064 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, DllCharacteristics, 70)
1065 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfStackReserve, 4)
1066 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfStackReserve, 4)
1067 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfStackReserve, 72)
1068 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfStackCommit, 4)
1069 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfStackCommit, 4)
1070 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfStackCommit, 76)
1071 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfHeapReserve, 4)
1072 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfHeapReserve, 4)
1073 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfHeapReserve, 80)
1074 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfHeapCommit, 4)
1075 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfHeapCommit, 4)
1076 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfHeapCommit, 84)
1077 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, LoaderFlags, 4)
1078 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, LoaderFlags, 4)
1079 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, LoaderFlags, 88)
1080 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, NumberOfRvaAndSizes, 4)
1081 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, NumberOfRvaAndSizes, 4)
1082 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, NumberOfRvaAndSizes, 92)
1083 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, DataDirectory, 128)
1084 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, DataDirectory, 4)
1085 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, DataDirectory, 96)
1088 static void test_pack_IMAGE_OPTIONAL_HEADER64(void)
1090 /* IMAGE_OPTIONAL_HEADER64 */
1091 TEST_TYPE_SIZE (IMAGE_OPTIONAL_HEADER64, 240)
1092 TEST_TYPE_ALIGN (IMAGE_OPTIONAL_HEADER64, 8)
1093 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, Magic, 2)
1094 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, Magic, 2)
1095 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, Magic, 0)
1096 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MajorLinkerVersion, 1)
1097 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MajorLinkerVersion, 1)
1098 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MajorLinkerVersion, 2)
1099 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MinorLinkerVersion, 1)
1100 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MinorLinkerVersion, 1)
1101 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MinorLinkerVersion, 3)
1102 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfCode, 4)
1103 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfCode, 4)
1104 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfCode, 4)
1105 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfInitializedData, 4)
1106 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfInitializedData, 4)
1107 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfInitializedData, 8)
1108 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfUninitializedData, 4)
1109 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfUninitializedData, 4)
1110 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfUninitializedData, 12)
1111 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, AddressOfEntryPoint, 4)
1112 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, AddressOfEntryPoint, 4)
1113 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, AddressOfEntryPoint, 16)
1114 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, BaseOfCode, 4)
1115 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, BaseOfCode, 4)
1116 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, BaseOfCode, 20)
1117 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, ImageBase, 8)
1118 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, ImageBase, 8)
1119 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, ImageBase, 24)
1120 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SectionAlignment, 4)
1121 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SectionAlignment, 4)
1122 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SectionAlignment, 32)
1123 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, FileAlignment, 4)
1124 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, FileAlignment, 4)
1125 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, FileAlignment, 36)
1126 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MajorOperatingSystemVersion, 2)
1127 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MajorOperatingSystemVersion, 2)
1128 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MajorOperatingSystemVersion, 40)
1129 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MinorOperatingSystemVersion, 2)
1130 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MinorOperatingSystemVersion, 2)
1131 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MinorOperatingSystemVersion, 42)
1132 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MajorImageVersion, 2)
1133 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MajorImageVersion, 2)
1134 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MajorImageVersion, 44)
1135 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MinorImageVersion, 2)
1136 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MinorImageVersion, 2)
1137 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MinorImageVersion, 46)
1138 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MajorSubsystemVersion, 2)
1139 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MajorSubsystemVersion, 2)
1140 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MajorSubsystemVersion, 48)
1141 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MinorSubsystemVersion, 2)
1142 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MinorSubsystemVersion, 2)
1143 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MinorSubsystemVersion, 50)
1144 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, Win32VersionValue, 4)
1145 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, Win32VersionValue, 4)
1146 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, Win32VersionValue, 52)
1147 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfImage, 4)
1148 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfImage, 4)
1149 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfImage, 56)
1150 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfHeaders, 4)
1151 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfHeaders, 4)
1152 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfHeaders, 60)
1153 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, CheckSum, 4)
1154 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, CheckSum, 4)
1155 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, CheckSum, 64)
1156 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, Subsystem, 2)
1157 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, Subsystem, 2)
1158 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, Subsystem, 68)
1159 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, DllCharacteristics, 2)
1160 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, DllCharacteristics, 2)
1161 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, DllCharacteristics, 70)
1162 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfStackReserve, 8)
1163 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfStackReserve, 8)
1164 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfStackReserve, 72)
1165 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfStackCommit, 8)
1166 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfStackCommit, 8)
1167 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfStackCommit, 80)
1168 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfHeapReserve, 8)
1169 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfHeapReserve, 8)
1170 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfHeapReserve, 88)
1171 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfHeapCommit, 8)
1172 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfHeapCommit, 8)
1173 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfHeapCommit, 96)
1174 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, LoaderFlags, 4)
1175 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, LoaderFlags, 4)
1176 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, LoaderFlags, 104)
1177 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, NumberOfRvaAndSizes, 4)
1178 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, NumberOfRvaAndSizes, 4)
1179 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, NumberOfRvaAndSizes, 108)
1180 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, DataDirectory, 128)
1181 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, DataDirectory, 4)
1182 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, DataDirectory, 112)
1185 static void test_pack_IMAGE_OS2_HEADER(void)
1187 /* IMAGE_OS2_HEADER (pack 2) */
1188 TEST_TYPE_SIZE (IMAGE_OS2_HEADER, 64)
1189 TEST_TYPE_ALIGN (IMAGE_OS2_HEADER, 2)
1190 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_magic, 2)
1191 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_magic, 2)
1192 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_magic, 0)
1193 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_ver, 1)
1194 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_ver, 1)
1195 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_ver, 2)
1196 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_rev, 1)
1197 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_rev, 1)
1198 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_rev, 3)
1199 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_enttab, 2)
1200 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_enttab, 2)
1201 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_enttab, 4)
1202 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cbenttab, 2)
1203 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cbenttab, 2)
1204 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cbenttab, 6)
1205 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_crc, 4)
1206 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_crc, 2)
1207 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_crc, 8)
1208 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_flags, 2)
1209 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_flags, 2)
1210 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_flags, 12)
1211 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_autodata, 2)
1212 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_autodata, 2)
1213 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_autodata, 14)
1214 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_heap, 2)
1215 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_heap, 2)
1216 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_heap, 16)
1217 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_stack, 2)
1218 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_stack, 2)
1219 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_stack, 18)
1220 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_csip, 4)
1221 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_csip, 2)
1222 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_csip, 20)
1223 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_sssp, 4)
1224 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_sssp, 2)
1225 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_sssp, 24)
1226 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cseg, 2)
1227 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cseg, 2)
1228 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cseg, 28)
1229 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cmod, 2)
1230 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cmod, 2)
1231 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cmod, 30)
1232 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cbnrestab, 2)
1233 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cbnrestab, 2)
1234 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cbnrestab, 32)
1235 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_segtab, 2)
1236 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_segtab, 2)
1237 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_segtab, 34)
1238 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_rsrctab, 2)
1239 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_rsrctab, 2)
1240 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_rsrctab, 36)
1241 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_restab, 2)
1242 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_restab, 2)
1243 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_restab, 38)
1244 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_modtab, 2)
1245 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_modtab, 2)
1246 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_modtab, 40)
1247 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_imptab, 2)
1248 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_imptab, 2)
1249 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_imptab, 42)
1250 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_nrestab, 4)
1251 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_nrestab, 2)
1252 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_nrestab, 44)
1253 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cmovent, 2)
1254 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cmovent, 2)
1255 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cmovent, 48)
1256 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_align, 2)
1257 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_align, 2)
1258 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_align, 50)
1259 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cres, 2)
1260 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cres, 2)
1261 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cres, 52)
1262 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_exetyp, 1)
1263 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_exetyp, 1)
1264 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_exetyp, 54)
1265 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_flagsothers, 1)
1266 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_flagsothers, 1)
1267 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_flagsothers, 55)
1268 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_pretthunks, 2)
1269 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_pretthunks, 2)
1270 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_pretthunks, 56)
1271 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_psegrefbytes, 2)
1272 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_psegrefbytes, 2)
1273 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_psegrefbytes, 58)
1274 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_swaparea, 2)
1275 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_swaparea, 2)
1276 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_swaparea, 60)
1277 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_expver, 2)
1278 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_expver, 2)
1279 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_expver, 62)
1282 static void test_pack_IMAGE_RELOCATION(void)
1284 /* IMAGE_RELOCATION (pack 2) */
1287 static void test_pack_IMAGE_RESOURCE_DATA_ENTRY(void)
1289 /* IMAGE_RESOURCE_DATA_ENTRY */
1290 TEST_TYPE_SIZE (IMAGE_RESOURCE_DATA_ENTRY, 16)
1291 TEST_TYPE_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, 4)
1292 TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, OffsetToData, 4)
1293 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, OffsetToData, 4)
1294 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, OffsetToData, 0)
1295 TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, Size, 4)
1296 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, Size, 4)
1297 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, Size, 4)
1298 TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, CodePage, 4)
1299 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, CodePage, 4)
1300 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, CodePage, 8)
1301 TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, Reserved, 4)
1302 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, Reserved, 4)
1303 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, Reserved, 12)
1306 static void test_pack_IMAGE_RESOURCE_DIRECTORY(void)
1308 /* IMAGE_RESOURCE_DIRECTORY */
1309 TEST_TYPE_SIZE (IMAGE_RESOURCE_DIRECTORY, 16)
1310 TEST_TYPE_ALIGN (IMAGE_RESOURCE_DIRECTORY, 4)
1311 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, Characteristics, 4)
1312 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, Characteristics, 4)
1313 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, Characteristics, 0)
1314 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, TimeDateStamp, 4)
1315 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, TimeDateStamp, 4)
1316 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, TimeDateStamp, 4)
1317 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, MajorVersion, 2)
1318 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, MajorVersion, 2)
1319 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, MajorVersion, 8)
1320 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, MinorVersion, 2)
1321 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, MinorVersion, 2)
1322 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, MinorVersion, 10)
1323 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, NumberOfNamedEntries, 2)
1324 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, NumberOfNamedEntries, 2)
1325 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, NumberOfNamedEntries, 12)
1326 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, NumberOfIdEntries, 2)
1327 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, NumberOfIdEntries, 2)
1328 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, NumberOfIdEntries, 14)
1331 static void test_pack_IMAGE_RESOURCE_DIRECTORY_ENTRY(void)
1333 /* IMAGE_RESOURCE_DIRECTORY_ENTRY */
1336 static void test_pack_IMAGE_RESOURCE_DIRECTORY_STRING(void)
1338 /* IMAGE_RESOURCE_DIRECTORY_STRING */
1339 TEST_TYPE_SIZE (IMAGE_RESOURCE_DIRECTORY_STRING, 4)
1340 TEST_TYPE_ALIGN (IMAGE_RESOURCE_DIRECTORY_STRING, 2)
1341 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY_STRING, Length, 2)
1342 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY_STRING, Length, 2)
1343 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY_STRING, Length, 0)
1344 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY_STRING, NameString, 1)
1345 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY_STRING, NameString, 1)
1346 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY_STRING, NameString, 2)
1349 static void test_pack_IMAGE_RESOURCE_DIR_STRING_U(void)
1351 /* IMAGE_RESOURCE_DIR_STRING_U */
1352 TEST_TYPE_SIZE (IMAGE_RESOURCE_DIR_STRING_U, 4)
1353 TEST_TYPE_ALIGN (IMAGE_RESOURCE_DIR_STRING_U, 2)
1354 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIR_STRING_U, Length, 2)
1355 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIR_STRING_U, Length, 2)
1356 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIR_STRING_U, Length, 0)
1357 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIR_STRING_U, NameString, 2)
1358 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIR_STRING_U, NameString, 2)
1359 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIR_STRING_U, NameString, 2)
1362 static void test_pack_IMAGE_SECTION_HEADER(void)
1364 /* IMAGE_SECTION_HEADER */
1365 TEST_FIELD_SIZE (IMAGE_SECTION_HEADER, Name, 8)
1366 TEST_FIELD_ALIGN (IMAGE_SECTION_HEADER, Name, 1)
1367 TEST_FIELD_OFFSET(IMAGE_SECTION_HEADER, Name, 0)
1370 static void test_pack_IMAGE_SEPARATE_DEBUG_HEADER(void)
1372 /* IMAGE_SEPARATE_DEBUG_HEADER */
1373 TEST_TYPE_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, 48)
1374 TEST_TYPE_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, 4)
1375 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Signature, 2)
1376 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Signature, 2)
1377 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Signature, 0)
1378 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Flags, 2)
1379 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Flags, 2)
1380 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Flags, 2)
1381 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Machine, 2)
1382 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Machine, 2)
1383 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Machine, 4)
1384 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Characteristics, 2)
1385 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Characteristics, 2)
1386 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Characteristics, 6)
1387 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, TimeDateStamp, 4)
1388 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, TimeDateStamp, 4)
1389 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, TimeDateStamp, 8)
1390 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, CheckSum, 4)
1391 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, CheckSum, 4)
1392 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, CheckSum, 12)
1393 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, ImageBase, 4)
1394 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, ImageBase, 4)
1395 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, ImageBase, 16)
1396 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, SizeOfImage, 4)
1397 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, SizeOfImage, 4)
1398 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, SizeOfImage, 20)
1399 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, NumberOfSections, 4)
1400 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, NumberOfSections, 4)
1401 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, NumberOfSections, 24)
1402 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, ExportedNamesSize, 4)
1403 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, ExportedNamesSize, 4)
1404 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, ExportedNamesSize, 28)
1405 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, DebugDirectorySize, 4)
1406 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, DebugDirectorySize, 4)
1407 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, DebugDirectorySize, 32)
1408 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, SectionAlignment, 4)
1409 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, SectionAlignment, 4)
1410 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, SectionAlignment, 36)
1411 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Reserved, 8)
1412 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Reserved, 4)
1413 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Reserved, 40)
1416 static void test_pack_IMAGE_SYMBOL(void)
1418 /* IMAGE_SYMBOL (pack 2) */
1421 static void test_pack_IMAGE_THUNK_DATA(void)
1423 /* IMAGE_THUNK_DATA */
1426 static void test_pack_IMAGE_TLS_DIRECTORY(void)
1428 /* IMAGE_TLS_DIRECTORY */
1429 TEST_TYPE_SIZE (IMAGE_TLS_DIRECTORY, 40)
1430 TEST_TYPE_ALIGN (IMAGE_TLS_DIRECTORY, 8)
1433 static void test_pack_IMAGE_TLS_DIRECTORY32(void)
1435 /* IMAGE_TLS_DIRECTORY32 */
1436 TEST_TYPE_SIZE (IMAGE_TLS_DIRECTORY32, 24)
1437 TEST_TYPE_ALIGN (IMAGE_TLS_DIRECTORY32, 4)
1438 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, StartAddressOfRawData, 4)
1439 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, StartAddressOfRawData, 4)
1440 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, StartAddressOfRawData, 0)
1441 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, EndAddressOfRawData, 4)
1442 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, EndAddressOfRawData, 4)
1443 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, EndAddressOfRawData, 4)
1444 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, AddressOfIndex, 4)
1445 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, AddressOfIndex, 4)
1446 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, AddressOfIndex, 8)
1447 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, AddressOfCallBacks, 4)
1448 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, AddressOfCallBacks, 4)
1449 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, AddressOfCallBacks, 12)
1450 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, SizeOfZeroFill, 4)
1451 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, SizeOfZeroFill, 4)
1452 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, SizeOfZeroFill, 16)
1453 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, Characteristics, 4)
1454 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, Characteristics, 4)
1455 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, Characteristics, 20)
1458 static void test_pack_IMAGE_TLS_DIRECTORY64(void)
1460 /* IMAGE_TLS_DIRECTORY64 */
1461 TEST_TYPE_SIZE (IMAGE_TLS_DIRECTORY64, 40)
1462 TEST_TYPE_ALIGN (IMAGE_TLS_DIRECTORY64, 8)
1463 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, StartAddressOfRawData, 8)
1464 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, StartAddressOfRawData, 8)
1465 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, StartAddressOfRawData, 0)
1466 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, EndAddressOfRawData, 8)
1467 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, EndAddressOfRawData, 8)
1468 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, EndAddressOfRawData, 8)
1469 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, AddressOfIndex, 8)
1470 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, AddressOfIndex, 8)
1471 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, AddressOfIndex, 16)
1472 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, AddressOfCallBacks, 8)
1473 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, AddressOfCallBacks, 8)
1474 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, AddressOfCallBacks, 24)
1475 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, SizeOfZeroFill, 4)
1476 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, SizeOfZeroFill, 4)
1477 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, SizeOfZeroFill, 32)
1478 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, Characteristics, 4)
1479 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, Characteristics, 4)
1480 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, Characteristics, 36)
1483 static void test_pack_IMAGE_VXD_HEADER(void)
1485 /* IMAGE_VXD_HEADER (pack 2) */
1486 TEST_TYPE_SIZE (IMAGE_VXD_HEADER, 196)
1487 TEST_TYPE_ALIGN (IMAGE_VXD_HEADER, 2)
1488 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_magic, 2)
1489 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_magic, 2)
1490 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_magic, 0)
1491 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_border, 1)
1492 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_border, 1)
1493 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_border, 2)
1494 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_worder, 1)
1495 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_worder, 1)
1496 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_worder, 3)
1497 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_level, 4)
1498 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_level, 2)
1499 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_level, 4)
1500 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_cpu, 2)
1501 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_cpu, 2)
1502 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_cpu, 8)
1503 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_os, 2)
1504 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_os, 2)
1505 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_os, 10)
1506 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ver, 4)
1507 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ver, 2)
1508 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ver, 12)
1509 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_mflags, 4)
1510 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_mflags, 2)
1511 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_mflags, 16)
1512 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_mpages, 4)
1513 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_mpages, 2)
1514 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_mpages, 20)
1515 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_startobj, 4)
1516 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_startobj, 2)
1517 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_startobj, 24)
1518 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_eip, 4)
1519 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_eip, 2)
1520 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_eip, 28)
1521 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_stackobj, 4)
1522 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_stackobj, 2)
1523 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_stackobj, 32)
1524 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_esp, 4)
1525 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_esp, 2)
1526 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_esp, 36)
1527 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_pagesize, 4)
1528 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_pagesize, 2)
1529 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_pagesize, 40)
1530 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_lastpagesize, 4)
1531 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_lastpagesize, 2)
1532 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_lastpagesize, 44)
1533 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_fixupsize, 4)
1534 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_fixupsize, 2)
1535 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_fixupsize, 48)
1536 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_fixupsum, 4)
1537 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_fixupsum, 2)
1538 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_fixupsum, 52)
1539 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ldrsize, 4)
1540 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ldrsize, 2)
1541 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ldrsize, 56)
1542 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ldrsum, 4)
1543 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ldrsum, 2)
1544 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ldrsum, 60)
1545 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_objtab, 4)
1546 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_objtab, 2)
1547 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_objtab, 64)
1548 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_objcnt, 4)
1549 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_objcnt, 2)
1550 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_objcnt, 68)
1551 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_objmap, 4)
1552 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_objmap, 2)
1553 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_objmap, 72)
1554 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_itermap, 4)
1555 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_itermap, 2)
1556 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_itermap, 76)
1557 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_rsrctab, 4)
1558 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_rsrctab, 2)
1559 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_rsrctab, 80)
1560 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_rsrccnt, 4)
1561 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_rsrccnt, 2)
1562 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_rsrccnt, 84)
1563 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_restab, 4)
1564 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_restab, 2)
1565 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_restab, 88)
1566 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_enttab, 4)
1567 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_enttab, 2)
1568 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_enttab, 92)
1569 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_dirtab, 4)
1570 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_dirtab, 2)
1571 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_dirtab, 96)
1572 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_dircnt, 4)
1573 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_dircnt, 2)
1574 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_dircnt, 100)
1575 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_fpagetab, 4)
1576 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_fpagetab, 2)
1577 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_fpagetab, 104)
1578 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_frectab, 4)
1579 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_frectab, 2)
1580 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_frectab, 108)
1581 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_impmod, 4)
1582 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_impmod, 2)
1583 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_impmod, 112)
1584 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_impmodcnt, 4)
1585 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_impmodcnt, 2)
1586 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_impmodcnt, 116)
1587 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_impproc, 4)
1588 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_impproc, 2)
1589 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_impproc, 120)
1590 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_pagesum, 4)
1591 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_pagesum, 2)
1592 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_pagesum, 124)
1593 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_datapage, 4)
1594 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_datapage, 2)
1595 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_datapage, 128)
1596 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_preload, 4)
1597 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_preload, 2)
1598 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_preload, 132)
1599 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_nrestab, 4)
1600 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_nrestab, 2)
1601 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_nrestab, 136)
1602 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_cbnrestab, 4)
1603 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_cbnrestab, 2)
1604 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_cbnrestab, 140)
1605 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_nressum, 4)
1606 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_nressum, 2)
1607 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_nressum, 144)
1608 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_autodata, 4)
1609 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_autodata, 2)
1610 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_autodata, 148)
1611 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_debuginfo, 4)
1612 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_debuginfo, 2)
1613 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_debuginfo, 152)
1614 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_debuglen, 4)
1615 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_debuglen, 2)
1616 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_debuglen, 156)
1617 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_instpreload, 4)
1618 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_instpreload, 2)
1619 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_instpreload, 160)
1620 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_instdemand, 4)
1621 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_instdemand, 2)
1622 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_instdemand, 164)
1623 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_heapsize, 4)
1624 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_heapsize, 2)
1625 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_heapsize, 168)
1626 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_res3, 12)
1627 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_res3, 1)
1628 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_res3, 172)
1629 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_winresoff, 4)
1630 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_winresoff, 2)
1631 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_winresoff, 184)
1632 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_winreslen, 4)
1633 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_winreslen, 2)
1634 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_winreslen, 188)
1635 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_devid, 2)
1636 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_devid, 2)
1637 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_devid, 192)
1638 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ddkver, 2)
1639 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ddkver, 2)
1640 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ddkver, 194)
1643 static void test_pack_IO_COUNTERS(void)
1645 /* IO_COUNTERS (pack 8) */
1646 TEST_TYPE_SIZE (IO_COUNTERS, 48)
1647 TEST_TYPE_ALIGN (IO_COUNTERS, 8)
1648 TEST_FIELD_SIZE (IO_COUNTERS, ReadOperationCount, 8)
1649 TEST_FIELD_ALIGN (IO_COUNTERS, ReadOperationCount, 8)
1650 TEST_FIELD_OFFSET(IO_COUNTERS, ReadOperationCount, 0)
1651 TEST_FIELD_SIZE (IO_COUNTERS, WriteOperationCount, 8)
1652 TEST_FIELD_ALIGN (IO_COUNTERS, WriteOperationCount, 8)
1653 TEST_FIELD_OFFSET(IO_COUNTERS, WriteOperationCount, 8)
1654 TEST_FIELD_SIZE (IO_COUNTERS, OtherOperationCount, 8)
1655 TEST_FIELD_ALIGN (IO_COUNTERS, OtherOperationCount, 8)
1656 TEST_FIELD_OFFSET(IO_COUNTERS, OtherOperationCount, 16)
1657 TEST_FIELD_SIZE (IO_COUNTERS, ReadTransferCount, 8)
1658 TEST_FIELD_ALIGN (IO_COUNTERS, ReadTransferCount, 8)
1659 TEST_FIELD_OFFSET(IO_COUNTERS, ReadTransferCount, 24)
1660 TEST_FIELD_SIZE (IO_COUNTERS, WriteTransferCount, 8)
1661 TEST_FIELD_ALIGN (IO_COUNTERS, WriteTransferCount, 8)
1662 TEST_FIELD_OFFSET(IO_COUNTERS, WriteTransferCount, 32)
1663 TEST_FIELD_SIZE (IO_COUNTERS, OtherTransferCount, 8)
1664 TEST_FIELD_ALIGN (IO_COUNTERS, OtherTransferCount, 8)
1665 TEST_FIELD_OFFSET(IO_COUNTERS, OtherTransferCount, 40)
1668 static void test_pack_LANGID(void)
1671 TEST_TYPE_SIZE (LANGID, 2)
1672 TEST_TYPE_ALIGN (LANGID, 2)
1673 TEST_TYPE_UNSIGNED(LANGID)
1676 static void test_pack_LARGE_INTEGER(void)
1681 static void test_pack_LCID(void)
1684 TEST_TYPE_SIZE (LCID, 4)
1685 TEST_TYPE_ALIGN (LCID, 4)
1686 TEST_TYPE_UNSIGNED(LCID)
1689 static void test_pack_LIST_ENTRY(void)
1692 TEST_TYPE_SIZE (LIST_ENTRY, 16)
1693 TEST_TYPE_ALIGN (LIST_ENTRY, 8)
1694 TEST_FIELD_SIZE (LIST_ENTRY, Flink, 8)
1695 TEST_FIELD_ALIGN (LIST_ENTRY, Flink, 8)
1696 TEST_FIELD_OFFSET(LIST_ENTRY, Flink, 0)
1697 TEST_FIELD_SIZE (LIST_ENTRY, Blink, 8)
1698 TEST_FIELD_ALIGN (LIST_ENTRY, Blink, 8)
1699 TEST_FIELD_OFFSET(LIST_ENTRY, Blink, 8)
1702 static void test_pack_LONG(void)
1705 TEST_TYPE_SIZE (LONG, 4)
1706 TEST_TYPE_ALIGN (LONG, 4)
1707 TEST_TYPE_SIGNED(LONG)
1710 static void test_pack_LONGLONG(void)
1713 TEST_TYPE_SIZE (LONGLONG, 8)
1714 TEST_TYPE_ALIGN (LONGLONG, 8)
1715 TEST_TYPE_SIGNED(LONGLONG)
1718 static void test_pack_LUID(void)
1721 TEST_TYPE_SIZE (LUID, 8)
1722 TEST_TYPE_ALIGN (LUID, 4)
1723 TEST_FIELD_SIZE (LUID, LowPart, 4)
1724 TEST_FIELD_ALIGN (LUID, LowPart, 4)
1725 TEST_FIELD_OFFSET(LUID, LowPart, 0)
1726 TEST_FIELD_SIZE (LUID, HighPart, 4)
1727 TEST_FIELD_ALIGN (LUID, HighPart, 4)
1728 TEST_FIELD_OFFSET(LUID, HighPart, 4)
1731 static void test_pack_LUID_AND_ATTRIBUTES(void)
1733 /* LUID_AND_ATTRIBUTES (pack 4) */
1734 TEST_TYPE_SIZE (LUID_AND_ATTRIBUTES, 12)
1735 TEST_TYPE_ALIGN (LUID_AND_ATTRIBUTES, 4)
1736 TEST_FIELD_SIZE (LUID_AND_ATTRIBUTES, Luid, 8)
1737 TEST_FIELD_ALIGN (LUID_AND_ATTRIBUTES, Luid, 4)
1738 TEST_FIELD_OFFSET(LUID_AND_ATTRIBUTES, Luid, 0)
1739 TEST_FIELD_SIZE (LUID_AND_ATTRIBUTES, Attributes, 4)
1740 TEST_FIELD_ALIGN (LUID_AND_ATTRIBUTES, Attributes, 4)
1741 TEST_FIELD_OFFSET(LUID_AND_ATTRIBUTES, Attributes, 8)
1744 static void test_pack_MEMORY_BASIC_INFORMATION(void)
1746 /* MEMORY_BASIC_INFORMATION */
1747 TEST_TYPE_SIZE (MEMORY_BASIC_INFORMATION, 48)
1748 TEST_TYPE_ALIGN (MEMORY_BASIC_INFORMATION, 8)
1749 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, BaseAddress, 8)
1750 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, BaseAddress, 8)
1751 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, BaseAddress, 0)
1752 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, AllocationBase, 8)
1753 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, AllocationBase, 8)
1754 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, AllocationBase, 8)
1755 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, AllocationProtect, 4)
1756 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, AllocationProtect, 4)
1757 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, AllocationProtect, 16)
1758 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, RegionSize, 8)
1759 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, RegionSize, 8)
1760 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, RegionSize, 24)
1761 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, State, 4)
1762 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, State, 4)
1763 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, State, 32)
1764 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, Protect, 4)
1765 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, Protect, 4)
1766 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, Protect, 36)
1767 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, Type, 4)
1768 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, Type, 4)
1769 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, Type, 40)
1772 static void test_pack_MESSAGE_RESOURCE_BLOCK(void)
1774 /* MESSAGE_RESOURCE_BLOCK */
1775 TEST_TYPE_SIZE (MESSAGE_RESOURCE_BLOCK, 12)
1776 TEST_TYPE_ALIGN (MESSAGE_RESOURCE_BLOCK, 4)
1777 TEST_FIELD_SIZE (MESSAGE_RESOURCE_BLOCK, LowId, 4)
1778 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_BLOCK, LowId, 4)
1779 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_BLOCK, LowId, 0)
1780 TEST_FIELD_SIZE (MESSAGE_RESOURCE_BLOCK, HighId, 4)
1781 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_BLOCK, HighId, 4)
1782 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_BLOCK, HighId, 4)
1783 TEST_FIELD_SIZE (MESSAGE_RESOURCE_BLOCK, OffsetToEntries, 4)
1784 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_BLOCK, OffsetToEntries, 4)
1785 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_BLOCK, OffsetToEntries, 8)
1788 static void test_pack_MESSAGE_RESOURCE_DATA(void)
1790 /* MESSAGE_RESOURCE_DATA */
1791 TEST_TYPE_SIZE (MESSAGE_RESOURCE_DATA, 16)
1792 TEST_TYPE_ALIGN (MESSAGE_RESOURCE_DATA, 4)
1793 TEST_FIELD_SIZE (MESSAGE_RESOURCE_DATA, NumberOfBlocks, 4)
1794 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_DATA, NumberOfBlocks, 4)
1795 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_DATA, NumberOfBlocks, 0)
1796 TEST_FIELD_SIZE (MESSAGE_RESOURCE_DATA, Blocks, 12)
1797 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_DATA, Blocks, 4)
1798 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_DATA, Blocks, 4)
1801 static void test_pack_MESSAGE_RESOURCE_ENTRY(void)
1803 /* MESSAGE_RESOURCE_ENTRY */
1804 TEST_TYPE_SIZE (MESSAGE_RESOURCE_ENTRY, 6)
1805 TEST_TYPE_ALIGN (MESSAGE_RESOURCE_ENTRY, 2)
1806 TEST_FIELD_SIZE (MESSAGE_RESOURCE_ENTRY, Length, 2)
1807 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_ENTRY, Length, 2)
1808 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_ENTRY, Length, 0)
1809 TEST_FIELD_SIZE (MESSAGE_RESOURCE_ENTRY, Flags, 2)
1810 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_ENTRY, Flags, 2)
1811 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_ENTRY, Flags, 2)
1812 TEST_FIELD_SIZE (MESSAGE_RESOURCE_ENTRY, Text, 1)
1813 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_ENTRY, Text, 1)
1814 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_ENTRY, Text, 4)
1817 static void test_pack_NT_TIB(void)
1820 TEST_FIELD_SIZE (NT_TIB, ExceptionList, 8)
1821 TEST_FIELD_ALIGN (NT_TIB, ExceptionList, 8)
1822 TEST_FIELD_OFFSET(NT_TIB, ExceptionList, 0)
1823 TEST_FIELD_SIZE (NT_TIB, StackBase, 8)
1824 TEST_FIELD_ALIGN (NT_TIB, StackBase, 8)
1825 TEST_FIELD_OFFSET(NT_TIB, StackBase, 8)
1826 TEST_FIELD_SIZE (NT_TIB, StackLimit, 8)
1827 TEST_FIELD_ALIGN (NT_TIB, StackLimit, 8)
1828 TEST_FIELD_OFFSET(NT_TIB, StackLimit, 16)
1829 TEST_FIELD_SIZE (NT_TIB, SubSystemTib, 8)
1830 TEST_FIELD_ALIGN (NT_TIB, SubSystemTib, 8)
1831 TEST_FIELD_OFFSET(NT_TIB, SubSystemTib, 24)
1834 static void test_pack_OBJECT_TYPE_LIST(void)
1836 /* OBJECT_TYPE_LIST */
1837 TEST_TYPE_SIZE (OBJECT_TYPE_LIST, 16)
1838 TEST_TYPE_ALIGN (OBJECT_TYPE_LIST, 8)
1839 TEST_FIELD_SIZE (OBJECT_TYPE_LIST, Level, 2)
1840 TEST_FIELD_ALIGN (OBJECT_TYPE_LIST, Level, 2)
1841 TEST_FIELD_OFFSET(OBJECT_TYPE_LIST, Level, 0)
1842 TEST_FIELD_SIZE (OBJECT_TYPE_LIST, Sbz, 2)
1843 TEST_FIELD_ALIGN (OBJECT_TYPE_LIST, Sbz, 2)
1844 TEST_FIELD_OFFSET(OBJECT_TYPE_LIST, Sbz, 2)
1845 TEST_FIELD_SIZE (OBJECT_TYPE_LIST, ObjectType, 8)
1846 TEST_FIELD_ALIGN (OBJECT_TYPE_LIST, ObjectType, 8)
1847 TEST_FIELD_OFFSET(OBJECT_TYPE_LIST, ObjectType, 8)
1850 static void test_pack_PACCESS_ALLOWED_ACE(void)
1852 /* PACCESS_ALLOWED_ACE */
1853 TEST_TYPE_SIZE (PACCESS_ALLOWED_ACE, 8)
1854 TEST_TYPE_ALIGN (PACCESS_ALLOWED_ACE, 8)
1855 TEST_TARGET_SIZE (PACCESS_ALLOWED_ACE, 12)
1856 TEST_TARGET_ALIGN(PACCESS_ALLOWED_ACE, 4)
1859 static void test_pack_PACCESS_DENIED_ACE(void)
1861 /* PACCESS_DENIED_ACE */
1862 TEST_TYPE_SIZE (PACCESS_DENIED_ACE, 8)
1863 TEST_TYPE_ALIGN (PACCESS_DENIED_ACE, 8)
1864 TEST_TARGET_SIZE (PACCESS_DENIED_ACE, 12)
1865 TEST_TARGET_ALIGN(PACCESS_DENIED_ACE, 4)
1868 static void test_pack_PACCESS_TOKEN(void)
1871 TEST_TYPE_SIZE (PACCESS_TOKEN, 8)
1872 TEST_TYPE_ALIGN (PACCESS_TOKEN, 8)
1875 static void test_pack_PACE_HEADER(void)
1878 TEST_TYPE_SIZE (PACE_HEADER, 8)
1879 TEST_TYPE_ALIGN (PACE_HEADER, 8)
1880 TEST_TARGET_SIZE (PACE_HEADER, 4)
1881 TEST_TARGET_ALIGN(PACE_HEADER, 2)
1884 static void test_pack_PACL(void)
1887 TEST_TYPE_SIZE (PACL, 8)
1888 TEST_TYPE_ALIGN (PACL, 8)
1889 TEST_TARGET_SIZE (PACL, 8)
1890 TEST_TARGET_ALIGN(PACL, 2)
1893 static void test_pack_PACL_REVISION_INFORMATION(void)
1895 /* PACL_REVISION_INFORMATION */
1896 TEST_TYPE_SIZE (PACL_REVISION_INFORMATION, 8)
1897 TEST_TYPE_ALIGN (PACL_REVISION_INFORMATION, 8)
1898 TEST_TARGET_SIZE (PACL_REVISION_INFORMATION, 4)
1899 TEST_TARGET_ALIGN(PACL_REVISION_INFORMATION, 4)
1902 static void test_pack_PACL_SIZE_INFORMATION(void)
1904 /* PACL_SIZE_INFORMATION */
1905 TEST_TYPE_SIZE (PACL_SIZE_INFORMATION, 8)
1906 TEST_TYPE_ALIGN (PACL_SIZE_INFORMATION, 8)
1907 TEST_TARGET_SIZE (PACL_SIZE_INFORMATION, 12)
1908 TEST_TARGET_ALIGN(PACL_SIZE_INFORMATION, 4)
1911 static void test_pack_PCCH(void)
1914 TEST_TYPE_SIZE (PCCH, 8)
1915 TEST_TYPE_ALIGN (PCCH, 8)
1916 TEST_TARGET_SIZE (PCCH, 1)
1917 TEST_TARGET_ALIGN(PCCH, 1)
1920 static void test_pack_PCH(void)
1923 TEST_TYPE_SIZE (PCH, 8)
1924 TEST_TYPE_ALIGN (PCH, 8)
1925 TEST_TARGET_SIZE (PCH, 1)
1926 TEST_TARGET_ALIGN(PCH, 1)
1929 static void test_pack_PCSTR(void)
1932 TEST_TYPE_SIZE (PCSTR, 8)
1933 TEST_TYPE_ALIGN (PCSTR, 8)
1934 TEST_TARGET_SIZE (PCSTR, 1)
1935 TEST_TARGET_ALIGN(PCSTR, 1)
1938 static void test_pack_PCTSTR(void)
1941 TEST_TYPE_SIZE (PCTSTR, 8)
1942 TEST_TYPE_ALIGN (PCTSTR, 8)
1945 static void test_pack_PCWCH(void)
1948 TEST_TYPE_SIZE (PCWCH, 8)
1949 TEST_TYPE_ALIGN (PCWCH, 8)
1950 TEST_TARGET_SIZE (PCWCH, 2)
1951 TEST_TARGET_ALIGN(PCWCH, 2)
1954 static void test_pack_PCWSTR(void)
1957 TEST_TYPE_SIZE (PCWSTR, 8)
1958 TEST_TYPE_ALIGN (PCWSTR, 8)
1959 TEST_TARGET_SIZE (PCWSTR, 2)
1960 TEST_TARGET_ALIGN(PCWSTR, 2)
1963 static void test_pack_PEXCEPTION_POINTERS(void)
1965 /* PEXCEPTION_POINTERS */
1966 TEST_TYPE_SIZE (PEXCEPTION_POINTERS, 8)
1967 TEST_TYPE_ALIGN (PEXCEPTION_POINTERS, 8)
1968 TEST_TARGET_SIZE (PEXCEPTION_POINTERS, 16)
1969 TEST_TARGET_ALIGN(PEXCEPTION_POINTERS, 8)
1972 static void test_pack_PEXCEPTION_RECORD(void)
1974 /* PEXCEPTION_RECORD */
1975 TEST_TYPE_SIZE (PEXCEPTION_RECORD, 8)
1976 TEST_TYPE_ALIGN (PEXCEPTION_RECORD, 8)
1977 TEST_TARGET_SIZE (PEXCEPTION_RECORD, 152)
1978 TEST_TARGET_ALIGN(PEXCEPTION_RECORD, 8)
1981 static void test_pack_PFLOATING_SAVE_AREA(void)
1983 /* PFLOATING_SAVE_AREA */
1984 TEST_TYPE_SIZE (PFLOATING_SAVE_AREA, 8)
1985 TEST_TYPE_ALIGN (PFLOATING_SAVE_AREA, 8)
1986 TEST_TARGET_SIZE (PFLOATING_SAVE_AREA, 112)
1987 TEST_TARGET_ALIGN(PFLOATING_SAVE_AREA, 4)
1990 static void test_pack_PFPO_DATA(void)
1993 TEST_TYPE_SIZE (PFPO_DATA, 8)
1994 TEST_TYPE_ALIGN (PFPO_DATA, 8)
1995 TEST_TARGET_SIZE (PFPO_DATA, 16)
1996 TEST_TARGET_ALIGN(PFPO_DATA, 4)
1999 static void test_pack_PGENERIC_MAPPING(void)
2001 /* PGENERIC_MAPPING */
2002 TEST_TYPE_SIZE (PGENERIC_MAPPING, 8)
2003 TEST_TYPE_ALIGN (PGENERIC_MAPPING, 8)
2004 TEST_TARGET_SIZE (PGENERIC_MAPPING, 16)
2005 TEST_TARGET_ALIGN(PGENERIC_MAPPING, 4)
2008 static void test_pack_PHANDLE(void)
2011 TEST_TYPE_SIZE (PHANDLE, 8)
2012 TEST_TYPE_ALIGN (PHANDLE, 8)
2013 TEST_TARGET_SIZE (PHANDLE, 8)
2014 TEST_TARGET_ALIGN(PHANDLE, 8)
2017 static void test_pack_PIMAGE_ARCHIVE_MEMBER_HEADER(void)
2019 /* PIMAGE_ARCHIVE_MEMBER_HEADER */
2020 TEST_TYPE_SIZE (PIMAGE_ARCHIVE_MEMBER_HEADER, 8)
2021 TEST_TYPE_ALIGN (PIMAGE_ARCHIVE_MEMBER_HEADER, 8)
2022 TEST_TARGET_SIZE (PIMAGE_ARCHIVE_MEMBER_HEADER, 60)
2023 TEST_TARGET_ALIGN(PIMAGE_ARCHIVE_MEMBER_HEADER, 1)
2026 static void test_pack_PIMAGE_AUX_SYMBOL(void)
2028 /* PIMAGE_AUX_SYMBOL */
2029 TEST_TYPE_SIZE (PIMAGE_AUX_SYMBOL, 8)
2030 TEST_TYPE_ALIGN (PIMAGE_AUX_SYMBOL, 8)
2033 static void test_pack_PIMAGE_BASE_RELOCATION(void)
2035 /* PIMAGE_BASE_RELOCATION */
2036 TEST_TYPE_SIZE (PIMAGE_BASE_RELOCATION, 8)
2037 TEST_TYPE_ALIGN (PIMAGE_BASE_RELOCATION, 8)
2038 TEST_TARGET_SIZE (PIMAGE_BASE_RELOCATION, 8)
2039 TEST_TARGET_ALIGN(PIMAGE_BASE_RELOCATION, 4)
2042 static void test_pack_PIMAGE_BOUND_FORWARDER_REF(void)
2044 /* PIMAGE_BOUND_FORWARDER_REF */
2045 TEST_TYPE_SIZE (PIMAGE_BOUND_FORWARDER_REF, 8)
2046 TEST_TYPE_ALIGN (PIMAGE_BOUND_FORWARDER_REF, 8)
2047 TEST_TARGET_SIZE (PIMAGE_BOUND_FORWARDER_REF, 8)
2048 TEST_TARGET_ALIGN(PIMAGE_BOUND_FORWARDER_REF, 4)
2051 static void test_pack_PIMAGE_BOUND_IMPORT_DESCRIPTOR(void)
2053 /* PIMAGE_BOUND_IMPORT_DESCRIPTOR */
2054 TEST_TYPE_SIZE (PIMAGE_BOUND_IMPORT_DESCRIPTOR, 8)
2055 TEST_TYPE_ALIGN (PIMAGE_BOUND_IMPORT_DESCRIPTOR, 8)
2056 TEST_TARGET_SIZE (PIMAGE_BOUND_IMPORT_DESCRIPTOR, 8)
2057 TEST_TARGET_ALIGN(PIMAGE_BOUND_IMPORT_DESCRIPTOR, 4)
2060 static void test_pack_PIMAGE_COFF_SYMBOLS_HEADER(void)
2062 /* PIMAGE_COFF_SYMBOLS_HEADER */
2063 TEST_TYPE_SIZE (PIMAGE_COFF_SYMBOLS_HEADER, 8)
2064 TEST_TYPE_ALIGN (PIMAGE_COFF_SYMBOLS_HEADER, 8)
2065 TEST_TARGET_SIZE (PIMAGE_COFF_SYMBOLS_HEADER, 32)
2066 TEST_TARGET_ALIGN(PIMAGE_COFF_SYMBOLS_HEADER, 4)
2069 static void test_pack_PIMAGE_DATA_DIRECTORY(void)
2071 /* PIMAGE_DATA_DIRECTORY */
2072 TEST_TYPE_SIZE (PIMAGE_DATA_DIRECTORY, 8)
2073 TEST_TYPE_ALIGN (PIMAGE_DATA_DIRECTORY, 8)
2074 TEST_TARGET_SIZE (PIMAGE_DATA_DIRECTORY, 8)
2075 TEST_TARGET_ALIGN(PIMAGE_DATA_DIRECTORY, 4)
2078 static void test_pack_PIMAGE_DEBUG_DIRECTORY(void)
2080 /* PIMAGE_DEBUG_DIRECTORY */
2081 TEST_TYPE_SIZE (PIMAGE_DEBUG_DIRECTORY, 8)
2082 TEST_TYPE_ALIGN (PIMAGE_DEBUG_DIRECTORY, 8)
2083 TEST_TARGET_SIZE (PIMAGE_DEBUG_DIRECTORY, 28)
2084 TEST_TARGET_ALIGN(PIMAGE_DEBUG_DIRECTORY, 4)
2087 static void test_pack_PIMAGE_DEBUG_MISC(void)
2089 /* PIMAGE_DEBUG_MISC */
2090 TEST_TYPE_SIZE (PIMAGE_DEBUG_MISC, 8)
2091 TEST_TYPE_ALIGN (PIMAGE_DEBUG_MISC, 8)
2092 TEST_TARGET_SIZE (PIMAGE_DEBUG_MISC, 16)
2093 TEST_TARGET_ALIGN(PIMAGE_DEBUG_MISC, 4)
2096 static void test_pack_PIMAGE_DOS_HEADER(void)
2098 /* PIMAGE_DOS_HEADER */
2099 TEST_TYPE_SIZE (PIMAGE_DOS_HEADER, 8)
2100 TEST_TYPE_ALIGN (PIMAGE_DOS_HEADER, 8)
2101 TEST_TARGET_SIZE (PIMAGE_DOS_HEADER, 64)
2102 TEST_TARGET_ALIGN(PIMAGE_DOS_HEADER, 2)
2105 static void test_pack_PIMAGE_EXPORT_DIRECTORY(void)
2107 /* PIMAGE_EXPORT_DIRECTORY */
2108 TEST_TYPE_SIZE (PIMAGE_EXPORT_DIRECTORY, 8)
2109 TEST_TYPE_ALIGN (PIMAGE_EXPORT_DIRECTORY, 8)
2110 TEST_TARGET_SIZE (PIMAGE_EXPORT_DIRECTORY, 40)
2111 TEST_TARGET_ALIGN(PIMAGE_EXPORT_DIRECTORY, 4)
2114 static void test_pack_PIMAGE_FILE_HEADER(void)
2116 /* PIMAGE_FILE_HEADER */
2117 TEST_TYPE_SIZE (PIMAGE_FILE_HEADER, 8)
2118 TEST_TYPE_ALIGN (PIMAGE_FILE_HEADER, 8)
2119 TEST_TARGET_SIZE (PIMAGE_FILE_HEADER, 20)
2120 TEST_TARGET_ALIGN(PIMAGE_FILE_HEADER, 4)
2123 static void test_pack_PIMAGE_FUNCTION_ENTRY(void)
2125 /* PIMAGE_FUNCTION_ENTRY */
2126 TEST_TYPE_SIZE (PIMAGE_FUNCTION_ENTRY, 8)
2127 TEST_TYPE_ALIGN (PIMAGE_FUNCTION_ENTRY, 8)
2128 TEST_TARGET_SIZE (PIMAGE_FUNCTION_ENTRY, 12)
2129 TEST_TARGET_ALIGN(PIMAGE_FUNCTION_ENTRY, 4)
2132 static void test_pack_PIMAGE_IMPORT_BY_NAME(void)
2134 /* PIMAGE_IMPORT_BY_NAME */
2135 TEST_TYPE_SIZE (PIMAGE_IMPORT_BY_NAME, 8)
2136 TEST_TYPE_ALIGN (PIMAGE_IMPORT_BY_NAME, 8)
2137 TEST_TARGET_SIZE (PIMAGE_IMPORT_BY_NAME, 4)
2138 TEST_TARGET_ALIGN(PIMAGE_IMPORT_BY_NAME, 2)
2141 static void test_pack_PIMAGE_IMPORT_DESCRIPTOR(void)
2143 /* PIMAGE_IMPORT_DESCRIPTOR */
2144 TEST_TYPE_SIZE (PIMAGE_IMPORT_DESCRIPTOR, 8)
2145 TEST_TYPE_ALIGN (PIMAGE_IMPORT_DESCRIPTOR, 8)
2148 static void test_pack_PIMAGE_LINENUMBER(void)
2150 /* PIMAGE_LINENUMBER */
2151 TEST_TYPE_SIZE (PIMAGE_LINENUMBER, 8)
2152 TEST_TYPE_ALIGN (PIMAGE_LINENUMBER, 8)
2155 static void test_pack_PIMAGE_LOAD_CONFIG_DIRECTORY(void)
2157 /* PIMAGE_LOAD_CONFIG_DIRECTORY */
2158 TEST_TYPE_SIZE (PIMAGE_LOAD_CONFIG_DIRECTORY, 8)
2159 TEST_TYPE_ALIGN (PIMAGE_LOAD_CONFIG_DIRECTORY, 8)
2160 TEST_TARGET_SIZE (PIMAGE_LOAD_CONFIG_DIRECTORY, 88)
2161 TEST_TARGET_ALIGN(PIMAGE_LOAD_CONFIG_DIRECTORY, 8)
2164 static void test_pack_PIMAGE_NT_HEADERS(void)
2166 /* PIMAGE_NT_HEADERS */
2167 TEST_TYPE_SIZE (PIMAGE_NT_HEADERS, 8)
2168 TEST_TYPE_ALIGN (PIMAGE_NT_HEADERS, 8)
2171 static void test_pack_PIMAGE_NT_HEADERS32(void)
2173 /* PIMAGE_NT_HEADERS32 */
2174 TEST_TYPE_SIZE (PIMAGE_NT_HEADERS32, 8)
2175 TEST_TYPE_ALIGN (PIMAGE_NT_HEADERS32, 8)
2176 TEST_TARGET_SIZE (PIMAGE_NT_HEADERS32, 248)
2177 TEST_TARGET_ALIGN(PIMAGE_NT_HEADERS32, 4)
2180 static void test_pack_PIMAGE_NT_HEADERS64(void)
2182 /* PIMAGE_NT_HEADERS64 */
2183 TEST_TYPE_SIZE (PIMAGE_NT_HEADERS64, 8)
2184 TEST_TYPE_ALIGN (PIMAGE_NT_HEADERS64, 8)
2185 TEST_TARGET_SIZE (PIMAGE_NT_HEADERS64, 264)
2186 TEST_TARGET_ALIGN(PIMAGE_NT_HEADERS64, 8)
2189 static void test_pack_PIMAGE_OPTIONAL_HEADER(void)
2191 /* PIMAGE_OPTIONAL_HEADER */
2192 TEST_TYPE_SIZE (PIMAGE_OPTIONAL_HEADER, 8)
2193 TEST_TYPE_ALIGN (PIMAGE_OPTIONAL_HEADER, 8)
2196 static void test_pack_PIMAGE_OPTIONAL_HEADER32(void)
2198 /* PIMAGE_OPTIONAL_HEADER32 */
2199 TEST_TYPE_SIZE (PIMAGE_OPTIONAL_HEADER32, 8)
2200 TEST_TYPE_ALIGN (PIMAGE_OPTIONAL_HEADER32, 8)
2201 TEST_TARGET_SIZE (PIMAGE_OPTIONAL_HEADER32, 224)
2202 TEST_TARGET_ALIGN(PIMAGE_OPTIONAL_HEADER32, 4)
2205 static void test_pack_PIMAGE_OPTIONAL_HEADER64(void)
2207 /* PIMAGE_OPTIONAL_HEADER64 */
2208 TEST_TYPE_SIZE (PIMAGE_OPTIONAL_HEADER64, 8)
2209 TEST_TYPE_ALIGN (PIMAGE_OPTIONAL_HEADER64, 8)
2210 TEST_TARGET_SIZE (PIMAGE_OPTIONAL_HEADER64, 240)
2211 TEST_TARGET_ALIGN(PIMAGE_OPTIONAL_HEADER64, 8)
2214 static void test_pack_PIMAGE_OS2_HEADER(void)
2216 /* PIMAGE_OS2_HEADER */
2217 TEST_TYPE_SIZE (PIMAGE_OS2_HEADER, 8)
2218 TEST_TYPE_ALIGN (PIMAGE_OS2_HEADER, 8)
2219 TEST_TARGET_SIZE (PIMAGE_OS2_HEADER, 64)
2220 TEST_TARGET_ALIGN(PIMAGE_OS2_HEADER, 2)
2223 static void test_pack_PIMAGE_RELOCATION(void)
2225 /* PIMAGE_RELOCATION */
2226 TEST_TYPE_SIZE (PIMAGE_RELOCATION, 8)
2227 TEST_TYPE_ALIGN (PIMAGE_RELOCATION, 8)
2230 static void test_pack_PIMAGE_RESOURCE_DATA_ENTRY(void)
2232 /* PIMAGE_RESOURCE_DATA_ENTRY */
2233 TEST_TYPE_SIZE (PIMAGE_RESOURCE_DATA_ENTRY, 8)
2234 TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DATA_ENTRY, 8)
2235 TEST_TARGET_SIZE (PIMAGE_RESOURCE_DATA_ENTRY, 16)
2236 TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DATA_ENTRY, 4)
2239 static void test_pack_PIMAGE_RESOURCE_DIRECTORY(void)
2241 /* PIMAGE_RESOURCE_DIRECTORY */
2242 TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIRECTORY, 8)
2243 TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIRECTORY, 8)
2244 TEST_TARGET_SIZE (PIMAGE_RESOURCE_DIRECTORY, 16)
2245 TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DIRECTORY, 4)
2248 static void test_pack_PIMAGE_RESOURCE_DIRECTORY_ENTRY(void)
2250 /* PIMAGE_RESOURCE_DIRECTORY_ENTRY */
2251 TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIRECTORY_ENTRY, 8)
2252 TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIRECTORY_ENTRY, 8)
2255 static void test_pack_PIMAGE_RESOURCE_DIRECTORY_STRING(void)
2257 /* PIMAGE_RESOURCE_DIRECTORY_STRING */
2258 TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIRECTORY_STRING, 8)
2259 TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIRECTORY_STRING, 8)
2260 TEST_TARGET_SIZE (PIMAGE_RESOURCE_DIRECTORY_STRING, 4)
2261 TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DIRECTORY_STRING, 2)
2264 static void test_pack_PIMAGE_RESOURCE_DIR_STRING_U(void)
2266 /* PIMAGE_RESOURCE_DIR_STRING_U */
2267 TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIR_STRING_U, 8)
2268 TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIR_STRING_U, 8)
2269 TEST_TARGET_SIZE (PIMAGE_RESOURCE_DIR_STRING_U, 4)
2270 TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DIR_STRING_U, 2)
2273 static void test_pack_PIMAGE_SECTION_HEADER(void)
2275 /* PIMAGE_SECTION_HEADER */
2276 TEST_TYPE_SIZE (PIMAGE_SECTION_HEADER, 8)
2277 TEST_TYPE_ALIGN (PIMAGE_SECTION_HEADER, 8)
2280 static void test_pack_PIMAGE_SEPARATE_DEBUG_HEADER(void)
2282 /* PIMAGE_SEPARATE_DEBUG_HEADER */
2283 TEST_TYPE_SIZE (PIMAGE_SEPARATE_DEBUG_HEADER, 8)
2284 TEST_TYPE_ALIGN (PIMAGE_SEPARATE_DEBUG_HEADER, 8)
2285 TEST_TARGET_SIZE (PIMAGE_SEPARATE_DEBUG_HEADER, 48)
2286 TEST_TARGET_ALIGN(PIMAGE_SEPARATE_DEBUG_HEADER, 4)
2289 static void test_pack_PIMAGE_SYMBOL(void)
2292 TEST_TYPE_SIZE (PIMAGE_SYMBOL, 8)
2293 TEST_TYPE_ALIGN (PIMAGE_SYMBOL, 8)
2296 static void test_pack_PIMAGE_THUNK_DATA(void)
2298 /* PIMAGE_THUNK_DATA */
2299 TEST_TYPE_SIZE (PIMAGE_THUNK_DATA, 8)
2300 TEST_TYPE_ALIGN (PIMAGE_THUNK_DATA, 8)
2303 static void test_pack_PIMAGE_TLS_CALLBACK(void)
2305 /* PIMAGE_TLS_CALLBACK */
2306 TEST_TYPE_SIZE (PIMAGE_TLS_CALLBACK, 8)
2307 TEST_TYPE_ALIGN (PIMAGE_TLS_CALLBACK, 8)
2310 static void test_pack_PIMAGE_TLS_DIRECTORY(void)
2312 /* PIMAGE_TLS_DIRECTORY */
2313 TEST_TYPE_SIZE (PIMAGE_TLS_DIRECTORY, 8)
2314 TEST_TYPE_ALIGN (PIMAGE_TLS_DIRECTORY, 8)
2317 static void test_pack_PIMAGE_VXD_HEADER(void)
2319 /* PIMAGE_VXD_HEADER */
2320 TEST_TYPE_SIZE (PIMAGE_VXD_HEADER, 8)
2321 TEST_TYPE_ALIGN (PIMAGE_VXD_HEADER, 8)
2322 TEST_TARGET_SIZE (PIMAGE_VXD_HEADER, 196)
2323 TEST_TARGET_ALIGN(PIMAGE_VXD_HEADER, 2)
2326 static void test_pack_PIO_COUNTERS(void)
2329 TEST_TYPE_SIZE (PIO_COUNTERS, 8)
2330 TEST_TYPE_ALIGN (PIO_COUNTERS, 8)
2331 TEST_TARGET_SIZE (PIO_COUNTERS, 48)
2332 TEST_TARGET_ALIGN(PIO_COUNTERS, 8)
2335 static void test_pack_PISECURITY_DESCRIPTOR(void)
2337 /* PISECURITY_DESCRIPTOR */
2338 TEST_TYPE_SIZE (PISECURITY_DESCRIPTOR, 8)
2339 TEST_TYPE_ALIGN (PISECURITY_DESCRIPTOR, 8)
2340 TEST_TARGET_SIZE (PISECURITY_DESCRIPTOR, 40)
2341 TEST_TARGET_ALIGN(PISECURITY_DESCRIPTOR, 8)
2344 static void test_pack_PISECURITY_DESCRIPTOR_RELATIVE(void)
2346 /* PISECURITY_DESCRIPTOR_RELATIVE */
2347 TEST_TYPE_SIZE (PISECURITY_DESCRIPTOR_RELATIVE, 8)
2348 TEST_TYPE_ALIGN (PISECURITY_DESCRIPTOR_RELATIVE, 8)
2349 TEST_TARGET_SIZE (PISECURITY_DESCRIPTOR_RELATIVE, 20)
2350 TEST_TARGET_ALIGN(PISECURITY_DESCRIPTOR_RELATIVE, 4)
2353 static void test_pack_PISID(void)
2356 TEST_TYPE_SIZE (PISID, 8)
2357 TEST_TYPE_ALIGN (PISID, 8)
2358 TEST_TARGET_SIZE (PISID, 12)
2359 TEST_TARGET_ALIGN(PISID, 4)
2362 static void test_pack_PLARGE_INTEGER(void)
2364 /* PLARGE_INTEGER */
2365 TEST_TYPE_SIZE (PLARGE_INTEGER, 8)
2366 TEST_TYPE_ALIGN (PLARGE_INTEGER, 8)
2369 static void test_pack_PLIST_ENTRY(void)
2372 TEST_TYPE_SIZE (PLIST_ENTRY, 8)
2373 TEST_TYPE_ALIGN (PLIST_ENTRY, 8)
2374 TEST_TARGET_SIZE (PLIST_ENTRY, 16)
2375 TEST_TARGET_ALIGN(PLIST_ENTRY, 8)
2378 static void test_pack_PLUID(void)
2381 TEST_TYPE_SIZE (PLUID, 8)
2382 TEST_TYPE_ALIGN (PLUID, 8)
2383 TEST_TARGET_SIZE (PLUID, 8)
2384 TEST_TARGET_ALIGN(PLUID, 4)
2387 static void test_pack_PLUID_AND_ATTRIBUTES(void)
2389 /* PLUID_AND_ATTRIBUTES */
2390 TEST_TYPE_SIZE (PLUID_AND_ATTRIBUTES, 8)
2391 TEST_TYPE_ALIGN (PLUID_AND_ATTRIBUTES, 8)
2392 TEST_TARGET_SIZE (PLUID_AND_ATTRIBUTES, 12)
2393 TEST_TARGET_ALIGN(PLUID_AND_ATTRIBUTES, 4)
2396 static void test_pack_PMEMORY_BASIC_INFORMATION(void)
2398 /* PMEMORY_BASIC_INFORMATION */
2399 TEST_TYPE_SIZE (PMEMORY_BASIC_INFORMATION, 8)
2400 TEST_TYPE_ALIGN (PMEMORY_BASIC_INFORMATION, 8)
2401 TEST_TARGET_SIZE (PMEMORY_BASIC_INFORMATION, 48)
2402 TEST_TARGET_ALIGN(PMEMORY_BASIC_INFORMATION, 8)
2405 static void test_pack_PMESSAGE_RESOURCE_BLOCK(void)
2407 /* PMESSAGE_RESOURCE_BLOCK */
2408 TEST_TYPE_SIZE (PMESSAGE_RESOURCE_BLOCK, 8)
2409 TEST_TYPE_ALIGN (PMESSAGE_RESOURCE_BLOCK, 8)
2410 TEST_TARGET_SIZE (PMESSAGE_RESOURCE_BLOCK, 12)
2411 TEST_TARGET_ALIGN(PMESSAGE_RESOURCE_BLOCK, 4)
2414 static void test_pack_PMESSAGE_RESOURCE_DATA(void)
2416 /* PMESSAGE_RESOURCE_DATA */
2417 TEST_TYPE_SIZE (PMESSAGE_RESOURCE_DATA, 8)
2418 TEST_TYPE_ALIGN (PMESSAGE_RESOURCE_DATA, 8)
2419 TEST_TARGET_SIZE (PMESSAGE_RESOURCE_DATA, 16)
2420 TEST_TARGET_ALIGN(PMESSAGE_RESOURCE_DATA, 4)
2423 static void test_pack_PMESSAGE_RESOURCE_ENTRY(void)
2425 /* PMESSAGE_RESOURCE_ENTRY */
2426 TEST_TYPE_SIZE (PMESSAGE_RESOURCE_ENTRY, 8)
2427 TEST_TYPE_ALIGN (PMESSAGE_RESOURCE_ENTRY, 8)
2428 TEST_TARGET_SIZE (PMESSAGE_RESOURCE_ENTRY, 6)
2429 TEST_TARGET_ALIGN(PMESSAGE_RESOURCE_ENTRY, 2)
2432 static void test_pack_PNT_TIB(void)
2435 TEST_TYPE_SIZE (PNT_TIB, 8)
2436 TEST_TYPE_ALIGN (PNT_TIB, 8)
2439 static void test_pack_POBJECT_TYPE_LIST(void)
2441 /* POBJECT_TYPE_LIST */
2442 TEST_TYPE_SIZE (POBJECT_TYPE_LIST, 8)
2443 TEST_TYPE_ALIGN (POBJECT_TYPE_LIST, 8)
2444 TEST_TARGET_SIZE (POBJECT_TYPE_LIST, 16)
2445 TEST_TARGET_ALIGN(POBJECT_TYPE_LIST, 8)
2448 static void test_pack_PPRIVILEGE_SET(void)
2450 /* PPRIVILEGE_SET */
2451 TEST_TYPE_SIZE (PPRIVILEGE_SET, 8)
2452 TEST_TYPE_ALIGN (PPRIVILEGE_SET, 8)
2453 TEST_TARGET_SIZE (PPRIVILEGE_SET, 20)
2454 TEST_TARGET_ALIGN(PPRIVILEGE_SET, 4)
2457 static void test_pack_PRIVILEGE_SET(void)
2460 TEST_TYPE_SIZE (PRIVILEGE_SET, 20)
2461 TEST_TYPE_ALIGN (PRIVILEGE_SET, 4)
2462 TEST_FIELD_SIZE (PRIVILEGE_SET, PrivilegeCount, 4)
2463 TEST_FIELD_ALIGN (PRIVILEGE_SET, PrivilegeCount, 4)
2464 TEST_FIELD_OFFSET(PRIVILEGE_SET, PrivilegeCount, 0)
2465 TEST_FIELD_SIZE (PRIVILEGE_SET, Control, 4)
2466 TEST_FIELD_ALIGN (PRIVILEGE_SET, Control, 4)
2467 TEST_FIELD_OFFSET(PRIVILEGE_SET, Control, 4)
2468 TEST_FIELD_SIZE (PRIVILEGE_SET, Privilege, 12)
2469 TEST_FIELD_ALIGN (PRIVILEGE_SET, Privilege, 4)
2470 TEST_FIELD_OFFSET(PRIVILEGE_SET, Privilege, 8)
2473 static void test_pack_PRLIST_ENTRY(void)
2476 TEST_TYPE_SIZE (PRLIST_ENTRY, 8)
2477 TEST_TYPE_ALIGN (PRLIST_ENTRY, 8)
2478 TEST_TARGET_SIZE (PRLIST_ENTRY, 16)
2479 TEST_TARGET_ALIGN(PRLIST_ENTRY, 8)
2482 static void test_pack_PRTL_CRITICAL_SECTION(void)
2484 /* PRTL_CRITICAL_SECTION */
2485 TEST_TYPE_SIZE (PRTL_CRITICAL_SECTION, 8)
2486 TEST_TYPE_ALIGN (PRTL_CRITICAL_SECTION, 8)
2487 TEST_TARGET_SIZE (PRTL_CRITICAL_SECTION, 40)
2488 TEST_TARGET_ALIGN(PRTL_CRITICAL_SECTION, 8)
2491 static void test_pack_PRTL_CRITICAL_SECTION_DEBUG(void)
2493 /* PRTL_CRITICAL_SECTION_DEBUG */
2494 TEST_TYPE_SIZE (PRTL_CRITICAL_SECTION_DEBUG, 8)
2495 TEST_TYPE_ALIGN (PRTL_CRITICAL_SECTION_DEBUG, 8)
2498 static void test_pack_PRTL_OSVERSIONINFOEXW(void)
2500 /* PRTL_OSVERSIONINFOEXW */
2501 TEST_TYPE_SIZE (PRTL_OSVERSIONINFOEXW, 8)
2502 TEST_TYPE_ALIGN (PRTL_OSVERSIONINFOEXW, 8)
2503 TEST_TARGET_SIZE (PRTL_OSVERSIONINFOEXW, 284)
2504 TEST_TARGET_ALIGN(PRTL_OSVERSIONINFOEXW, 4)
2507 static void test_pack_PRTL_OSVERSIONINFOW(void)
2509 /* PRTL_OSVERSIONINFOW */
2510 TEST_TYPE_SIZE (PRTL_OSVERSIONINFOW, 8)
2511 TEST_TYPE_ALIGN (PRTL_OSVERSIONINFOW, 8)
2512 TEST_TARGET_SIZE (PRTL_OSVERSIONINFOW, 276)
2513 TEST_TARGET_ALIGN(PRTL_OSVERSIONINFOW, 4)
2516 static void test_pack_PRTL_RESOURCE_DEBUG(void)
2518 /* PRTL_RESOURCE_DEBUG */
2519 TEST_TYPE_SIZE (PRTL_RESOURCE_DEBUG, 8)
2520 TEST_TYPE_ALIGN (PRTL_RESOURCE_DEBUG, 8)
2523 static void test_pack_PSECURITY_DESCRIPTOR(void)
2525 /* PSECURITY_DESCRIPTOR */
2526 TEST_TYPE_SIZE (PSECURITY_DESCRIPTOR, 8)
2527 TEST_TYPE_ALIGN (PSECURITY_DESCRIPTOR, 8)
2530 static void test_pack_PSECURITY_QUALITY_OF_SERVICE(void)
2532 /* PSECURITY_QUALITY_OF_SERVICE */
2533 TEST_TYPE_SIZE (PSECURITY_QUALITY_OF_SERVICE, 8)
2534 TEST_TYPE_ALIGN (PSECURITY_QUALITY_OF_SERVICE, 8)
2537 static void test_pack_PSID(void)
2540 TEST_TYPE_SIZE (PSID, 8)
2541 TEST_TYPE_ALIGN (PSID, 8)
2544 static void test_pack_PSID_IDENTIFIER_AUTHORITY(void)
2546 /* PSID_IDENTIFIER_AUTHORITY */
2547 TEST_TYPE_SIZE (PSID_IDENTIFIER_AUTHORITY, 8)
2548 TEST_TYPE_ALIGN (PSID_IDENTIFIER_AUTHORITY, 8)
2549 TEST_TARGET_SIZE (PSID_IDENTIFIER_AUTHORITY, 6)
2550 TEST_TARGET_ALIGN(PSID_IDENTIFIER_AUTHORITY, 1)
2553 static void test_pack_PSINGLE_LIST_ENTRY(void)
2555 /* PSINGLE_LIST_ENTRY */
2556 TEST_TYPE_SIZE (PSINGLE_LIST_ENTRY, 8)
2557 TEST_TYPE_ALIGN (PSINGLE_LIST_ENTRY, 8)
2558 TEST_TARGET_SIZE (PSINGLE_LIST_ENTRY, 8)
2559 TEST_TARGET_ALIGN(PSINGLE_LIST_ENTRY, 8)
2562 static void test_pack_PSTR(void)
2565 TEST_TYPE_SIZE (PSTR, 8)
2566 TEST_TYPE_ALIGN (PSTR, 8)
2567 TEST_TARGET_SIZE (PSTR, 1)
2568 TEST_TARGET_ALIGN(PSTR, 1)
2571 static void test_pack_PSYSTEM_ALARM_ACE(void)
2573 /* PSYSTEM_ALARM_ACE */
2574 TEST_TYPE_SIZE (PSYSTEM_ALARM_ACE, 8)
2575 TEST_TYPE_ALIGN (PSYSTEM_ALARM_ACE, 8)
2576 TEST_TARGET_SIZE (PSYSTEM_ALARM_ACE, 12)
2577 TEST_TARGET_ALIGN(PSYSTEM_ALARM_ACE, 4)
2580 static void test_pack_PSYSTEM_AUDIT_ACE(void)
2582 /* PSYSTEM_AUDIT_ACE */
2583 TEST_TYPE_SIZE (PSYSTEM_AUDIT_ACE, 8)
2584 TEST_TYPE_ALIGN (PSYSTEM_AUDIT_ACE, 8)
2585 TEST_TARGET_SIZE (PSYSTEM_AUDIT_ACE, 12)
2586 TEST_TARGET_ALIGN(PSYSTEM_AUDIT_ACE, 4)
2589 static void test_pack_PTOKEN_GROUPS(void)
2592 TEST_TYPE_SIZE (PTOKEN_GROUPS, 8)
2593 TEST_TYPE_ALIGN (PTOKEN_GROUPS, 8)
2594 TEST_TARGET_SIZE (PTOKEN_GROUPS, 24)
2595 TEST_TARGET_ALIGN(PTOKEN_GROUPS, 8)
2598 static void test_pack_PTOKEN_PRIVILEGES(void)
2600 /* PTOKEN_PRIVILEGES */
2601 TEST_TYPE_SIZE (PTOKEN_PRIVILEGES, 8)
2602 TEST_TYPE_ALIGN (PTOKEN_PRIVILEGES, 8)
2603 TEST_TARGET_SIZE (PTOKEN_PRIVILEGES, 16)
2604 TEST_TARGET_ALIGN(PTOKEN_PRIVILEGES, 4)
2607 static void test_pack_PTOKEN_USER(void)
2610 TEST_TYPE_SIZE (PTOKEN_USER, 8)
2611 TEST_TYPE_ALIGN (PTOKEN_USER, 8)
2612 TEST_TARGET_SIZE (PTOKEN_USER, 16)
2613 TEST_TARGET_ALIGN(PTOKEN_USER, 8)
2616 static void test_pack_PTSTR(void)
2619 TEST_TYPE_SIZE (PTSTR, 8)
2620 TEST_TYPE_ALIGN (PTSTR, 8)
2623 static void test_pack_PULARGE_INTEGER(void)
2625 /* PULARGE_INTEGER */
2626 TEST_TYPE_SIZE (PULARGE_INTEGER, 8)
2627 TEST_TYPE_ALIGN (PULARGE_INTEGER, 8)
2630 static void test_pack_PVECTORED_EXCEPTION_HANDLER(void)
2632 /* PVECTORED_EXCEPTION_HANDLER */
2633 TEST_TYPE_SIZE (PVECTORED_EXCEPTION_HANDLER, 8)
2634 TEST_TYPE_ALIGN (PVECTORED_EXCEPTION_HANDLER, 8)
2637 static void test_pack_PVOID(void)
2640 TEST_TYPE_SIZE (PVOID, 8)
2641 TEST_TYPE_ALIGN (PVOID, 8)
2644 static void test_pack_PWCH(void)
2647 TEST_TYPE_SIZE (PWCH, 8)
2648 TEST_TYPE_ALIGN (PWCH, 8)
2649 TEST_TARGET_SIZE (PWCH, 2)
2650 TEST_TARGET_ALIGN(PWCH, 2)
2653 static void test_pack_PWSTR(void)
2656 TEST_TYPE_SIZE (PWSTR, 8)
2657 TEST_TYPE_ALIGN (PWSTR, 8)
2658 TEST_TARGET_SIZE (PWSTR, 2)
2659 TEST_TARGET_ALIGN(PWSTR, 2)
2662 static void test_pack_RTL_CRITICAL_SECTION(void)
2664 /* RTL_CRITICAL_SECTION */
2665 TEST_TYPE_SIZE (RTL_CRITICAL_SECTION, 40)
2666 TEST_TYPE_ALIGN (RTL_CRITICAL_SECTION, 8)
2667 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, DebugInfo, 8)
2668 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, DebugInfo, 8)
2669 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, DebugInfo, 0)
2670 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, LockCount, 4)
2671 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, LockCount, 4)
2672 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, LockCount, 8)
2673 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, RecursionCount, 4)
2674 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, RecursionCount, 4)
2675 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, RecursionCount, 12)
2676 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, OwningThread, 8)
2677 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, OwningThread, 8)
2678 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, OwningThread, 16)
2679 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, LockSemaphore, 8)
2680 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, LockSemaphore, 8)
2681 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, LockSemaphore, 24)
2682 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, SpinCount, 8)
2683 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, SpinCount, 8)
2684 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, SpinCount, 32)
2687 static void test_pack_RTL_CRITICAL_SECTION_DEBUG(void)
2689 /* RTL_CRITICAL_SECTION_DEBUG */
2690 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, Type, 2)
2691 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, Type, 2)
2692 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, Type, 0)
2693 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, CreatorBackTraceIndex, 2)
2694 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, CreatorBackTraceIndex, 2)
2695 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, CreatorBackTraceIndex, 2)
2696 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, CriticalSection, 8)
2697 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, CriticalSection, 8)
2698 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, CriticalSection, 8)
2699 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, ProcessLocksList, 16)
2700 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, ProcessLocksList, 8)
2701 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, ProcessLocksList, 16)
2702 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, EntryCount, 4)
2703 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, EntryCount, 4)
2704 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, EntryCount, 32)
2705 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, ContentionCount, 4)
2706 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, ContentionCount, 4)
2707 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, ContentionCount, 36)
2710 static void test_pack_RTL_OSVERSIONINFOEXW(void)
2712 /* RTL_OSVERSIONINFOEXW */
2713 TEST_TYPE_SIZE (RTL_OSVERSIONINFOEXW, 284)
2714 TEST_TYPE_ALIGN (RTL_OSVERSIONINFOEXW, 4)
2715 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwOSVersionInfoSize, 4)
2716 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwOSVersionInfoSize, 4)
2717 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwOSVersionInfoSize, 0)
2718 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwMajorVersion, 4)
2719 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwMajorVersion, 4)
2720 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwMajorVersion, 4)
2721 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwMinorVersion, 4)
2722 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwMinorVersion, 4)
2723 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwMinorVersion, 8)
2724 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwBuildNumber, 4)
2725 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwBuildNumber, 4)
2726 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwBuildNumber, 12)
2727 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwPlatformId, 4)
2728 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwPlatformId, 4)
2729 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwPlatformId, 16)
2730 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, szCSDVersion, 256)
2731 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, szCSDVersion, 2)
2732 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, szCSDVersion, 20)
2733 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wServicePackMajor, 2)
2734 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wServicePackMajor, 2)
2735 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wServicePackMajor, 276)
2736 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wServicePackMinor, 2)
2737 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wServicePackMinor, 2)
2738 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wServicePackMinor, 278)
2739 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wSuiteMask, 2)
2740 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wSuiteMask, 2)
2741 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wSuiteMask, 280)
2742 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wProductType, 1)
2743 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wProductType, 1)
2744 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wProductType, 282)
2745 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wReserved, 1)
2746 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wReserved, 1)
2747 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wReserved, 283)
2750 static void test_pack_RTL_OSVERSIONINFOW(void)
2752 /* RTL_OSVERSIONINFOW */
2753 TEST_TYPE_SIZE (RTL_OSVERSIONINFOW, 276)
2754 TEST_TYPE_ALIGN (RTL_OSVERSIONINFOW, 4)
2755 TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwOSVersionInfoSize, 4)
2756 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwOSVersionInfoSize, 4)
2757 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwOSVersionInfoSize, 0)
2758 TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwMajorVersion, 4)
2759 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwMajorVersion, 4)
2760 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwMajorVersion, 4)
2761 TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwMinorVersion, 4)
2762 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwMinorVersion, 4)
2763 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwMinorVersion, 8)
2764 TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwBuildNumber, 4)
2765 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwBuildNumber, 4)
2766 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwBuildNumber, 12)
2767 TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwPlatformId, 4)
2768 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwPlatformId, 4)
2769 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwPlatformId, 16)
2770 TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, szCSDVersion, 256)
2771 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, szCSDVersion, 2)
2772 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, szCSDVersion, 20)
2775 static void test_pack_RTL_RESOURCE_DEBUG(void)
2777 /* RTL_RESOURCE_DEBUG */
2778 TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, Type, 2)
2779 TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, Type, 2)
2780 TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, Type, 0)
2781 TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, CreatorBackTraceIndex, 2)
2782 TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, CreatorBackTraceIndex, 2)
2783 TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, CreatorBackTraceIndex, 2)
2784 TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, CriticalSection, 8)
2785 TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, CriticalSection, 8)
2786 TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, CriticalSection, 8)
2787 TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, ProcessLocksList, 16)
2788 TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, ProcessLocksList, 8)
2789 TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, ProcessLocksList, 16)
2790 TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, EntryCount, 4)
2791 TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, EntryCount, 4)
2792 TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, EntryCount, 32)
2793 TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, ContentionCount, 4)
2794 TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, ContentionCount, 4)
2795 TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, ContentionCount, 36)
2798 static void test_pack_SECURITY_CONTEXT_TRACKING_MODE(void)
2800 /* SECURITY_CONTEXT_TRACKING_MODE */
2801 TEST_TYPE_SIZE (SECURITY_CONTEXT_TRACKING_MODE, 1)
2802 TEST_TYPE_ALIGN (SECURITY_CONTEXT_TRACKING_MODE, 1)
2805 static void test_pack_SECURITY_DESCRIPTOR(void)
2807 /* SECURITY_DESCRIPTOR */
2808 TEST_TYPE_SIZE (SECURITY_DESCRIPTOR, 40)
2809 TEST_TYPE_ALIGN (SECURITY_DESCRIPTOR, 8)
2810 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Revision, 1)
2811 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Revision, 1)
2812 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Revision, 0)
2813 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Sbz1, 1)
2814 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Sbz1, 1)
2815 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Sbz1, 1)
2816 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Control, 2)
2817 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Control, 2)
2818 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Control, 2)
2819 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Owner, 8)
2820 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Owner, 8)
2821 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Owner, 8)
2822 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Group, 8)
2823 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Group, 8)
2824 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Group, 16)
2825 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Sacl, 8)
2826 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Sacl, 8)
2827 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Sacl, 24)
2828 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Dacl, 8)
2829 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Dacl, 8)
2830 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Dacl, 32)
2833 static void test_pack_SECURITY_DESCRIPTOR_CONTROL(void)
2835 /* SECURITY_DESCRIPTOR_CONTROL */
2836 TEST_TYPE_SIZE (SECURITY_DESCRIPTOR_CONTROL, 2)
2837 TEST_TYPE_ALIGN (SECURITY_DESCRIPTOR_CONTROL, 2)
2838 TEST_TYPE_UNSIGNED(SECURITY_DESCRIPTOR_CONTROL)
2841 static void test_pack_SECURITY_DESCRIPTOR_RELATIVE(void)
2843 /* SECURITY_DESCRIPTOR_RELATIVE */
2844 TEST_TYPE_SIZE (SECURITY_DESCRIPTOR_RELATIVE, 20)
2845 TEST_TYPE_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, 4)
2846 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Revision, 1)
2847 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Revision, 1)
2848 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Revision, 0)
2849 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Sbz1, 1)
2850 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Sbz1, 1)
2851 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Sbz1, 1)
2852 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Control, 2)
2853 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Control, 2)
2854 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Control, 2)
2855 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Owner, 4)
2856 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Owner, 4)
2857 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Owner, 4)
2858 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Group, 4)
2859 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Group, 4)
2860 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Group, 8)
2861 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Sacl, 4)
2862 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Sacl, 4)
2863 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Sacl, 12)
2864 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Dacl, 4)
2865 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Dacl, 4)
2866 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Dacl, 16)
2869 static void test_pack_SECURITY_INFORMATION(void)
2871 /* SECURITY_INFORMATION */
2872 TEST_TYPE_SIZE (SECURITY_INFORMATION, 4)
2873 TEST_TYPE_ALIGN (SECURITY_INFORMATION, 4)
2874 TEST_TYPE_UNSIGNED(SECURITY_INFORMATION)
2877 static void test_pack_SECURITY_QUALITY_OF_SERVICE(void)
2879 /* SECURITY_QUALITY_OF_SERVICE */
2880 TEST_FIELD_SIZE (SECURITY_QUALITY_OF_SERVICE, Length, 4)
2881 TEST_FIELD_ALIGN (SECURITY_QUALITY_OF_SERVICE, Length, 4)
2882 TEST_FIELD_OFFSET(SECURITY_QUALITY_OF_SERVICE, Length, 0)
2885 static void test_pack_SHORT(void)
2888 TEST_TYPE_SIZE (SHORT, 2)
2889 TEST_TYPE_ALIGN (SHORT, 2)
2890 TEST_TYPE_SIGNED(SHORT)
2893 static void test_pack_SID(void)
2896 TEST_TYPE_SIZE (SID, 12)
2897 TEST_TYPE_ALIGN (SID, 4)
2898 TEST_FIELD_SIZE (SID, Revision, 1)
2899 TEST_FIELD_ALIGN (SID, Revision, 1)
2900 TEST_FIELD_OFFSET(SID, Revision, 0)
2901 TEST_FIELD_SIZE (SID, SubAuthorityCount, 1)
2902 TEST_FIELD_ALIGN (SID, SubAuthorityCount, 1)
2903 TEST_FIELD_OFFSET(SID, SubAuthorityCount, 1)
2904 TEST_FIELD_SIZE (SID, IdentifierAuthority, 6)
2905 TEST_FIELD_ALIGN (SID, IdentifierAuthority, 1)
2906 TEST_FIELD_OFFSET(SID, IdentifierAuthority, 2)
2907 TEST_FIELD_SIZE (SID, SubAuthority, 4)
2908 TEST_FIELD_ALIGN (SID, SubAuthority, 4)
2909 TEST_FIELD_OFFSET(SID, SubAuthority, 8)
2912 static void test_pack_SID_AND_ATTRIBUTES(void)
2914 /* SID_AND_ATTRIBUTES */
2915 TEST_TYPE_SIZE (SID_AND_ATTRIBUTES, 16)
2916 TEST_TYPE_ALIGN (SID_AND_ATTRIBUTES, 8)
2917 TEST_FIELD_SIZE (SID_AND_ATTRIBUTES, Sid, 8)
2918 TEST_FIELD_ALIGN (SID_AND_ATTRIBUTES, Sid, 8)
2919 TEST_FIELD_OFFSET(SID_AND_ATTRIBUTES, Sid, 0)
2920 TEST_FIELD_SIZE (SID_AND_ATTRIBUTES, Attributes, 4)
2921 TEST_FIELD_ALIGN (SID_AND_ATTRIBUTES, Attributes, 4)
2922 TEST_FIELD_OFFSET(SID_AND_ATTRIBUTES, Attributes, 8)
2925 static void test_pack_SID_IDENTIFIER_AUTHORITY(void)
2927 /* SID_IDENTIFIER_AUTHORITY */
2928 TEST_TYPE_SIZE (SID_IDENTIFIER_AUTHORITY, 6)
2929 TEST_TYPE_ALIGN (SID_IDENTIFIER_AUTHORITY, 1)
2930 TEST_FIELD_SIZE (SID_IDENTIFIER_AUTHORITY, Value, 6)
2931 TEST_FIELD_ALIGN (SID_IDENTIFIER_AUTHORITY, Value, 1)
2932 TEST_FIELD_OFFSET(SID_IDENTIFIER_AUTHORITY, Value, 0)
2935 static void test_pack_SINGLE_LIST_ENTRY(void)
2937 /* SINGLE_LIST_ENTRY */
2938 TEST_TYPE_SIZE (SINGLE_LIST_ENTRY, 8)
2939 TEST_TYPE_ALIGN (SINGLE_LIST_ENTRY, 8)
2940 TEST_FIELD_SIZE (SINGLE_LIST_ENTRY, Next, 8)
2941 TEST_FIELD_ALIGN (SINGLE_LIST_ENTRY, Next, 8)
2942 TEST_FIELD_OFFSET(SINGLE_LIST_ENTRY, Next, 0)
2945 static void test_pack_SYSTEM_ALARM_ACE(void)
2947 /* SYSTEM_ALARM_ACE */
2948 TEST_TYPE_SIZE (SYSTEM_ALARM_ACE, 12)
2949 TEST_TYPE_ALIGN (SYSTEM_ALARM_ACE, 4)
2950 TEST_FIELD_SIZE (SYSTEM_ALARM_ACE, Header, 4)
2951 TEST_FIELD_ALIGN (SYSTEM_ALARM_ACE, Header, 2)
2952 TEST_FIELD_OFFSET(SYSTEM_ALARM_ACE, Header, 0)
2953 TEST_FIELD_SIZE (SYSTEM_ALARM_ACE, Mask, 4)
2954 TEST_FIELD_ALIGN (SYSTEM_ALARM_ACE, Mask, 4)
2955 TEST_FIELD_OFFSET(SYSTEM_ALARM_ACE, Mask, 4)
2956 TEST_FIELD_SIZE (SYSTEM_ALARM_ACE, SidStart, 4)
2957 TEST_FIELD_ALIGN (SYSTEM_ALARM_ACE, SidStart, 4)
2958 TEST_FIELD_OFFSET(SYSTEM_ALARM_ACE, SidStart, 8)
2961 static void test_pack_SYSTEM_AUDIT_ACE(void)
2963 /* SYSTEM_AUDIT_ACE */
2964 TEST_TYPE_SIZE (SYSTEM_AUDIT_ACE, 12)
2965 TEST_TYPE_ALIGN (SYSTEM_AUDIT_ACE, 4)
2966 TEST_FIELD_SIZE (SYSTEM_AUDIT_ACE, Header, 4)
2967 TEST_FIELD_ALIGN (SYSTEM_AUDIT_ACE, Header, 2)
2968 TEST_FIELD_OFFSET(SYSTEM_AUDIT_ACE, Header, 0)
2969 TEST_FIELD_SIZE (SYSTEM_AUDIT_ACE, Mask, 4)
2970 TEST_FIELD_ALIGN (SYSTEM_AUDIT_ACE, Mask, 4)
2971 TEST_FIELD_OFFSET(SYSTEM_AUDIT_ACE, Mask, 4)
2972 TEST_FIELD_SIZE (SYSTEM_AUDIT_ACE, SidStart, 4)
2973 TEST_FIELD_ALIGN (SYSTEM_AUDIT_ACE, SidStart, 4)
2974 TEST_FIELD_OFFSET(SYSTEM_AUDIT_ACE, SidStart, 8)
2977 static void test_pack_TCHAR(void)
2980 TEST_TYPE_SIZE (TCHAR, 1)
2981 TEST_TYPE_ALIGN (TCHAR, 1)
2984 static void test_pack_TOKEN_DEFAULT_DACL(void)
2986 /* TOKEN_DEFAULT_DACL */
2987 TEST_TYPE_SIZE (TOKEN_DEFAULT_DACL, 8)
2988 TEST_TYPE_ALIGN (TOKEN_DEFAULT_DACL, 8)
2989 TEST_FIELD_SIZE (TOKEN_DEFAULT_DACL, DefaultDacl, 8)
2990 TEST_FIELD_ALIGN (TOKEN_DEFAULT_DACL, DefaultDacl, 8)
2991 TEST_FIELD_OFFSET(TOKEN_DEFAULT_DACL, DefaultDacl, 0)
2994 static void test_pack_TOKEN_GROUPS(void)
2997 TEST_TYPE_SIZE (TOKEN_GROUPS, 24)
2998 TEST_TYPE_ALIGN (TOKEN_GROUPS, 8)
2999 TEST_FIELD_SIZE (TOKEN_GROUPS, GroupCount, 4)
3000 TEST_FIELD_ALIGN (TOKEN_GROUPS, GroupCount, 4)
3001 TEST_FIELD_OFFSET(TOKEN_GROUPS, GroupCount, 0)
3002 TEST_FIELD_SIZE (TOKEN_GROUPS, Groups, 16)
3003 TEST_FIELD_ALIGN (TOKEN_GROUPS, Groups, 8)
3004 TEST_FIELD_OFFSET(TOKEN_GROUPS, Groups, 8)
3007 static void test_pack_TOKEN_OWNER(void)
3010 TEST_TYPE_SIZE (TOKEN_OWNER, 8)
3011 TEST_TYPE_ALIGN (TOKEN_OWNER, 8)
3012 TEST_FIELD_SIZE (TOKEN_OWNER, Owner, 8)
3013 TEST_FIELD_ALIGN (TOKEN_OWNER, Owner, 8)
3014 TEST_FIELD_OFFSET(TOKEN_OWNER, Owner, 0)
3017 static void test_pack_TOKEN_PRIMARY_GROUP(void)
3019 /* TOKEN_PRIMARY_GROUP */
3020 TEST_TYPE_SIZE (TOKEN_PRIMARY_GROUP, 8)
3021 TEST_TYPE_ALIGN (TOKEN_PRIMARY_GROUP, 8)
3022 TEST_FIELD_SIZE (TOKEN_PRIMARY_GROUP, PrimaryGroup, 8)
3023 TEST_FIELD_ALIGN (TOKEN_PRIMARY_GROUP, PrimaryGroup, 8)
3024 TEST_FIELD_OFFSET(TOKEN_PRIMARY_GROUP, PrimaryGroup, 0)
3027 static void test_pack_TOKEN_PRIVILEGES(void)
3029 /* TOKEN_PRIVILEGES */
3030 TEST_TYPE_SIZE (TOKEN_PRIVILEGES, 16)
3031 TEST_TYPE_ALIGN (TOKEN_PRIVILEGES, 4)
3032 TEST_FIELD_SIZE (TOKEN_PRIVILEGES, PrivilegeCount, 4)
3033 TEST_FIELD_ALIGN (TOKEN_PRIVILEGES, PrivilegeCount, 4)
3034 TEST_FIELD_OFFSET(TOKEN_PRIVILEGES, PrivilegeCount, 0)
3035 TEST_FIELD_SIZE (TOKEN_PRIVILEGES, Privileges, 12)
3036 TEST_FIELD_ALIGN (TOKEN_PRIVILEGES, Privileges, 4)
3037 TEST_FIELD_OFFSET(TOKEN_PRIVILEGES, Privileges, 4)
3040 static void test_pack_TOKEN_SOURCE(void)
3043 TEST_TYPE_SIZE (TOKEN_SOURCE, 16)
3044 TEST_TYPE_ALIGN (TOKEN_SOURCE, 4)
3045 TEST_FIELD_SIZE (TOKEN_SOURCE, SourceName, 8)
3046 TEST_FIELD_ALIGN (TOKEN_SOURCE, SourceName, 1)
3047 TEST_FIELD_OFFSET(TOKEN_SOURCE, SourceName, 0)
3048 TEST_FIELD_SIZE (TOKEN_SOURCE, SourceIdentifier, 8)
3049 TEST_FIELD_ALIGN (TOKEN_SOURCE, SourceIdentifier, 4)
3050 TEST_FIELD_OFFSET(TOKEN_SOURCE, SourceIdentifier, 8)
3053 static void test_pack_TOKEN_STATISTICS(void)
3055 /* TOKEN_STATISTICS (pack 4) */
3056 TEST_FIELD_SIZE (TOKEN_STATISTICS, TokenId, 8)
3057 TEST_FIELD_ALIGN (TOKEN_STATISTICS, TokenId, 4)
3058 TEST_FIELD_OFFSET(TOKEN_STATISTICS, TokenId, 0)
3059 TEST_FIELD_SIZE (TOKEN_STATISTICS, AuthenticationId, 8)
3060 TEST_FIELD_ALIGN (TOKEN_STATISTICS, AuthenticationId, 4)
3061 TEST_FIELD_OFFSET(TOKEN_STATISTICS, AuthenticationId, 8)
3062 TEST_FIELD_SIZE (TOKEN_STATISTICS, ExpirationTime, 8)
3063 TEST_FIELD_ALIGN (TOKEN_STATISTICS, ExpirationTime, 4)
3064 TEST_FIELD_OFFSET(TOKEN_STATISTICS, ExpirationTime, 16)
3067 static void test_pack_TOKEN_USER(void)
3070 TEST_TYPE_SIZE (TOKEN_USER, 16)
3071 TEST_TYPE_ALIGN (TOKEN_USER, 8)
3072 TEST_FIELD_SIZE (TOKEN_USER, User, 16)
3073 TEST_FIELD_ALIGN (TOKEN_USER, User, 8)
3074 TEST_FIELD_OFFSET(TOKEN_USER, User, 0)
3077 static void test_pack_ULARGE_INTEGER(void)
3079 /* ULARGE_INTEGER */
3082 static void test_pack_ULONGLONG(void)
3085 TEST_TYPE_SIZE (ULONGLONG, 8)
3086 TEST_TYPE_ALIGN (ULONGLONG, 8)
3087 TEST_TYPE_UNSIGNED(ULONGLONG)
3090 static void test_pack_WAITORTIMERCALLBACKFUNC(void)
3092 /* WAITORTIMERCALLBACKFUNC */
3093 TEST_TYPE_SIZE (WAITORTIMERCALLBACKFUNC, 8)
3094 TEST_TYPE_ALIGN (WAITORTIMERCALLBACKFUNC, 8)
3097 static void test_pack_WCHAR(void)
3100 TEST_TYPE_SIZE (WCHAR, 2)
3101 TEST_TYPE_ALIGN (WCHAR, 2)
3102 TEST_TYPE_UNSIGNED(WCHAR)
3105 static void test_pack_ATOM(void)
3108 TEST_TYPE_SIZE (ATOM, 2)
3109 TEST_TYPE_ALIGN (ATOM, 2)
3110 TEST_TYPE_UNSIGNED(ATOM)
3113 static void test_pack_BOOL(void)
3116 TEST_TYPE_SIZE (BOOL, 4)
3117 TEST_TYPE_ALIGN (BOOL, 4)
3118 TEST_TYPE_SIGNED(BOOL)
3121 static void test_pack_BYTE(void)
3124 TEST_TYPE_SIZE (BYTE, 1)
3125 TEST_TYPE_ALIGN (BYTE, 1)
3126 TEST_TYPE_UNSIGNED(BYTE)
3129 static void test_pack_COLORREF(void)
3132 TEST_TYPE_SIZE (COLORREF, 4)
3133 TEST_TYPE_ALIGN (COLORREF, 4)
3134 TEST_TYPE_UNSIGNED(COLORREF)
3137 static void test_pack_DWORD(void)
3140 TEST_TYPE_SIZE (DWORD, 4)
3141 TEST_TYPE_ALIGN (DWORD, 4)
3142 TEST_TYPE_UNSIGNED(DWORD)
3145 static void test_pack_FARPROC(void)
3148 TEST_TYPE_SIZE (FARPROC, 8)
3149 TEST_TYPE_ALIGN (FARPROC, 8)
3152 static void test_pack_FLOAT(void)
3155 TEST_TYPE_SIZE (FLOAT, 4)
3156 TEST_TYPE_ALIGN (FLOAT, 4)
3159 static void test_pack_GLOBALHANDLE(void)
3162 TEST_TYPE_SIZE (GLOBALHANDLE, 8)
3163 TEST_TYPE_ALIGN (GLOBALHANDLE, 8)
3166 static void test_pack_HCURSOR(void)
3169 TEST_TYPE_SIZE (HCURSOR, 8)
3170 TEST_TYPE_ALIGN (HCURSOR, 8)
3173 static void test_pack_HFILE(void)
3176 TEST_TYPE_SIZE (HFILE, 4)
3177 TEST_TYPE_ALIGN (HFILE, 4)
3178 TEST_TYPE_SIGNED(HFILE)
3181 static void test_pack_HGDIOBJ(void)
3184 TEST_TYPE_SIZE (HGDIOBJ, 8)
3185 TEST_TYPE_ALIGN (HGDIOBJ, 8)
3188 static void test_pack_HGLOBAL(void)
3191 TEST_TYPE_SIZE (HGLOBAL, 8)
3192 TEST_TYPE_ALIGN (HGLOBAL, 8)
3195 static void test_pack_HLOCAL(void)
3198 TEST_TYPE_SIZE (HLOCAL, 8)
3199 TEST_TYPE_ALIGN (HLOCAL, 8)
3202 static void test_pack_HMODULE(void)
3205 TEST_TYPE_SIZE (HMODULE, 8)
3206 TEST_TYPE_ALIGN (HMODULE, 8)
3209 static void test_pack_INT(void)
3212 TEST_TYPE_SIZE (INT, 4)
3213 TEST_TYPE_ALIGN (INT, 4)
3214 TEST_TYPE_SIGNED(INT)
3217 static void test_pack_LOCALHANDLE(void)
3220 TEST_TYPE_SIZE (LOCALHANDLE, 8)
3221 TEST_TYPE_ALIGN (LOCALHANDLE, 8)
3224 static void test_pack_LPARAM(void)
3227 TEST_TYPE_SIZE (LPARAM, 8)
3228 TEST_TYPE_ALIGN (LPARAM, 8)
3231 static void test_pack_LPCRECT(void)
3234 TEST_TYPE_SIZE (LPCRECT, 8)
3235 TEST_TYPE_ALIGN (LPCRECT, 8)
3236 TEST_TARGET_SIZE (LPCRECT, 16)
3237 TEST_TARGET_ALIGN(LPCRECT, 4)
3240 static void test_pack_LPCRECTL(void)
3243 TEST_TYPE_SIZE (LPCRECTL, 8)
3244 TEST_TYPE_ALIGN (LPCRECTL, 8)
3245 TEST_TARGET_SIZE (LPCRECTL, 16)
3246 TEST_TARGET_ALIGN(LPCRECTL, 4)
3249 static void test_pack_LPCVOID(void)
3252 TEST_TYPE_SIZE (LPCVOID, 8)
3253 TEST_TYPE_ALIGN (LPCVOID, 8)
3256 static void test_pack_LPPOINT(void)
3259 TEST_TYPE_SIZE (LPPOINT, 8)
3260 TEST_TYPE_ALIGN (LPPOINT, 8)
3261 TEST_TARGET_SIZE (LPPOINT, 8)
3262 TEST_TARGET_ALIGN(LPPOINT, 4)
3265 static void test_pack_LPRECT(void)
3268 TEST_TYPE_SIZE (LPRECT, 8)
3269 TEST_TYPE_ALIGN (LPRECT, 8)
3270 TEST_TARGET_SIZE (LPRECT, 16)
3271 TEST_TARGET_ALIGN(LPRECT, 4)
3274 static void test_pack_LPRECTL(void)
3277 TEST_TYPE_SIZE (LPRECTL, 8)
3278 TEST_TYPE_ALIGN (LPRECTL, 8)
3279 TEST_TARGET_SIZE (LPRECTL, 16)
3280 TEST_TARGET_ALIGN(LPRECTL, 4)
3283 static void test_pack_LPSIZE(void)
3286 TEST_TYPE_SIZE (LPSIZE, 8)
3287 TEST_TYPE_ALIGN (LPSIZE, 8)
3288 TEST_TARGET_SIZE (LPSIZE, 8)
3289 TEST_TARGET_ALIGN(LPSIZE, 4)
3292 static void test_pack_LRESULT(void)
3295 TEST_TYPE_SIZE (LRESULT, 8)
3296 TEST_TYPE_ALIGN (LRESULT, 8)
3299 static void test_pack_POINT(void)
3302 TEST_TYPE_SIZE (POINT, 8)
3303 TEST_TYPE_ALIGN (POINT, 4)
3304 TEST_FIELD_SIZE (POINT, x, 4)
3305 TEST_FIELD_ALIGN (POINT, x, 4)
3306 TEST_FIELD_OFFSET(POINT, x, 0)
3307 TEST_FIELD_SIZE (POINT, y, 4)
3308 TEST_FIELD_ALIGN (POINT, y, 4)
3309 TEST_FIELD_OFFSET(POINT, y, 4)
3312 static void test_pack_POINTL(void)
3315 TEST_TYPE_SIZE (POINTL, 8)
3316 TEST_TYPE_ALIGN (POINTL, 4)
3317 TEST_FIELD_SIZE (POINTL, x, 4)
3318 TEST_FIELD_ALIGN (POINTL, x, 4)
3319 TEST_FIELD_OFFSET(POINTL, x, 0)
3320 TEST_FIELD_SIZE (POINTL, y, 4)
3321 TEST_FIELD_ALIGN (POINTL, y, 4)
3322 TEST_FIELD_OFFSET(POINTL, y, 4)
3325 static void test_pack_PPOINT(void)
3328 TEST_TYPE_SIZE (PPOINT, 8)
3329 TEST_TYPE_ALIGN (PPOINT, 8)
3330 TEST_TARGET_SIZE (PPOINT, 8)
3331 TEST_TARGET_ALIGN(PPOINT, 4)
3334 static void test_pack_PPOINTL(void)
3337 TEST_TYPE_SIZE (PPOINTL, 8)
3338 TEST_TYPE_ALIGN (PPOINTL, 8)
3339 TEST_TARGET_SIZE (PPOINTL, 8)
3340 TEST_TARGET_ALIGN(PPOINTL, 4)
3343 static void test_pack_PRECT(void)
3346 TEST_TYPE_SIZE (PRECT, 8)
3347 TEST_TYPE_ALIGN (PRECT, 8)
3348 TEST_TARGET_SIZE (PRECT, 16)
3349 TEST_TARGET_ALIGN(PRECT, 4)
3352 static void test_pack_PRECTL(void)
3355 TEST_TYPE_SIZE (PRECTL, 8)
3356 TEST_TYPE_ALIGN (PRECTL, 8)
3357 TEST_TARGET_SIZE (PRECTL, 16)
3358 TEST_TARGET_ALIGN(PRECTL, 4)
3361 static void test_pack_PROC(void)
3364 TEST_TYPE_SIZE (PROC, 8)
3365 TEST_TYPE_ALIGN (PROC, 8)
3368 static void test_pack_PSIZE(void)
3371 TEST_TYPE_SIZE (PSIZE, 8)
3372 TEST_TYPE_ALIGN (PSIZE, 8)
3373 TEST_TARGET_SIZE (PSIZE, 8)
3374 TEST_TARGET_ALIGN(PSIZE, 4)
3377 static void test_pack_PSZ(void)
3380 TEST_TYPE_SIZE (PSZ, 8)
3381 TEST_TYPE_ALIGN (PSZ, 8)
3384 static void test_pack_RECT(void)
3387 TEST_TYPE_SIZE (RECT, 16)
3388 TEST_TYPE_ALIGN (RECT, 4)
3389 TEST_FIELD_SIZE (RECT, left, 4)
3390 TEST_FIELD_ALIGN (RECT, left, 4)
3391 TEST_FIELD_OFFSET(RECT, left, 0)
3392 TEST_FIELD_SIZE (RECT, top, 4)
3393 TEST_FIELD_ALIGN (RECT, top, 4)
3394 TEST_FIELD_OFFSET(RECT, top, 4)
3395 TEST_FIELD_SIZE (RECT, right, 4)
3396 TEST_FIELD_ALIGN (RECT, right, 4)
3397 TEST_FIELD_OFFSET(RECT, right, 8)
3398 TEST_FIELD_SIZE (RECT, bottom, 4)
3399 TEST_FIELD_ALIGN (RECT, bottom, 4)
3400 TEST_FIELD_OFFSET(RECT, bottom, 12)
3403 static void test_pack_RECTL(void)
3406 TEST_TYPE_SIZE (RECTL, 16)
3407 TEST_TYPE_ALIGN (RECTL, 4)
3408 TEST_FIELD_SIZE (RECTL, left, 4)
3409 TEST_FIELD_ALIGN (RECTL, left, 4)
3410 TEST_FIELD_OFFSET(RECTL, left, 0)
3411 TEST_FIELD_SIZE (RECTL, top, 4)
3412 TEST_FIELD_ALIGN (RECTL, top, 4)
3413 TEST_FIELD_OFFSET(RECTL, top, 4)
3414 TEST_FIELD_SIZE (RECTL, right, 4)
3415 TEST_FIELD_ALIGN (RECTL, right, 4)
3416 TEST_FIELD_OFFSET(RECTL, right, 8)
3417 TEST_FIELD_SIZE (RECTL, bottom, 4)
3418 TEST_FIELD_ALIGN (RECTL, bottom, 4)
3419 TEST_FIELD_OFFSET(RECTL, bottom, 12)
3422 static void test_pack_SIZE(void)
3425 TEST_TYPE_SIZE (SIZE, 8)
3426 TEST_TYPE_ALIGN (SIZE, 4)
3427 TEST_FIELD_SIZE (SIZE, cx, 4)
3428 TEST_FIELD_ALIGN (SIZE, cx, 4)
3429 TEST_FIELD_OFFSET(SIZE, cx, 0)
3430 TEST_FIELD_SIZE (SIZE, cy, 4)
3431 TEST_FIELD_ALIGN (SIZE, cy, 4)
3432 TEST_FIELD_OFFSET(SIZE, cy, 4)
3435 static void test_pack_SIZEL(void)
3438 TEST_TYPE_SIZE (SIZEL, 8)
3439 TEST_TYPE_ALIGN (SIZEL, 4)
3442 static void test_pack_UCHAR(void)
3445 TEST_TYPE_SIZE (UCHAR, 1)
3446 TEST_TYPE_ALIGN (UCHAR, 1)
3447 TEST_TYPE_UNSIGNED(UCHAR)
3450 static void test_pack_UINT(void)
3453 TEST_TYPE_SIZE (UINT, 4)
3454 TEST_TYPE_ALIGN (UINT, 4)
3455 TEST_TYPE_UNSIGNED(UINT)
3458 static void test_pack_ULONG(void)
3461 TEST_TYPE_SIZE (ULONG, 4)
3462 TEST_TYPE_ALIGN (ULONG, 4)
3463 TEST_TYPE_UNSIGNED(ULONG)
3466 static void test_pack_USHORT(void)
3469 TEST_TYPE_SIZE (USHORT, 2)
3470 TEST_TYPE_ALIGN (USHORT, 2)
3471 TEST_TYPE_UNSIGNED(USHORT)
3474 static void test_pack_WORD(void)
3477 TEST_TYPE_SIZE (WORD, 2)
3478 TEST_TYPE_ALIGN (WORD, 2)
3479 TEST_TYPE_UNSIGNED(WORD)
3482 static void test_pack_WPARAM(void)
3485 TEST_TYPE_SIZE (WPARAM, 8)
3486 TEST_TYPE_ALIGN (WPARAM, 8)
3491 static void test_pack_DWORD32(void)
3494 TEST_TYPE_SIZE (DWORD32, 4)
3495 TEST_TYPE_ALIGN (DWORD32, 4)
3496 TEST_TYPE_UNSIGNED(DWORD32)
3499 static void test_pack_DWORD64(void)
3502 TEST_TYPE_SIZE (DWORD64, 8)
3503 TEST_TYPE_ALIGN (DWORD64, 8)
3504 TEST_TYPE_UNSIGNED(DWORD64)
3507 static void test_pack_DWORD_PTR(void)
3510 TEST_TYPE_SIZE (DWORD_PTR, 4)
3511 TEST_TYPE_ALIGN (DWORD_PTR, 4)
3514 static void test_pack_HALF_PTR(void)
3517 TEST_TYPE_SIZE (HALF_PTR, 2)
3518 TEST_TYPE_ALIGN (HALF_PTR, 2)
3519 TEST_TYPE_SIGNED(HALF_PTR)
3522 static void test_pack_INT16(void)
3525 TEST_TYPE_SIZE (INT16, 2)
3526 TEST_TYPE_ALIGN (INT16, 2)
3527 TEST_TYPE_SIGNED(INT16)
3530 static void test_pack_INT32(void)
3533 TEST_TYPE_SIZE (INT32, 4)
3534 TEST_TYPE_ALIGN (INT32, 4)
3535 TEST_TYPE_SIGNED(INT32)
3538 static void test_pack_INT64(void)
3541 TEST_TYPE_SIZE (INT64, 8)
3542 TEST_TYPE_ALIGN (INT64, 8)
3543 TEST_TYPE_SIGNED(INT64)
3546 static void test_pack_INT8(void)
3549 TEST_TYPE_SIZE (INT8, 1)
3550 TEST_TYPE_ALIGN (INT8, 1)
3551 TEST_TYPE_SIGNED(INT8)
3554 static void test_pack_INT_PTR(void)
3557 TEST_TYPE_SIZE (INT_PTR, 4)
3558 TEST_TYPE_ALIGN (INT_PTR, 4)
3559 TEST_TYPE_SIGNED(INT_PTR)
3562 static void test_pack_LONG32(void)
3565 TEST_TYPE_SIZE (LONG32, 4)
3566 TEST_TYPE_ALIGN (LONG32, 4)
3567 TEST_TYPE_SIGNED(LONG32)
3570 static void test_pack_LONG64(void)
3573 TEST_TYPE_SIZE (LONG64, 8)
3574 TEST_TYPE_ALIGN (LONG64, 8)
3575 TEST_TYPE_SIGNED(LONG64)
3578 static void test_pack_LONG_PTR(void)
3581 TEST_TYPE_SIZE (LONG_PTR, 4)
3582 TEST_TYPE_ALIGN (LONG_PTR, 4)
3583 TEST_TYPE_SIGNED(LONG_PTR)
3586 static void test_pack_SIZE_T(void)
3589 TEST_TYPE_SIZE (SIZE_T, 4)
3590 TEST_TYPE_ALIGN (SIZE_T, 4)
3593 static void test_pack_SSIZE_T(void)
3596 TEST_TYPE_SIZE (SSIZE_T, 4)
3597 TEST_TYPE_ALIGN (SSIZE_T, 4)
3600 static void test_pack_UHALF_PTR(void)
3603 TEST_TYPE_SIZE (UHALF_PTR, 2)
3604 TEST_TYPE_ALIGN (UHALF_PTR, 2)
3605 TEST_TYPE_UNSIGNED(UHALF_PTR)
3608 static void test_pack_UINT16(void)
3611 TEST_TYPE_SIZE (UINT16, 2)
3612 TEST_TYPE_ALIGN (UINT16, 2)
3613 TEST_TYPE_UNSIGNED(UINT16)
3616 static void test_pack_UINT32(void)
3619 TEST_TYPE_SIZE (UINT32, 4)
3620 TEST_TYPE_ALIGN (UINT32, 4)
3621 TEST_TYPE_UNSIGNED(UINT32)
3624 static void test_pack_UINT64(void)
3627 TEST_TYPE_SIZE (UINT64, 8)
3628 TEST_TYPE_ALIGN (UINT64, 8)
3629 TEST_TYPE_UNSIGNED(UINT64)
3632 static void test_pack_UINT8(void)
3635 TEST_TYPE_SIZE (UINT8, 1)
3636 TEST_TYPE_ALIGN (UINT8, 1)
3637 TEST_TYPE_UNSIGNED(UINT8)
3640 static void test_pack_UINT_PTR(void)
3643 TEST_TYPE_SIZE (UINT_PTR, 4)
3644 TEST_TYPE_ALIGN (UINT_PTR, 4)
3645 TEST_TYPE_UNSIGNED(UINT_PTR)
3648 static void test_pack_ULONG32(void)
3651 TEST_TYPE_SIZE (ULONG32, 4)
3652 TEST_TYPE_ALIGN (ULONG32, 4)
3653 TEST_TYPE_UNSIGNED(ULONG32)
3656 static void test_pack_ULONG64(void)
3659 TEST_TYPE_SIZE (ULONG64, 8)
3660 TEST_TYPE_ALIGN (ULONG64, 8)
3661 TEST_TYPE_UNSIGNED(ULONG64)
3664 static void test_pack_ULONG_PTR(void)
3667 TEST_TYPE_SIZE (ULONG_PTR, 4)
3668 TEST_TYPE_ALIGN (ULONG_PTR, 4)
3669 TEST_TYPE_UNSIGNED(ULONG_PTR)
3672 static void test_pack_ACCESS_ALLOWED_ACE(void)
3674 /* ACCESS_ALLOWED_ACE */
3675 TEST_TYPE_SIZE (ACCESS_ALLOWED_ACE, 12)
3676 TEST_TYPE_ALIGN (ACCESS_ALLOWED_ACE, 4)
3677 TEST_FIELD_SIZE (ACCESS_ALLOWED_ACE, Header, 4)
3678 TEST_FIELD_ALIGN (ACCESS_ALLOWED_ACE, Header, 2)
3679 TEST_FIELD_OFFSET(ACCESS_ALLOWED_ACE, Header, 0)
3680 TEST_FIELD_SIZE (ACCESS_ALLOWED_ACE, Mask, 4)
3681 TEST_FIELD_ALIGN (ACCESS_ALLOWED_ACE, Mask, 4)
3682 TEST_FIELD_OFFSET(ACCESS_ALLOWED_ACE, Mask, 4)
3683 TEST_FIELD_SIZE (ACCESS_ALLOWED_ACE, SidStart, 4)
3684 TEST_FIELD_ALIGN (ACCESS_ALLOWED_ACE, SidStart, 4)
3685 TEST_FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart, 8)
3688 static void test_pack_ACCESS_DENIED_ACE(void)
3690 /* ACCESS_DENIED_ACE */
3691 TEST_TYPE_SIZE (ACCESS_DENIED_ACE, 12)
3692 TEST_TYPE_ALIGN (ACCESS_DENIED_ACE, 4)
3693 TEST_FIELD_SIZE (ACCESS_DENIED_ACE, Header, 4)
3694 TEST_FIELD_ALIGN (ACCESS_DENIED_ACE, Header, 2)
3695 TEST_FIELD_OFFSET(ACCESS_DENIED_ACE, Header, 0)
3696 TEST_FIELD_SIZE (ACCESS_DENIED_ACE, Mask, 4)
3697 TEST_FIELD_ALIGN (ACCESS_DENIED_ACE, Mask, 4)
3698 TEST_FIELD_OFFSET(ACCESS_DENIED_ACE, Mask, 4)
3699 TEST_FIELD_SIZE (ACCESS_DENIED_ACE, SidStart, 4)
3700 TEST_FIELD_ALIGN (ACCESS_DENIED_ACE, SidStart, 4)
3701 TEST_FIELD_OFFSET(ACCESS_DENIED_ACE, SidStart, 8)
3704 static void test_pack_ACCESS_MASK(void)
3707 TEST_TYPE_SIZE (ACCESS_MASK, 4)
3708 TEST_TYPE_ALIGN (ACCESS_MASK, 4)
3709 TEST_TYPE_UNSIGNED(ACCESS_MASK)
3712 static void test_pack_ACE_HEADER(void)
3715 TEST_TYPE_SIZE (ACE_HEADER, 4)
3716 TEST_TYPE_ALIGN (ACE_HEADER, 2)
3717 TEST_FIELD_SIZE (ACE_HEADER, AceType, 1)
3718 TEST_FIELD_ALIGN (ACE_HEADER, AceType, 1)
3719 TEST_FIELD_OFFSET(ACE_HEADER, AceType, 0)
3720 TEST_FIELD_SIZE (ACE_HEADER, AceFlags, 1)
3721 TEST_FIELD_ALIGN (ACE_HEADER, AceFlags, 1)
3722 TEST_FIELD_OFFSET(ACE_HEADER, AceFlags, 1)
3723 TEST_FIELD_SIZE (ACE_HEADER, AceSize, 2)
3724 TEST_FIELD_ALIGN (ACE_HEADER, AceSize, 2)
3725 TEST_FIELD_OFFSET(ACE_HEADER, AceSize, 2)
3728 static void test_pack_ACL(void)
3731 TEST_TYPE_SIZE (ACL, 8)
3732 TEST_TYPE_ALIGN (ACL, 2)
3733 TEST_FIELD_SIZE (ACL, AclRevision, 1)
3734 TEST_FIELD_ALIGN (ACL, AclRevision, 1)
3735 TEST_FIELD_OFFSET(ACL, AclRevision, 0)
3736 TEST_FIELD_SIZE (ACL, Sbz1, 1)
3737 TEST_FIELD_ALIGN (ACL, Sbz1, 1)
3738 TEST_FIELD_OFFSET(ACL, Sbz1, 1)
3739 TEST_FIELD_SIZE (ACL, AclSize, 2)
3740 TEST_FIELD_ALIGN (ACL, AclSize, 2)
3741 TEST_FIELD_OFFSET(ACL, AclSize, 2)
3742 TEST_FIELD_SIZE (ACL, AceCount, 2)
3743 TEST_FIELD_ALIGN (ACL, AceCount, 2)
3744 TEST_FIELD_OFFSET(ACL, AceCount, 4)
3745 TEST_FIELD_SIZE (ACL, Sbz2, 2)
3746 TEST_FIELD_ALIGN (ACL, Sbz2, 2)
3747 TEST_FIELD_OFFSET(ACL, Sbz2, 6)
3750 static void test_pack_ACL_REVISION_INFORMATION(void)
3752 /* ACL_REVISION_INFORMATION */
3753 TEST_TYPE_SIZE (ACL_REVISION_INFORMATION, 4)
3754 TEST_TYPE_ALIGN (ACL_REVISION_INFORMATION, 4)
3755 TEST_FIELD_SIZE (ACL_REVISION_INFORMATION, AclRevision, 4)
3756 TEST_FIELD_ALIGN (ACL_REVISION_INFORMATION, AclRevision, 4)
3757 TEST_FIELD_OFFSET(ACL_REVISION_INFORMATION, AclRevision, 0)
3760 static void test_pack_ACL_SIZE_INFORMATION(void)
3762 /* ACL_SIZE_INFORMATION */
3763 TEST_TYPE_SIZE (ACL_SIZE_INFORMATION, 12)
3764 TEST_TYPE_ALIGN (ACL_SIZE_INFORMATION, 4)
3765 TEST_FIELD_SIZE (ACL_SIZE_INFORMATION, AceCount, 4)
3766 TEST_FIELD_ALIGN (ACL_SIZE_INFORMATION, AceCount, 4)
3767 TEST_FIELD_OFFSET(ACL_SIZE_INFORMATION, AceCount, 0)
3768 TEST_FIELD_SIZE (ACL_SIZE_INFORMATION, AclBytesInUse, 4)
3769 TEST_FIELD_ALIGN (ACL_SIZE_INFORMATION, AclBytesInUse, 4)
3770 TEST_FIELD_OFFSET(ACL_SIZE_INFORMATION, AclBytesInUse, 4)
3771 TEST_FIELD_SIZE (ACL_SIZE_INFORMATION, AclBytesFree, 4)
3772 TEST_FIELD_ALIGN (ACL_SIZE_INFORMATION, AclBytesFree, 4)
3773 TEST_FIELD_OFFSET(ACL_SIZE_INFORMATION, AclBytesFree, 8)
3776 static void test_pack_BOOLEAN(void)
3779 TEST_TYPE_SIZE (BOOLEAN, 1)
3780 TEST_TYPE_ALIGN (BOOLEAN, 1)
3781 TEST_TYPE_UNSIGNED(BOOLEAN)
3784 static void test_pack_CCHAR(void)
3787 TEST_TYPE_SIZE (CCHAR, 1)
3788 TEST_TYPE_ALIGN (CCHAR, 1)
3789 TEST_TYPE_SIGNED(CCHAR)
3792 static void test_pack_CHAR(void)
3795 TEST_TYPE_SIZE (CHAR, 1)
3796 TEST_TYPE_ALIGN (CHAR, 1)
3797 TEST_TYPE_SIGNED(CHAR)
3800 static void test_pack_DWORDLONG(void)
3803 TEST_TYPE_SIZE (DWORDLONG, 8)
3804 TEST_TYPE_ALIGN (DWORDLONG, 8)
3805 TEST_TYPE_UNSIGNED(DWORDLONG)
3808 static void test_pack_EXCEPTION_POINTERS(void)
3810 /* EXCEPTION_POINTERS */
3811 TEST_TYPE_SIZE (EXCEPTION_POINTERS, 8)
3812 TEST_TYPE_ALIGN (EXCEPTION_POINTERS, 4)
3813 TEST_FIELD_SIZE (EXCEPTION_POINTERS, ExceptionRecord, 4)
3814 TEST_FIELD_ALIGN (EXCEPTION_POINTERS, ExceptionRecord, 4)
3815 TEST_FIELD_OFFSET(EXCEPTION_POINTERS, ExceptionRecord, 0)
3816 TEST_FIELD_SIZE (EXCEPTION_POINTERS, ContextRecord, 4)
3817 TEST_FIELD_ALIGN (EXCEPTION_POINTERS, ContextRecord, 4)
3818 TEST_FIELD_OFFSET(EXCEPTION_POINTERS, ContextRecord, 4)
3821 static void test_pack_EXCEPTION_RECORD(void)
3823 /* EXCEPTION_RECORD */
3824 TEST_TYPE_SIZE (EXCEPTION_RECORD, 80)
3825 TEST_TYPE_ALIGN (EXCEPTION_RECORD, 4)
3826 TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionCode, 4)
3827 TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionCode, 4)
3828 TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionCode, 0)
3829 TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionFlags, 4)
3830 TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionFlags, 4)
3831 TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionFlags, 4)
3832 TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionRecord, 4)
3833 TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionRecord, 4)
3834 TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionRecord, 8)
3835 TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionAddress, 4)
3836 TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionAddress, 4)
3837 TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionAddress, 12)
3838 TEST_FIELD_SIZE (EXCEPTION_RECORD, NumberParameters, 4)
3839 TEST_FIELD_ALIGN (EXCEPTION_RECORD, NumberParameters, 4)
3840 TEST_FIELD_OFFSET(EXCEPTION_RECORD, NumberParameters, 16)
3841 TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionInformation, 60)
3842 TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionInformation, 4)
3843 TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionInformation, 20)
3846 static void test_pack_EXECUTION_STATE(void)
3848 /* EXECUTION_STATE */
3849 TEST_TYPE_SIZE (EXECUTION_STATE, 4)
3850 TEST_TYPE_ALIGN (EXECUTION_STATE, 4)
3851 TEST_TYPE_UNSIGNED(EXECUTION_STATE)
3854 static void test_pack_FLOATING_SAVE_AREA(void)
3856 /* FLOATING_SAVE_AREA */
3857 TEST_TYPE_SIZE (FLOATING_SAVE_AREA, 112)
3858 TEST_TYPE_ALIGN (FLOATING_SAVE_AREA, 4)
3859 TEST_FIELD_SIZE (FLOATING_SAVE_AREA, ControlWord, 4)
3860 TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, ControlWord, 4)
3861 TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, ControlWord, 0)
3862 TEST_FIELD_SIZE (FLOATING_SAVE_AREA, StatusWord, 4)
3863 TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, StatusWord, 4)
3864 TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, StatusWord, 4)
3865 TEST_FIELD_SIZE (FLOATING_SAVE_AREA, TagWord, 4)
3866 TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, TagWord, 4)
3867 TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, TagWord, 8)
3868 TEST_FIELD_SIZE (FLOATING_SAVE_AREA, ErrorOffset, 4)
3869 TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, ErrorOffset, 4)
3870 TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, ErrorOffset, 12)
3871 TEST_FIELD_SIZE (FLOATING_SAVE_AREA, ErrorSelector, 4)
3872 TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, ErrorSelector, 4)
3873 TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, ErrorSelector, 16)
3874 TEST_FIELD_SIZE (FLOATING_SAVE_AREA, DataOffset, 4)
3875 TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, DataOffset, 4)
3876 TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, DataOffset, 20)
3877 TEST_FIELD_SIZE (FLOATING_SAVE_AREA, DataSelector, 4)
3878 TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, DataSelector, 4)
3879 TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, DataSelector, 24)
3880 TEST_FIELD_SIZE (FLOATING_SAVE_AREA, RegisterArea, 80)
3881 TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, RegisterArea, 1)
3882 TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, RegisterArea, 28)
3883 TEST_FIELD_SIZE (FLOATING_SAVE_AREA, Cr0NpxState, 4)
3884 TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, Cr0NpxState, 4)
3885 TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, Cr0NpxState, 108)
3888 static void test_pack_FPO_DATA(void)
3891 TEST_TYPE_SIZE (FPO_DATA, 16)
3892 TEST_TYPE_ALIGN (FPO_DATA, 4)
3893 TEST_FIELD_SIZE (FPO_DATA, ulOffStart, 4)
3894 TEST_FIELD_ALIGN (FPO_DATA, ulOffStart, 4)
3895 TEST_FIELD_OFFSET(FPO_DATA, ulOffStart, 0)
3896 TEST_FIELD_SIZE (FPO_DATA, cbProcSize, 4)
3897 TEST_FIELD_ALIGN (FPO_DATA, cbProcSize, 4)
3898 TEST_FIELD_OFFSET(FPO_DATA, cbProcSize, 4)
3899 TEST_FIELD_SIZE (FPO_DATA, cdwLocals, 4)
3900 TEST_FIELD_ALIGN (FPO_DATA, cdwLocals, 4)
3901 TEST_FIELD_OFFSET(FPO_DATA, cdwLocals, 8)
3902 TEST_FIELD_SIZE (FPO_DATA, cdwParams, 2)
3903 TEST_FIELD_ALIGN (FPO_DATA, cdwParams, 2)
3904 TEST_FIELD_OFFSET(FPO_DATA, cdwParams, 12)
3907 static void test_pack_GENERIC_MAPPING(void)
3909 /* GENERIC_MAPPING */
3910 TEST_TYPE_SIZE (GENERIC_MAPPING, 16)
3911 TEST_TYPE_ALIGN (GENERIC_MAPPING, 4)
3912 TEST_FIELD_SIZE (GENERIC_MAPPING, GenericRead, 4)
3913 TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericRead, 4)
3914 TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericRead, 0)
3915 TEST_FIELD_SIZE (GENERIC_MAPPING, GenericWrite, 4)
3916 TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericWrite, 4)
3917 TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericWrite, 4)
3918 TEST_FIELD_SIZE (GENERIC_MAPPING, GenericExecute, 4)
3919 TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericExecute, 4)
3920 TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericExecute, 8)
3921 TEST_FIELD_SIZE (GENERIC_MAPPING, GenericAll, 4)
3922 TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericAll, 4)
3923 TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericAll, 12)
3926 static void test_pack_HANDLE(void)
3929 TEST_TYPE_SIZE (HANDLE, 4)
3930 TEST_TYPE_ALIGN (HANDLE, 4)
3933 static void test_pack_HRESULT(void)
3936 TEST_TYPE_SIZE (HRESULT, 4)
3937 TEST_TYPE_ALIGN (HRESULT, 4)
3940 static void test_pack_IMAGE_ARCHIVE_MEMBER_HEADER(void)
3942 /* IMAGE_ARCHIVE_MEMBER_HEADER */
3943 TEST_TYPE_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, 60)
3944 TEST_TYPE_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, 1)
3945 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Name, 16)
3946 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Name, 1)
3947 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Name, 0)
3948 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Date, 12)
3949 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Date, 1)
3950 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Date, 16)
3951 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, UserID, 6)
3952 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, UserID, 1)
3953 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, UserID, 28)
3954 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, GroupID, 6)
3955 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, GroupID, 1)
3956 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, GroupID, 34)
3957 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Mode, 8)
3958 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Mode, 1)
3959 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Mode, 40)
3960 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Size, 10)
3961 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Size, 1)
3962 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Size, 48)
3963 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, EndHeader, 2)
3964 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, EndHeader, 1)
3965 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, EndHeader, 58)
3968 static void test_pack_IMAGE_AUX_SYMBOL(void)
3970 /* IMAGE_AUX_SYMBOL (pack 2) */
3973 static void test_pack_IMAGE_BASE_RELOCATION(void)
3975 /* IMAGE_BASE_RELOCATION */
3976 TEST_TYPE_SIZE (IMAGE_BASE_RELOCATION, 8)
3977 TEST_TYPE_ALIGN (IMAGE_BASE_RELOCATION, 4)
3978 TEST_FIELD_SIZE (IMAGE_BASE_RELOCATION, VirtualAddress, 4)
3979 TEST_FIELD_ALIGN (IMAGE_BASE_RELOCATION, VirtualAddress, 4)
3980 TEST_FIELD_OFFSET(IMAGE_BASE_RELOCATION, VirtualAddress, 0)
3981 TEST_FIELD_SIZE (IMAGE_BASE_RELOCATION, SizeOfBlock, 4)
3982 TEST_FIELD_ALIGN (IMAGE_BASE_RELOCATION, SizeOfBlock, 4)
3983 TEST_FIELD_OFFSET(IMAGE_BASE_RELOCATION, SizeOfBlock, 4)
3986 static void test_pack_IMAGE_BOUND_FORWARDER_REF(void)
3988 /* IMAGE_BOUND_FORWARDER_REF */
3989 TEST_TYPE_SIZE (IMAGE_BOUND_FORWARDER_REF, 8)
3990 TEST_TYPE_ALIGN (IMAGE_BOUND_FORWARDER_REF, 4)
3991 TEST_FIELD_SIZE (IMAGE_BOUND_FORWARDER_REF, TimeDateStamp, 4)
3992 TEST_FIELD_ALIGN (IMAGE_BOUND_FORWARDER_REF, TimeDateStamp, 4)
3993 TEST_FIELD_OFFSET(IMAGE_BOUND_FORWARDER_REF, TimeDateStamp, 0)
3994 TEST_FIELD_SIZE (IMAGE_BOUND_FORWARDER_REF, OffsetModuleName, 2)
3995 TEST_FIELD_ALIGN (IMAGE_BOUND_FORWARDER_REF, OffsetModuleName, 2)
3996 TEST_FIELD_OFFSET(IMAGE_BOUND_FORWARDER_REF, OffsetModuleName, 4)
3997 TEST_FIELD_SIZE (IMAGE_BOUND_FORWARDER_REF, Reserved, 2)
3998 TEST_FIELD_ALIGN (IMAGE_BOUND_FORWARDER_REF, Reserved, 2)
3999 TEST_FIELD_OFFSET(IMAGE_BOUND_FORWARDER_REF, Reserved, 6)
4002 static void test_pack_IMAGE_BOUND_IMPORT_DESCRIPTOR(void)
4004 /* IMAGE_BOUND_IMPORT_DESCRIPTOR */
4005 TEST_TYPE_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, 8)
4006 TEST_TYPE_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, 4)
4007 TEST_FIELD_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, TimeDateStamp, 4)
4008 TEST_FIELD_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, TimeDateStamp, 4)
4009 TEST_FIELD_OFFSET(IMAGE_BOUND_IMPORT_DESCRIPTOR, TimeDateStamp, 0)
4010 TEST_FIELD_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, OffsetModuleName, 2)
4011 TEST_FIELD_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, OffsetModuleName, 2)
4012 TEST_FIELD_OFFSET(IMAGE_BOUND_IMPORT_DESCRIPTOR, OffsetModuleName, 4)
4013 TEST_FIELD_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, NumberOfModuleForwarderRefs, 2)
4014 TEST_FIELD_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, NumberOfModuleForwarderRefs, 2)
4015 TEST_FIELD_OFFSET(IMAGE_BOUND_IMPORT_DESCRIPTOR, NumberOfModuleForwarderRefs, 6)
4018 static void test_pack_IMAGE_COFF_SYMBOLS_HEADER(void)
4020 /* IMAGE_COFF_SYMBOLS_HEADER */
4021 TEST_TYPE_SIZE (IMAGE_COFF_SYMBOLS_HEADER, 32)
4022 TEST_TYPE_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, 4)
4023 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, NumberOfSymbols, 4)
4024 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, NumberOfSymbols, 4)
4025 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, NumberOfSymbols, 0)
4026 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstSymbol, 4)
4027 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstSymbol, 4)
4028 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstSymbol, 4)
4029 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, NumberOfLinenumbers, 4)
4030 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, NumberOfLinenumbers, 4)
4031 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, NumberOfLinenumbers, 8)
4032 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstLinenumber, 4)
4033 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstLinenumber, 4)
4034 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstLinenumber, 12)
4035 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfCode, 4)
4036 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfCode, 4)
4037 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfCode, 16)
4038 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfCode, 4)
4039 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfCode, 4)
4040 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfCode, 20)
4041 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfData, 4)
4042 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfData, 4)
4043 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfData, 24)
4044 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfData, 4)
4045 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfData, 4)
4046 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfData, 28)
4049 static void test_pack_IMAGE_DATA_DIRECTORY(void)
4051 /* IMAGE_DATA_DIRECTORY */
4052 TEST_TYPE_SIZE (IMAGE_DATA_DIRECTORY, 8)
4053 TEST_TYPE_ALIGN (IMAGE_DATA_DIRECTORY, 4)
4054 TEST_FIELD_SIZE (IMAGE_DATA_DIRECTORY, VirtualAddress, 4)
4055 TEST_FIELD_ALIGN (IMAGE_DATA_DIRECTORY, VirtualAddress, 4)
4056 TEST_FIELD_OFFSET(IMAGE_DATA_DIRECTORY, VirtualAddress, 0)
4057 TEST_FIELD_SIZE (IMAGE_DATA_DIRECTORY, Size, 4)
4058 TEST_FIELD_ALIGN (IMAGE_DATA_DIRECTORY, Size, 4)
4059 TEST_FIELD_OFFSET(IMAGE_DATA_DIRECTORY, Size, 4)
4062 static void test_pack_IMAGE_DEBUG_DIRECTORY(void)
4064 /* IMAGE_DEBUG_DIRECTORY */
4065 TEST_TYPE_SIZE (IMAGE_DEBUG_DIRECTORY, 28)
4066 TEST_TYPE_ALIGN (IMAGE_DEBUG_DIRECTORY, 4)
4067 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, Characteristics, 4)
4068 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, Characteristics, 4)
4069 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, Characteristics, 0)
4070 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, TimeDateStamp, 4)
4071 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, TimeDateStamp, 4)
4072 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, TimeDateStamp, 4)
4073 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, MajorVersion, 2)
4074 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, MajorVersion, 2)
4075 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, MajorVersion, 8)
4076 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, MinorVersion, 2)
4077 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, MinorVersion, 2)
4078 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, MinorVersion, 10)
4079 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, Type, 4)
4080 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, Type, 4)
4081 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, Type, 12)
4082 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, SizeOfData, 4)
4083 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, SizeOfData, 4)
4084 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, SizeOfData, 16)
4085 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, AddressOfRawData, 4)
4086 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, AddressOfRawData, 4)
4087 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, AddressOfRawData, 20)
4088 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, PointerToRawData, 4)
4089 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, PointerToRawData, 4)
4090 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, PointerToRawData, 24)
4093 static void test_pack_IMAGE_DEBUG_MISC(void)
4095 /* IMAGE_DEBUG_MISC */
4096 TEST_TYPE_SIZE (IMAGE_DEBUG_MISC, 16)
4097 TEST_TYPE_ALIGN (IMAGE_DEBUG_MISC, 4)
4098 TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, DataType, 4)
4099 TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, DataType, 4)
4100 TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, DataType, 0)
4101 TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Length, 4)
4102 TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Length, 4)
4103 TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Length, 4)
4104 TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Unicode, 1)
4105 TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Unicode, 1)
4106 TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Unicode, 8)
4107 TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Reserved, 3)
4108 TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Reserved, 1)
4109 TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Reserved, 9)
4110 TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Data, 1)
4111 TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Data, 1)
4112 TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Data, 12)
4115 static void test_pack_IMAGE_DOS_HEADER(void)
4117 /* IMAGE_DOS_HEADER (pack 2) */
4118 TEST_TYPE_SIZE (IMAGE_DOS_HEADER, 64)
4119 TEST_TYPE_ALIGN (IMAGE_DOS_HEADER, 2)
4120 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_magic, 2)
4121 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_magic, 2)
4122 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_magic, 0)
4123 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cblp, 2)
4124 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cblp, 2)
4125 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cblp, 2)
4126 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cp, 2)
4127 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cp, 2)
4128 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cp, 4)
4129 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_crlc, 2)
4130 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_crlc, 2)
4131 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_crlc, 6)
4132 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cparhdr, 2)
4133 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cparhdr, 2)
4134 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cparhdr, 8)
4135 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_minalloc, 2)
4136 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_minalloc, 2)
4137 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_minalloc, 10)
4138 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_maxalloc, 2)
4139 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_maxalloc, 2)
4140 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_maxalloc, 12)
4141 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_ss, 2)
4142 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_ss, 2)
4143 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_ss, 14)
4144 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_sp, 2)
4145 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_sp, 2)
4146 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_sp, 16)
4147 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_csum, 2)
4148 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_csum, 2)
4149 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_csum, 18)
4150 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_ip, 2)
4151 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_ip, 2)
4152 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_ip, 20)
4153 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cs, 2)
4154 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cs, 2)
4155 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cs, 22)
4156 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_lfarlc, 2)
4157 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_lfarlc, 2)
4158 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_lfarlc, 24)
4159 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_ovno, 2)
4160 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_ovno, 2)
4161 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_ovno, 26)
4162 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_res, 8)
4163 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_res, 2)
4164 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_res, 28)
4165 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_oemid, 2)
4166 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_oemid, 2)
4167 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_oemid, 36)
4168 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_oeminfo, 2)
4169 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_oeminfo, 2)
4170 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_oeminfo, 38)
4171 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_res2, 20)
4172 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_res2, 2)
4173 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_res2, 40)
4174 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_lfanew, 4)
4175 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_lfanew, 2)
4176 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_lfanew, 60)
4179 static void test_pack_IMAGE_EXPORT_DIRECTORY(void)
4181 /* IMAGE_EXPORT_DIRECTORY */
4182 TEST_TYPE_SIZE (IMAGE_EXPORT_DIRECTORY, 40)
4183 TEST_TYPE_ALIGN (IMAGE_EXPORT_DIRECTORY, 4)
4184 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, Characteristics, 4)
4185 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, Characteristics, 4)
4186 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, Characteristics, 0)
4187 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, TimeDateStamp, 4)
4188 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, TimeDateStamp, 4)
4189 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, TimeDateStamp, 4)
4190 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, MajorVersion, 2)
4191 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, MajorVersion, 2)
4192 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, MajorVersion, 8)
4193 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, MinorVersion, 2)
4194 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, MinorVersion, 2)
4195 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, MinorVersion, 10)
4196 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, Name, 4)
4197 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, Name, 4)
4198 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, Name, 12)
4199 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, Base, 4)
4200 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, Base, 4)
4201 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, Base, 16)
4202 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, NumberOfFunctions, 4)
4203 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, NumberOfFunctions, 4)
4204 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, NumberOfFunctions, 20)
4205 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, NumberOfNames, 4)
4206 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, NumberOfNames, 4)
4207 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, NumberOfNames, 24)
4208 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, AddressOfFunctions, 4)
4209 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, AddressOfFunctions, 4)
4210 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, AddressOfFunctions, 28)
4211 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, AddressOfNames, 4)
4212 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, AddressOfNames, 4)
4213 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, AddressOfNames, 32)
4214 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, AddressOfNameOrdinals, 4)
4215 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, AddressOfNameOrdinals, 4)
4216 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, AddressOfNameOrdinals, 36)
4219 static void test_pack_IMAGE_FILE_HEADER(void)
4221 /* IMAGE_FILE_HEADER */
4222 TEST_TYPE_SIZE (IMAGE_FILE_HEADER, 20)
4223 TEST_TYPE_ALIGN (IMAGE_FILE_HEADER, 4)
4224 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, Machine, 2)
4225 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, Machine, 2)
4226 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, Machine, 0)
4227 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, NumberOfSections, 2)
4228 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, NumberOfSections, 2)
4229 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, NumberOfSections, 2)
4230 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, TimeDateStamp, 4)
4231 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, TimeDateStamp, 4)
4232 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, TimeDateStamp, 4)
4233 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, PointerToSymbolTable, 4)
4234 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, PointerToSymbolTable, 4)
4235 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, PointerToSymbolTable, 8)
4236 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, NumberOfSymbols, 4)
4237 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, NumberOfSymbols, 4)
4238 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, NumberOfSymbols, 12)
4239 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, SizeOfOptionalHeader, 2)
4240 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, SizeOfOptionalHeader, 2)
4241 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, SizeOfOptionalHeader, 16)
4242 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, Characteristics, 2)
4243 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, Characteristics, 2)
4244 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, Characteristics, 18)
4247 static void test_pack_IMAGE_FUNCTION_ENTRY(void)
4249 /* IMAGE_FUNCTION_ENTRY */
4250 TEST_TYPE_SIZE (IMAGE_FUNCTION_ENTRY, 12)
4251 TEST_TYPE_ALIGN (IMAGE_FUNCTION_ENTRY, 4)
4252 TEST_FIELD_SIZE (IMAGE_FUNCTION_ENTRY, StartingAddress, 4)
4253 TEST_FIELD_ALIGN (IMAGE_FUNCTION_ENTRY, StartingAddress, 4)
4254 TEST_FIELD_OFFSET(IMAGE_FUNCTION_ENTRY, StartingAddress, 0)
4255 TEST_FIELD_SIZE (IMAGE_FUNCTION_ENTRY, EndingAddress, 4)
4256 TEST_FIELD_ALIGN (IMAGE_FUNCTION_ENTRY, EndingAddress, 4)
4257 TEST_FIELD_OFFSET(IMAGE_FUNCTION_ENTRY, EndingAddress, 4)
4258 TEST_FIELD_SIZE (IMAGE_FUNCTION_ENTRY, EndOfPrologue, 4)
4259 TEST_FIELD_ALIGN (IMAGE_FUNCTION_ENTRY, EndOfPrologue, 4)
4260 TEST_FIELD_OFFSET(IMAGE_FUNCTION_ENTRY, EndOfPrologue, 8)
4263 static void test_pack_IMAGE_IMPORT_BY_NAME(void)
4265 /* IMAGE_IMPORT_BY_NAME */
4266 TEST_TYPE_SIZE (IMAGE_IMPORT_BY_NAME, 4)
4267 TEST_TYPE_ALIGN (IMAGE_IMPORT_BY_NAME, 2)
4268 TEST_FIELD_SIZE (IMAGE_IMPORT_BY_NAME, Hint, 2)
4269 TEST_FIELD_ALIGN (IMAGE_IMPORT_BY_NAME, Hint, 2)
4270 TEST_FIELD_OFFSET(IMAGE_IMPORT_BY_NAME, Hint, 0)
4271 TEST_FIELD_SIZE (IMAGE_IMPORT_BY_NAME, Name, 1)
4272 TEST_FIELD_ALIGN (IMAGE_IMPORT_BY_NAME, Name, 1)
4273 TEST_FIELD_OFFSET(IMAGE_IMPORT_BY_NAME, Name, 2)
4276 static void test_pack_IMAGE_IMPORT_DESCRIPTOR(void)
4278 /* IMAGE_IMPORT_DESCRIPTOR */
4281 static void test_pack_IMAGE_LINENUMBER(void)
4283 /* IMAGE_LINENUMBER (pack 2) */
4286 static void test_pack_IMAGE_LOAD_CONFIG_DIRECTORY(void)
4288 /* IMAGE_LOAD_CONFIG_DIRECTORY */
4289 TEST_TYPE_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, 72)
4290 TEST_TYPE_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, 4)
4291 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, Size, 4)
4292 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, Size, 4)
4293 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, Size, 0)
4294 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, TimeDateStamp, 4)
4295 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, TimeDateStamp, 4)
4296 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, TimeDateStamp, 4)
4297 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, MajorVersion, 2)
4298 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, MajorVersion, 2)
4299 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, MajorVersion, 8)
4300 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, MinorVersion, 2)
4301 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, MinorVersion, 2)
4302 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, MinorVersion, 10)
4303 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsClear, 4)
4304 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsClear, 4)
4305 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsClear, 12)
4306 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsSet, 4)
4307 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsSet, 4)
4308 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsSet, 16)
4309 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, CriticalSectionDefaultTimeout, 4)
4310 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, CriticalSectionDefaultTimeout, 4)
4311 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, CriticalSectionDefaultTimeout, 20)
4312 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitFreeBlockThreshold, 4)
4313 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitFreeBlockThreshold, 4)
4314 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitFreeBlockThreshold, 24)
4315 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitTotalFreeThreshold, 4)
4316 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitTotalFreeThreshold, 4)
4317 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitTotalFreeThreshold, 28)
4318 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, LockPrefixTable, 4)
4319 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, LockPrefixTable, 4)
4320 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, LockPrefixTable, 32)
4321 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, MaximumAllocationSize, 4)
4322 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, MaximumAllocationSize, 4)
4323 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, MaximumAllocationSize, 36)
4324 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, VirtualMemoryThreshold, 4)
4325 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, VirtualMemoryThreshold, 4)
4326 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, VirtualMemoryThreshold, 40)
4327 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, ProcessHeapFlags, 4)
4328 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, ProcessHeapFlags, 4)
4329 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, ProcessHeapFlags, 44)
4330 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, ProcessAffinityMask, 4)
4331 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, ProcessAffinityMask, 4)
4332 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, ProcessAffinityMask, 48)
4333 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, CSDVersion, 2)
4334 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, CSDVersion, 2)
4335 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, CSDVersion, 52)
4336 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, Reserved1, 2)
4337 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, Reserved1, 2)
4338 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, Reserved1, 54)
4339 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, EditList, 4)
4340 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, EditList, 4)
4341 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, EditList, 56)
4342 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, SecurityCookie, 4)
4343 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, SecurityCookie, 4)
4344 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, SecurityCookie, 60)
4345 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerTable, 4)
4346 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerTable, 4)
4347 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerTable, 64)
4348 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerCount, 4)
4349 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerCount, 4)
4350 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerCount, 68)
4353 static void test_pack_IMAGE_NT_HEADERS(void)
4355 /* IMAGE_NT_HEADERS */
4356 TEST_TYPE_SIZE (IMAGE_NT_HEADERS, 248)
4357 TEST_TYPE_ALIGN (IMAGE_NT_HEADERS, 4)
4360 static void test_pack_IMAGE_NT_HEADERS32(void)
4362 /* IMAGE_NT_HEADERS32 */
4363 TEST_TYPE_SIZE (IMAGE_NT_HEADERS32, 248)
4364 TEST_TYPE_ALIGN (IMAGE_NT_HEADERS32, 4)
4365 TEST_FIELD_SIZE (IMAGE_NT_HEADERS32, Signature, 4)
4366 TEST_FIELD_ALIGN (IMAGE_NT_HEADERS32, Signature, 4)
4367 TEST_FIELD_OFFSET(IMAGE_NT_HEADERS32, Signature, 0)
4368 TEST_FIELD_SIZE (IMAGE_NT_HEADERS32, FileHeader, 20)
4369 TEST_FIELD_ALIGN (IMAGE_NT_HEADERS32, FileHeader, 4)
4370 TEST_FIELD_OFFSET(IMAGE_NT_HEADERS32, FileHeader, 4)
4371 TEST_FIELD_SIZE (IMAGE_NT_HEADERS32, OptionalHeader, 224)
4372 TEST_FIELD_ALIGN (IMAGE_NT_HEADERS32, OptionalHeader, 4)
4373 TEST_FIELD_OFFSET(IMAGE_NT_HEADERS32, OptionalHeader, 24)
4376 static void test_pack_IMAGE_NT_HEADERS64(void)
4378 /* IMAGE_NT_HEADERS64 */
4379 TEST_TYPE_SIZE (IMAGE_NT_HEADERS64, 264)
4380 TEST_TYPE_ALIGN (IMAGE_NT_HEADERS64, 8)
4381 TEST_FIELD_SIZE (IMAGE_NT_HEADERS64, Signature, 4)
4382 TEST_FIELD_ALIGN (IMAGE_NT_HEADERS64, Signature, 4)
4383 TEST_FIELD_OFFSET(IMAGE_NT_HEADERS64, Signature, 0)
4384 TEST_FIELD_SIZE (IMAGE_NT_HEADERS64, FileHeader, 20)
4385 TEST_FIELD_ALIGN (IMAGE_NT_HEADERS64, FileHeader, 4)
4386 TEST_FIELD_OFFSET(IMAGE_NT_HEADERS64, FileHeader, 4)
4387 TEST_FIELD_SIZE (IMAGE_NT_HEADERS64, OptionalHeader, 240)
4388 TEST_FIELD_ALIGN (IMAGE_NT_HEADERS64, OptionalHeader, 8)
4389 TEST_FIELD_OFFSET(IMAGE_NT_HEADERS64, OptionalHeader, 24)
4392 static void test_pack_IMAGE_OPTIONAL_HEADER(void)
4394 /* IMAGE_OPTIONAL_HEADER */
4395 TEST_TYPE_SIZE (IMAGE_OPTIONAL_HEADER, 224)
4396 TEST_TYPE_ALIGN (IMAGE_OPTIONAL_HEADER, 4)
4399 static void test_pack_IMAGE_OPTIONAL_HEADER32(void)
4401 /* IMAGE_OPTIONAL_HEADER32 */
4402 TEST_TYPE_SIZE (IMAGE_OPTIONAL_HEADER32, 224)
4403 TEST_TYPE_ALIGN (IMAGE_OPTIONAL_HEADER32, 4)
4404 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, Magic, 2)
4405 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, Magic, 2)
4406 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, Magic, 0)
4407 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MajorLinkerVersion, 1)
4408 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MajorLinkerVersion, 1)
4409 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MajorLinkerVersion, 2)
4410 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MinorLinkerVersion, 1)
4411 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MinorLinkerVersion, 1)
4412 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MinorLinkerVersion, 3)
4413 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfCode, 4)
4414 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfCode, 4)
4415 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfCode, 4)
4416 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfInitializedData, 4)
4417 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfInitializedData, 4)
4418 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfInitializedData, 8)
4419 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfUninitializedData, 4)
4420 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfUninitializedData, 4)
4421 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfUninitializedData, 12)
4422 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, AddressOfEntryPoint, 4)
4423 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, AddressOfEntryPoint, 4)
4424 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, AddressOfEntryPoint, 16)
4425 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, BaseOfCode, 4)
4426 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, BaseOfCode, 4)
4427 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, BaseOfCode, 20)
4428 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, BaseOfData, 4)
4429 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, BaseOfData, 4)
4430 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, BaseOfData, 24)
4431 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, ImageBase, 4)
4432 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, ImageBase, 4)
4433 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, ImageBase, 28)
4434 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SectionAlignment, 4)
4435 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SectionAlignment, 4)
4436 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SectionAlignment, 32)
4437 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, FileAlignment, 4)
4438 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, FileAlignment, 4)
4439 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, FileAlignment, 36)
4440 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MajorOperatingSystemVersion, 2)
4441 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MajorOperatingSystemVersion, 2)
4442 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MajorOperatingSystemVersion, 40)
4443 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MinorOperatingSystemVersion, 2)
4444 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MinorOperatingSystemVersion, 2)
4445 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MinorOperatingSystemVersion, 42)
4446 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MajorImageVersion, 2)
4447 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MajorImageVersion, 2)
4448 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MajorImageVersion, 44)
4449 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MinorImageVersion, 2)
4450 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MinorImageVersion, 2)
4451 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MinorImageVersion, 46)
4452 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MajorSubsystemVersion, 2)
4453 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MajorSubsystemVersion, 2)
4454 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MajorSubsystemVersion, 48)
4455 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MinorSubsystemVersion, 2)
4456 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MinorSubsystemVersion, 2)
4457 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MinorSubsystemVersion, 50)
4458 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, Win32VersionValue, 4)
4459 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, Win32VersionValue, 4)
4460 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, Win32VersionValue, 52)
4461 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfImage, 4)
4462 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfImage, 4)
4463 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfImage, 56)
4464 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfHeaders, 4)
4465 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfHeaders, 4)
4466 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfHeaders, 60)
4467 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, CheckSum, 4)
4468 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, CheckSum, 4)
4469 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, CheckSum, 64)
4470 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, Subsystem, 2)
4471 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, Subsystem, 2)
4472 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, Subsystem, 68)
4473 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, DllCharacteristics, 2)
4474 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, DllCharacteristics, 2)
4475 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, DllCharacteristics, 70)
4476 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfStackReserve, 4)
4477 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfStackReserve, 4)
4478 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfStackReserve, 72)
4479 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfStackCommit, 4)
4480 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfStackCommit, 4)
4481 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfStackCommit, 76)
4482 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfHeapReserve, 4)
4483 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfHeapReserve, 4)
4484 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfHeapReserve, 80)
4485 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfHeapCommit, 4)
4486 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfHeapCommit, 4)
4487 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfHeapCommit, 84)
4488 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, LoaderFlags, 4)
4489 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, LoaderFlags, 4)
4490 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, LoaderFlags, 88)
4491 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, NumberOfRvaAndSizes, 4)
4492 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, NumberOfRvaAndSizes, 4)
4493 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, NumberOfRvaAndSizes, 92)
4494 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, DataDirectory, 128)
4495 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, DataDirectory, 4)
4496 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, DataDirectory, 96)
4499 static void test_pack_IMAGE_OPTIONAL_HEADER64(void)
4501 /* IMAGE_OPTIONAL_HEADER64 */
4502 TEST_TYPE_SIZE (IMAGE_OPTIONAL_HEADER64, 240)
4503 TEST_TYPE_ALIGN (IMAGE_OPTIONAL_HEADER64, 8)
4504 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, Magic, 2)
4505 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, Magic, 2)
4506 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, Magic, 0)
4507 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MajorLinkerVersion, 1)
4508 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MajorLinkerVersion, 1)
4509 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MajorLinkerVersion, 2)
4510 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MinorLinkerVersion, 1)
4511 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MinorLinkerVersion, 1)
4512 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MinorLinkerVersion, 3)
4513 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfCode, 4)
4514 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfCode, 4)
4515 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfCode, 4)
4516 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfInitializedData, 4)
4517 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfInitializedData, 4)
4518 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfInitializedData, 8)
4519 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfUninitializedData, 4)
4520 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfUninitializedData, 4)
4521 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfUninitializedData, 12)
4522 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, AddressOfEntryPoint, 4)
4523 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, AddressOfEntryPoint, 4)
4524 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, AddressOfEntryPoint, 16)
4525 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, BaseOfCode, 4)
4526 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, BaseOfCode, 4)
4527 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, BaseOfCode, 20)
4528 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, ImageBase, 8)
4529 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, ImageBase, 8)
4530 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, ImageBase, 24)
4531 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SectionAlignment, 4)
4532 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SectionAlignment, 4)
4533 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SectionAlignment, 32)
4534 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, FileAlignment, 4)
4535 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, FileAlignment, 4)
4536 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, FileAlignment, 36)
4537 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MajorOperatingSystemVersion, 2)
4538 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MajorOperatingSystemVersion, 2)
4539 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MajorOperatingSystemVersion, 40)
4540 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MinorOperatingSystemVersion, 2)
4541 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MinorOperatingSystemVersion, 2)
4542 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MinorOperatingSystemVersion, 42)
4543 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MajorImageVersion, 2)
4544 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MajorImageVersion, 2)
4545 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MajorImageVersion, 44)
4546 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MinorImageVersion, 2)
4547 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MinorImageVersion, 2)
4548 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MinorImageVersion, 46)
4549 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MajorSubsystemVersion, 2)
4550 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MajorSubsystemVersion, 2)
4551 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MajorSubsystemVersion, 48)
4552 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MinorSubsystemVersion, 2)
4553 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MinorSubsystemVersion, 2)
4554 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MinorSubsystemVersion, 50)
4555 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, Win32VersionValue, 4)
4556 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, Win32VersionValue, 4)
4557 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, Win32VersionValue, 52)
4558 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfImage, 4)
4559 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfImage, 4)
4560 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfImage, 56)
4561 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfHeaders, 4)
4562 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfHeaders, 4)
4563 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfHeaders, 60)
4564 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, CheckSum, 4)
4565 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, CheckSum, 4)
4566 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, CheckSum, 64)
4567 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, Subsystem, 2)
4568 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, Subsystem, 2)
4569 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, Subsystem, 68)
4570 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, DllCharacteristics, 2)
4571 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, DllCharacteristics, 2)
4572 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, DllCharacteristics, 70)
4573 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfStackReserve, 8)
4574 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfStackReserve, 8)
4575 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfStackReserve, 72)
4576 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfStackCommit, 8)
4577 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfStackCommit, 8)
4578 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfStackCommit, 80)
4579 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfHeapReserve, 8)
4580 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfHeapReserve, 8)
4581 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfHeapReserve, 88)
4582 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfHeapCommit, 8)
4583 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfHeapCommit, 8)
4584 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfHeapCommit, 96)
4585 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, LoaderFlags, 4)
4586 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, LoaderFlags, 4)
4587 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, LoaderFlags, 104)
4588 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, NumberOfRvaAndSizes, 4)
4589 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, NumberOfRvaAndSizes, 4)
4590 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, NumberOfRvaAndSizes, 108)
4591 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, DataDirectory, 128)
4592 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, DataDirectory, 4)
4593 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, DataDirectory, 112)
4596 static void test_pack_IMAGE_OS2_HEADER(void)
4598 /* IMAGE_OS2_HEADER (pack 2) */
4599 TEST_TYPE_SIZE (IMAGE_OS2_HEADER, 64)
4600 TEST_TYPE_ALIGN (IMAGE_OS2_HEADER, 2)
4601 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_magic, 2)
4602 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_magic, 2)
4603 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_magic, 0)
4604 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_ver, 1)
4605 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_ver, 1)
4606 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_ver, 2)
4607 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_rev, 1)
4608 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_rev, 1)
4609 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_rev, 3)
4610 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_enttab, 2)
4611 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_enttab, 2)
4612 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_enttab, 4)
4613 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cbenttab, 2)
4614 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cbenttab, 2)
4615 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cbenttab, 6)
4616 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_crc, 4)
4617 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_crc, 2)
4618 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_crc, 8)
4619 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_flags, 2)
4620 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_flags, 2)
4621 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_flags, 12)
4622 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_autodata, 2)
4623 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_autodata, 2)
4624 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_autodata, 14)
4625 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_heap, 2)
4626 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_heap, 2)
4627 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_heap, 16)
4628 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_stack, 2)
4629 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_stack, 2)
4630 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_stack, 18)
4631 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_csip, 4)
4632 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_csip, 2)
4633 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_csip, 20)
4634 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_sssp, 4)
4635 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_sssp, 2)
4636 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_sssp, 24)
4637 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cseg, 2)
4638 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cseg, 2)
4639 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cseg, 28)
4640 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cmod, 2)
4641 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cmod, 2)
4642 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cmod, 30)
4643 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cbnrestab, 2)
4644 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cbnrestab, 2)
4645 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cbnrestab, 32)
4646 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_segtab, 2)
4647 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_segtab, 2)
4648 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_segtab, 34)
4649 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_rsrctab, 2)
4650 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_rsrctab, 2)
4651 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_rsrctab, 36)
4652 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_restab, 2)
4653 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_restab, 2)
4654 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_restab, 38)
4655 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_modtab, 2)
4656 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_modtab, 2)
4657 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_modtab, 40)
4658 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_imptab, 2)
4659 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_imptab, 2)
4660 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_imptab, 42)
4661 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_nrestab, 4)
4662 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_nrestab, 2)
4663 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_nrestab, 44)
4664 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cmovent, 2)
4665 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cmovent, 2)
4666 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cmovent, 48)
4667 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_align, 2)
4668 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_align, 2)
4669 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_align, 50)
4670 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cres, 2)
4671 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cres, 2)
4672 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cres, 52)
4673 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_exetyp, 1)
4674 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_exetyp, 1)
4675 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_exetyp, 54)
4676 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_flagsothers, 1)
4677 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_flagsothers, 1)
4678 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_flagsothers, 55)
4679 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_pretthunks, 2)
4680 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_pretthunks, 2)
4681 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_pretthunks, 56)
4682 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_psegrefbytes, 2)
4683 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_psegrefbytes, 2)
4684 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_psegrefbytes, 58)
4685 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_swaparea, 2)
4686 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_swaparea, 2)
4687 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_swaparea, 60)
4688 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_expver, 2)
4689 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_expver, 2)
4690 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_expver, 62)
4693 static void test_pack_IMAGE_RELOCATION(void)
4695 /* IMAGE_RELOCATION (pack 2) */
4698 static void test_pack_IMAGE_RESOURCE_DATA_ENTRY(void)
4700 /* IMAGE_RESOURCE_DATA_ENTRY */
4701 TEST_TYPE_SIZE (IMAGE_RESOURCE_DATA_ENTRY, 16)
4702 TEST_TYPE_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, 4)
4703 TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, OffsetToData, 4)
4704 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, OffsetToData, 4)
4705 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, OffsetToData, 0)
4706 TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, Size, 4)
4707 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, Size, 4)
4708 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, Size, 4)
4709 TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, CodePage, 4)
4710 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, CodePage, 4)
4711 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, CodePage, 8)
4712 TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, Reserved, 4)
4713 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, Reserved, 4)
4714 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, Reserved, 12)
4717 static void test_pack_IMAGE_RESOURCE_DIRECTORY(void)
4719 /* IMAGE_RESOURCE_DIRECTORY */
4720 TEST_TYPE_SIZE (IMAGE_RESOURCE_DIRECTORY, 16)
4721 TEST_TYPE_ALIGN (IMAGE_RESOURCE_DIRECTORY, 4)
4722 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, Characteristics, 4)
4723 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, Characteristics, 4)
4724 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, Characteristics, 0)
4725 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, TimeDateStamp, 4)
4726 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, TimeDateStamp, 4)
4727 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, TimeDateStamp, 4)
4728 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, MajorVersion, 2)
4729 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, MajorVersion, 2)
4730 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, MajorVersion, 8)
4731 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, MinorVersion, 2)
4732 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, MinorVersion, 2)
4733 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, MinorVersion, 10)
4734 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, NumberOfNamedEntries, 2)
4735 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, NumberOfNamedEntries, 2)
4736 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, NumberOfNamedEntries, 12)
4737 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, NumberOfIdEntries, 2)
4738 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, NumberOfIdEntries, 2)
4739 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, NumberOfIdEntries, 14)
4742 static void test_pack_IMAGE_RESOURCE_DIRECTORY_ENTRY(void)
4744 /* IMAGE_RESOURCE_DIRECTORY_ENTRY */
4747 static void test_pack_IMAGE_RESOURCE_DIRECTORY_STRING(void)
4749 /* IMAGE_RESOURCE_DIRECTORY_STRING */
4750 TEST_TYPE_SIZE (IMAGE_RESOURCE_DIRECTORY_STRING, 4)
4751 TEST_TYPE_ALIGN (IMAGE_RESOURCE_DIRECTORY_STRING, 2)
4752 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY_STRING, Length, 2)
4753 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY_STRING, Length, 2)
4754 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY_STRING, Length, 0)
4755 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY_STRING, NameString, 1)
4756 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY_STRING, NameString, 1)
4757 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY_STRING, NameString, 2)
4760 static void test_pack_IMAGE_RESOURCE_DIR_STRING_U(void)
4762 /* IMAGE_RESOURCE_DIR_STRING_U */
4763 TEST_TYPE_SIZE (IMAGE_RESOURCE_DIR_STRING_U, 4)
4764 TEST_TYPE_ALIGN (IMAGE_RESOURCE_DIR_STRING_U, 2)
4765 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIR_STRING_U, Length, 2)
4766 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIR_STRING_U, Length, 2)
4767 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIR_STRING_U, Length, 0)
4768 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIR_STRING_U, NameString, 2)
4769 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIR_STRING_U, NameString, 2)
4770 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIR_STRING_U, NameString, 2)
4773 static void test_pack_IMAGE_SECTION_HEADER(void)
4775 /* IMAGE_SECTION_HEADER */
4776 TEST_FIELD_SIZE (IMAGE_SECTION_HEADER, Name, 8)
4777 TEST_FIELD_ALIGN (IMAGE_SECTION_HEADER, Name, 1)
4778 TEST_FIELD_OFFSET(IMAGE_SECTION_HEADER, Name, 0)
4781 static void test_pack_IMAGE_SEPARATE_DEBUG_HEADER(void)
4783 /* IMAGE_SEPARATE_DEBUG_HEADER */
4784 TEST_TYPE_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, 48)
4785 TEST_TYPE_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, 4)
4786 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Signature, 2)
4787 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Signature, 2)
4788 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Signature, 0)
4789 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Flags, 2)
4790 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Flags, 2)
4791 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Flags, 2)
4792 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Machine, 2)
4793 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Machine, 2)
4794 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Machine, 4)
4795 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Characteristics, 2)
4796 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Characteristics, 2)
4797 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Characteristics, 6)
4798 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, TimeDateStamp, 4)
4799 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, TimeDateStamp, 4)
4800 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, TimeDateStamp, 8)
4801 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, CheckSum, 4)
4802 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, CheckSum, 4)
4803 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, CheckSum, 12)
4804 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, ImageBase, 4)
4805 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, ImageBase, 4)
4806 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, ImageBase, 16)
4807 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, SizeOfImage, 4)
4808 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, SizeOfImage, 4)
4809 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, SizeOfImage, 20)
4810 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, NumberOfSections, 4)
4811 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, NumberOfSections, 4)
4812 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, NumberOfSections, 24)
4813 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, ExportedNamesSize, 4)
4814 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, ExportedNamesSize, 4)
4815 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, ExportedNamesSize, 28)
4816 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, DebugDirectorySize, 4)
4817 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, DebugDirectorySize, 4)
4818 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, DebugDirectorySize, 32)
4819 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, SectionAlignment, 4)
4820 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, SectionAlignment, 4)
4821 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, SectionAlignment, 36)
4822 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Reserved, 8)
4823 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Reserved, 4)
4824 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Reserved, 40)
4827 static void test_pack_IMAGE_SYMBOL(void)
4829 /* IMAGE_SYMBOL (pack 2) */
4832 static void test_pack_IMAGE_THUNK_DATA(void)
4834 /* IMAGE_THUNK_DATA */
4837 static void test_pack_IMAGE_TLS_DIRECTORY(void)
4839 /* IMAGE_TLS_DIRECTORY */
4840 TEST_TYPE_SIZE (IMAGE_TLS_DIRECTORY, 24)
4841 TEST_TYPE_ALIGN (IMAGE_TLS_DIRECTORY, 4)
4844 static void test_pack_IMAGE_TLS_DIRECTORY32(void)
4846 /* IMAGE_TLS_DIRECTORY32 */
4847 TEST_TYPE_SIZE (IMAGE_TLS_DIRECTORY32, 24)
4848 TEST_TYPE_ALIGN (IMAGE_TLS_DIRECTORY32, 4)
4849 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, StartAddressOfRawData, 4)
4850 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, StartAddressOfRawData, 4)
4851 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, StartAddressOfRawData, 0)
4852 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, EndAddressOfRawData, 4)
4853 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, EndAddressOfRawData, 4)
4854 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, EndAddressOfRawData, 4)
4855 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, AddressOfIndex, 4)
4856 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, AddressOfIndex, 4)
4857 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, AddressOfIndex, 8)
4858 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, AddressOfCallBacks, 4)
4859 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, AddressOfCallBacks, 4)
4860 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, AddressOfCallBacks, 12)
4861 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, SizeOfZeroFill, 4)
4862 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, SizeOfZeroFill, 4)
4863 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, SizeOfZeroFill, 16)
4864 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, Characteristics, 4)
4865 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, Characteristics, 4)
4866 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, Characteristics, 20)
4869 static void test_pack_IMAGE_TLS_DIRECTORY64(void)
4871 /* IMAGE_TLS_DIRECTORY64 */
4872 TEST_TYPE_SIZE (IMAGE_TLS_DIRECTORY64, 40)
4873 TEST_TYPE_ALIGN (IMAGE_TLS_DIRECTORY64, 8)
4874 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, StartAddressOfRawData, 8)
4875 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, StartAddressOfRawData, 8)
4876 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, StartAddressOfRawData, 0)
4877 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, EndAddressOfRawData, 8)
4878 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, EndAddressOfRawData, 8)
4879 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, EndAddressOfRawData, 8)
4880 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, AddressOfIndex, 8)
4881 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, AddressOfIndex, 8)
4882 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, AddressOfIndex, 16)
4883 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, AddressOfCallBacks, 8)
4884 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, AddressOfCallBacks, 8)
4885 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, AddressOfCallBacks, 24)
4886 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, SizeOfZeroFill, 4)
4887 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, SizeOfZeroFill, 4)
4888 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, SizeOfZeroFill, 32)
4889 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, Characteristics, 4)
4890 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, Characteristics, 4)
4891 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, Characteristics, 36)
4894 static void test_pack_IMAGE_VXD_HEADER(void)
4896 /* IMAGE_VXD_HEADER (pack 2) */
4897 TEST_TYPE_SIZE (IMAGE_VXD_HEADER, 196)
4898 TEST_TYPE_ALIGN (IMAGE_VXD_HEADER, 2)
4899 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_magic, 2)
4900 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_magic, 2)
4901 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_magic, 0)
4902 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_border, 1)
4903 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_border, 1)
4904 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_border, 2)
4905 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_worder, 1)
4906 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_worder, 1)
4907 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_worder, 3)
4908 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_level, 4)
4909 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_level, 2)
4910 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_level, 4)
4911 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_cpu, 2)
4912 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_cpu, 2)
4913 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_cpu, 8)
4914 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_os, 2)
4915 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_os, 2)
4916 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_os, 10)
4917 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ver, 4)
4918 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ver, 2)
4919 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ver, 12)
4920 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_mflags, 4)
4921 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_mflags, 2)
4922 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_mflags, 16)
4923 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_mpages, 4)
4924 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_mpages, 2)
4925 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_mpages, 20)
4926 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_startobj, 4)
4927 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_startobj, 2)
4928 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_startobj, 24)
4929 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_eip, 4)
4930 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_eip, 2)
4931 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_eip, 28)
4932 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_stackobj, 4)
4933 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_stackobj, 2)
4934 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_stackobj, 32)
4935 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_esp, 4)
4936 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_esp, 2)
4937 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_esp, 36)
4938 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_pagesize, 4)
4939 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_pagesize, 2)
4940 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_pagesize, 40)
4941 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_lastpagesize, 4)
4942 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_lastpagesize, 2)
4943 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_lastpagesize, 44)
4944 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_fixupsize, 4)
4945 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_fixupsize, 2)
4946 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_fixupsize, 48)
4947 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_fixupsum, 4)
4948 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_fixupsum, 2)
4949 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_fixupsum, 52)
4950 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ldrsize, 4)
4951 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ldrsize, 2)
4952 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ldrsize, 56)
4953 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ldrsum, 4)
4954 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ldrsum, 2)
4955 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ldrsum, 60)
4956 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_objtab, 4)
4957 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_objtab, 2)
4958 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_objtab, 64)
4959 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_objcnt, 4)
4960 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_objcnt, 2)
4961 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_objcnt, 68)
4962 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_objmap, 4)
4963 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_objmap, 2)
4964 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_objmap, 72)
4965 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_itermap, 4)
4966 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_itermap, 2)
4967 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_itermap, 76)
4968 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_rsrctab, 4)
4969 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_rsrctab, 2)
4970 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_rsrctab, 80)
4971 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_rsrccnt, 4)
4972 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_rsrccnt, 2)
4973 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_rsrccnt, 84)
4974 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_restab, 4)
4975 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_restab, 2)
4976 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_restab, 88)
4977 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_enttab, 4)
4978 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_enttab, 2)
4979 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_enttab, 92)
4980 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_dirtab, 4)
4981 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_dirtab, 2)
4982 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_dirtab, 96)
4983 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_dircnt, 4)
4984 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_dircnt, 2)
4985 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_dircnt, 100)
4986 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_fpagetab, 4)
4987 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_fpagetab, 2)
4988 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_fpagetab, 104)
4989 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_frectab, 4)
4990 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_frectab, 2)
4991 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_frectab, 108)
4992 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_impmod, 4)
4993 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_impmod, 2)
4994 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_impmod, 112)
4995 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_impmodcnt, 4)
4996 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_impmodcnt, 2)
4997 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_impmodcnt, 116)
4998 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_impproc, 4)
4999 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_impproc, 2)
5000 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_impproc, 120)
5001 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_pagesum, 4)
5002 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_pagesum, 2)
5003 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_pagesum, 124)
5004 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_datapage, 4)
5005 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_datapage, 2)
5006 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_datapage, 128)
5007 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_preload, 4)
5008 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_preload, 2)
5009 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_preload, 132)
5010 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_nrestab, 4)
5011 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_nrestab, 2)
5012 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_nrestab, 136)
5013 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_cbnrestab, 4)
5014 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_cbnrestab, 2)
5015 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_cbnrestab, 140)
5016 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_nressum, 4)
5017 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_nressum, 2)
5018 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_nressum, 144)
5019 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_autodata, 4)
5020 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_autodata, 2)
5021 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_autodata, 148)
5022 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_debuginfo, 4)
5023 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_debuginfo, 2)
5024 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_debuginfo, 152)
5025 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_debuglen, 4)
5026 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_debuglen, 2)
5027 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_debuglen, 156)
5028 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_instpreload, 4)
5029 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_instpreload, 2)
5030 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_instpreload, 160)
5031 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_instdemand, 4)
5032 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_instdemand, 2)
5033 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_instdemand, 164)
5034 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_heapsize, 4)
5035 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_heapsize, 2)
5036 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_heapsize, 168)
5037 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_res3, 12)
5038 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_res3, 1)
5039 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_res3, 172)
5040 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_winresoff, 4)
5041 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_winresoff, 2)
5042 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_winresoff, 184)
5043 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_winreslen, 4)
5044 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_winreslen, 2)
5045 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_winreslen, 188)
5046 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_devid, 2)
5047 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_devid, 2)
5048 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_devid, 192)
5049 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ddkver, 2)
5050 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ddkver, 2)
5051 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ddkver, 194)
5054 static void test_pack_IO_COUNTERS(void)
5056 /* IO_COUNTERS (pack 8) */
5057 TEST_TYPE_SIZE (IO_COUNTERS, 48)
5058 TEST_TYPE_ALIGN (IO_COUNTERS, 8)
5059 TEST_FIELD_SIZE (IO_COUNTERS, ReadOperationCount, 8)
5060 TEST_FIELD_ALIGN (IO_COUNTERS, ReadOperationCount, 8)
5061 TEST_FIELD_OFFSET(IO_COUNTERS, ReadOperationCount, 0)
5062 TEST_FIELD_SIZE (IO_COUNTERS, WriteOperationCount, 8)
5063 TEST_FIELD_ALIGN (IO_COUNTERS, WriteOperationCount, 8)
5064 TEST_FIELD_OFFSET(IO_COUNTERS, WriteOperationCount, 8)
5065 TEST_FIELD_SIZE (IO_COUNTERS, OtherOperationCount, 8)
5066 TEST_FIELD_ALIGN (IO_COUNTERS, OtherOperationCount, 8)
5067 TEST_FIELD_OFFSET(IO_COUNTERS, OtherOperationCount, 16)
5068 TEST_FIELD_SIZE (IO_COUNTERS, ReadTransferCount, 8)
5069 TEST_FIELD_ALIGN (IO_COUNTERS, ReadTransferCount, 8)
5070 TEST_FIELD_OFFSET(IO_COUNTERS, ReadTransferCount, 24)
5071 TEST_FIELD_SIZE (IO_COUNTERS, WriteTransferCount, 8)
5072 TEST_FIELD_ALIGN (IO_COUNTERS, WriteTransferCount, 8)
5073 TEST_FIELD_OFFSET(IO_COUNTERS, WriteTransferCount, 32)
5074 TEST_FIELD_SIZE (IO_COUNTERS, OtherTransferCount, 8)
5075 TEST_FIELD_ALIGN (IO_COUNTERS, OtherTransferCount, 8)
5076 TEST_FIELD_OFFSET(IO_COUNTERS, OtherTransferCount, 40)
5079 static void test_pack_LANGID(void)
5082 TEST_TYPE_SIZE (LANGID, 2)
5083 TEST_TYPE_ALIGN (LANGID, 2)
5084 TEST_TYPE_UNSIGNED(LANGID)
5087 static void test_pack_LARGE_INTEGER(void)
5092 static void test_pack_LCID(void)
5095 TEST_TYPE_SIZE (LCID, 4)
5096 TEST_TYPE_ALIGN (LCID, 4)
5097 TEST_TYPE_UNSIGNED(LCID)
5100 static void test_pack_LIST_ENTRY(void)
5103 TEST_TYPE_SIZE (LIST_ENTRY, 8)
5104 TEST_TYPE_ALIGN (LIST_ENTRY, 4)
5105 TEST_FIELD_SIZE (LIST_ENTRY, Flink, 4)
5106 TEST_FIELD_ALIGN (LIST_ENTRY, Flink, 4)
5107 TEST_FIELD_OFFSET(LIST_ENTRY, Flink, 0)
5108 TEST_FIELD_SIZE (LIST_ENTRY, Blink, 4)
5109 TEST_FIELD_ALIGN (LIST_ENTRY, Blink, 4)
5110 TEST_FIELD_OFFSET(LIST_ENTRY, Blink, 4)
5113 static void test_pack_LONG(void)
5116 TEST_TYPE_SIZE (LONG, 4)
5117 TEST_TYPE_ALIGN (LONG, 4)
5118 TEST_TYPE_SIGNED(LONG)
5121 static void test_pack_LONGLONG(void)
5124 TEST_TYPE_SIZE (LONGLONG, 8)
5125 TEST_TYPE_ALIGN (LONGLONG, 8)
5126 TEST_TYPE_SIGNED(LONGLONG)
5129 static void test_pack_LUID(void)
5132 TEST_TYPE_SIZE (LUID, 8)
5133 TEST_TYPE_ALIGN (LUID, 4)
5134 TEST_FIELD_SIZE (LUID, LowPart, 4)
5135 TEST_FIELD_ALIGN (LUID, LowPart, 4)
5136 TEST_FIELD_OFFSET(LUID, LowPart, 0)
5137 TEST_FIELD_SIZE (LUID, HighPart, 4)
5138 TEST_FIELD_ALIGN (LUID, HighPart, 4)
5139 TEST_FIELD_OFFSET(LUID, HighPart, 4)
5142 static void test_pack_LUID_AND_ATTRIBUTES(void)
5144 /* LUID_AND_ATTRIBUTES (pack 4) */
5145 TEST_TYPE_SIZE (LUID_AND_ATTRIBUTES, 12)
5146 TEST_TYPE_ALIGN (LUID_AND_ATTRIBUTES, 4)
5147 TEST_FIELD_SIZE (LUID_AND_ATTRIBUTES, Luid, 8)
5148 TEST_FIELD_ALIGN (LUID_AND_ATTRIBUTES, Luid, 4)
5149 TEST_FIELD_OFFSET(LUID_AND_ATTRIBUTES, Luid, 0)
5150 TEST_FIELD_SIZE (LUID_AND_ATTRIBUTES, Attributes, 4)
5151 TEST_FIELD_ALIGN (LUID_AND_ATTRIBUTES, Attributes, 4)
5152 TEST_FIELD_OFFSET(LUID_AND_ATTRIBUTES, Attributes, 8)
5155 static void test_pack_MEMORY_BASIC_INFORMATION(void)
5157 /* MEMORY_BASIC_INFORMATION */
5158 TEST_TYPE_SIZE (MEMORY_BASIC_INFORMATION, 28)
5159 TEST_TYPE_ALIGN (MEMORY_BASIC_INFORMATION, 4)
5160 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, BaseAddress, 4)
5161 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, BaseAddress, 4)
5162 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, BaseAddress, 0)
5163 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, AllocationBase, 4)
5164 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, AllocationBase, 4)
5165 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, AllocationBase, 4)
5166 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, AllocationProtect, 4)
5167 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, AllocationProtect, 4)
5168 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, AllocationProtect, 8)
5169 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, RegionSize, 4)
5170 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, RegionSize, 4)
5171 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, RegionSize, 12)
5172 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, State, 4)
5173 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, State, 4)
5174 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, State, 16)
5175 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, Protect, 4)
5176 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, Protect, 4)
5177 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, Protect, 20)
5178 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, Type, 4)
5179 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, Type, 4)
5180 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, Type, 24)
5183 static void test_pack_MESSAGE_RESOURCE_BLOCK(void)
5185 /* MESSAGE_RESOURCE_BLOCK */
5186 TEST_TYPE_SIZE (MESSAGE_RESOURCE_BLOCK, 12)
5187 TEST_TYPE_ALIGN (MESSAGE_RESOURCE_BLOCK, 4)
5188 TEST_FIELD_SIZE (MESSAGE_RESOURCE_BLOCK, LowId, 4)
5189 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_BLOCK, LowId, 4)
5190 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_BLOCK, LowId, 0)
5191 TEST_FIELD_SIZE (MESSAGE_RESOURCE_BLOCK, HighId, 4)
5192 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_BLOCK, HighId, 4)
5193 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_BLOCK, HighId, 4)
5194 TEST_FIELD_SIZE (MESSAGE_RESOURCE_BLOCK, OffsetToEntries, 4)
5195 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_BLOCK, OffsetToEntries, 4)
5196 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_BLOCK, OffsetToEntries, 8)
5199 static void test_pack_MESSAGE_RESOURCE_DATA(void)
5201 /* MESSAGE_RESOURCE_DATA */
5202 TEST_TYPE_SIZE (MESSAGE_RESOURCE_DATA, 16)
5203 TEST_TYPE_ALIGN (MESSAGE_RESOURCE_DATA, 4)
5204 TEST_FIELD_SIZE (MESSAGE_RESOURCE_DATA, NumberOfBlocks, 4)
5205 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_DATA, NumberOfBlocks, 4)
5206 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_DATA, NumberOfBlocks, 0)
5207 TEST_FIELD_SIZE (MESSAGE_RESOURCE_DATA, Blocks, 12)
5208 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_DATA, Blocks, 4)
5209 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_DATA, Blocks, 4)
5212 static void test_pack_MESSAGE_RESOURCE_ENTRY(void)
5214 /* MESSAGE_RESOURCE_ENTRY */
5215 TEST_TYPE_SIZE (MESSAGE_RESOURCE_ENTRY, 6)
5216 TEST_TYPE_ALIGN (MESSAGE_RESOURCE_ENTRY, 2)
5217 TEST_FIELD_SIZE (MESSAGE_RESOURCE_ENTRY, Length, 2)
5218 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_ENTRY, Length, 2)
5219 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_ENTRY, Length, 0)
5220 TEST_FIELD_SIZE (MESSAGE_RESOURCE_ENTRY, Flags, 2)
5221 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_ENTRY, Flags, 2)
5222 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_ENTRY, Flags, 2)
5223 TEST_FIELD_SIZE (MESSAGE_RESOURCE_ENTRY, Text, 1)
5224 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_ENTRY, Text, 1)
5225 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_ENTRY, Text, 4)
5228 static void test_pack_NT_TIB(void)
5231 TEST_FIELD_SIZE (NT_TIB, ExceptionList, 4)
5232 TEST_FIELD_ALIGN (NT_TIB, ExceptionList, 4)
5233 TEST_FIELD_OFFSET(NT_TIB, ExceptionList, 0)
5234 TEST_FIELD_SIZE (NT_TIB, StackBase, 4)
5235 TEST_FIELD_ALIGN (NT_TIB, StackBase, 4)
5236 TEST_FIELD_OFFSET(NT_TIB, StackBase, 4)
5237 TEST_FIELD_SIZE (NT_TIB, StackLimit, 4)
5238 TEST_FIELD_ALIGN (NT_TIB, StackLimit, 4)
5239 TEST_FIELD_OFFSET(NT_TIB, StackLimit, 8)
5240 TEST_FIELD_SIZE (NT_TIB, SubSystemTib, 4)
5241 TEST_FIELD_ALIGN (NT_TIB, SubSystemTib, 4)
5242 TEST_FIELD_OFFSET(NT_TIB, SubSystemTib, 12)
5245 static void test_pack_OBJECT_TYPE_LIST(void)
5247 /* OBJECT_TYPE_LIST */
5248 TEST_TYPE_SIZE (OBJECT_TYPE_LIST, 8)
5249 TEST_TYPE_ALIGN (OBJECT_TYPE_LIST, 4)
5250 TEST_FIELD_SIZE (OBJECT_TYPE_LIST, Level, 2)
5251 TEST_FIELD_ALIGN (OBJECT_TYPE_LIST, Level, 2)
5252 TEST_FIELD_OFFSET(OBJECT_TYPE_LIST, Level, 0)
5253 TEST_FIELD_SIZE (OBJECT_TYPE_LIST, Sbz, 2)
5254 TEST_FIELD_ALIGN (OBJECT_TYPE_LIST, Sbz, 2)
5255 TEST_FIELD_OFFSET(OBJECT_TYPE_LIST, Sbz, 2)
5256 TEST_FIELD_SIZE (OBJECT_TYPE_LIST, ObjectType, 4)
5257 TEST_FIELD_ALIGN (OBJECT_TYPE_LIST, ObjectType, 4)
5258 TEST_FIELD_OFFSET(OBJECT_TYPE_LIST, ObjectType, 4)
5261 static void test_pack_PACCESS_ALLOWED_ACE(void)
5263 /* PACCESS_ALLOWED_ACE */
5264 TEST_TYPE_SIZE (PACCESS_ALLOWED_ACE, 4)
5265 TEST_TYPE_ALIGN (PACCESS_ALLOWED_ACE, 4)
5266 TEST_TARGET_SIZE (PACCESS_ALLOWED_ACE, 12)
5267 TEST_TARGET_ALIGN(PACCESS_ALLOWED_ACE, 4)
5270 static void test_pack_PACCESS_DENIED_ACE(void)
5272 /* PACCESS_DENIED_ACE */
5273 TEST_TYPE_SIZE (PACCESS_DENIED_ACE, 4)
5274 TEST_TYPE_ALIGN (PACCESS_DENIED_ACE, 4)
5275 TEST_TARGET_SIZE (PACCESS_DENIED_ACE, 12)
5276 TEST_TARGET_ALIGN(PACCESS_DENIED_ACE, 4)
5279 static void test_pack_PACCESS_TOKEN(void)
5282 TEST_TYPE_SIZE (PACCESS_TOKEN, 4)
5283 TEST_TYPE_ALIGN (PACCESS_TOKEN, 4)
5286 static void test_pack_PACE_HEADER(void)
5289 TEST_TYPE_SIZE (PACE_HEADER, 4)
5290 TEST_TYPE_ALIGN (PACE_HEADER, 4)
5291 TEST_TARGET_SIZE (PACE_HEADER, 4)
5292 TEST_TARGET_ALIGN(PACE_HEADER, 2)
5295 static void test_pack_PACL(void)
5298 TEST_TYPE_SIZE (PACL, 4)
5299 TEST_TYPE_ALIGN (PACL, 4)
5300 TEST_TARGET_SIZE (PACL, 8)
5301 TEST_TARGET_ALIGN(PACL, 2)
5304 static void test_pack_PACL_REVISION_INFORMATION(void)
5306 /* PACL_REVISION_INFORMATION */
5307 TEST_TYPE_SIZE (PACL_REVISION_INFORMATION, 4)
5308 TEST_TYPE_ALIGN (PACL_REVISION_INFORMATION, 4)
5309 TEST_TARGET_SIZE (PACL_REVISION_INFORMATION, 4)
5310 TEST_TARGET_ALIGN(PACL_REVISION_INFORMATION, 4)
5313 static void test_pack_PACL_SIZE_INFORMATION(void)
5315 /* PACL_SIZE_INFORMATION */
5316 TEST_TYPE_SIZE (PACL_SIZE_INFORMATION, 4)
5317 TEST_TYPE_ALIGN (PACL_SIZE_INFORMATION, 4)
5318 TEST_TARGET_SIZE (PACL_SIZE_INFORMATION, 12)
5319 TEST_TARGET_ALIGN(PACL_SIZE_INFORMATION, 4)
5322 static void test_pack_PCCH(void)
5325 TEST_TYPE_SIZE (PCCH, 4)
5326 TEST_TYPE_ALIGN (PCCH, 4)
5327 TEST_TARGET_SIZE (PCCH, 1)
5328 TEST_TARGET_ALIGN(PCCH, 1)
5331 static void test_pack_PCH(void)
5334 TEST_TYPE_SIZE (PCH, 4)
5335 TEST_TYPE_ALIGN (PCH, 4)
5336 TEST_TARGET_SIZE (PCH, 1)
5337 TEST_TARGET_ALIGN(PCH, 1)
5340 static void test_pack_PCSTR(void)
5343 TEST_TYPE_SIZE (PCSTR, 4)
5344 TEST_TYPE_ALIGN (PCSTR, 4)
5345 TEST_TARGET_SIZE (PCSTR, 1)
5346 TEST_TARGET_ALIGN(PCSTR, 1)
5349 static void test_pack_PCTSTR(void)
5352 TEST_TYPE_SIZE (PCTSTR, 4)
5353 TEST_TYPE_ALIGN (PCTSTR, 4)
5356 static void test_pack_PCWCH(void)
5359 TEST_TYPE_SIZE (PCWCH, 4)
5360 TEST_TYPE_ALIGN (PCWCH, 4)
5361 TEST_TARGET_SIZE (PCWCH, 2)
5362 TEST_TARGET_ALIGN(PCWCH, 2)
5365 static void test_pack_PCWSTR(void)
5368 TEST_TYPE_SIZE (PCWSTR, 4)
5369 TEST_TYPE_ALIGN (PCWSTR, 4)
5370 TEST_TARGET_SIZE (PCWSTR, 2)
5371 TEST_TARGET_ALIGN(PCWSTR, 2)
5374 static void test_pack_PEXCEPTION_POINTERS(void)
5376 /* PEXCEPTION_POINTERS */
5377 TEST_TYPE_SIZE (PEXCEPTION_POINTERS, 4)
5378 TEST_TYPE_ALIGN (PEXCEPTION_POINTERS, 4)
5379 TEST_TARGET_SIZE (PEXCEPTION_POINTERS, 8)
5380 TEST_TARGET_ALIGN(PEXCEPTION_POINTERS, 4)
5383 static void test_pack_PEXCEPTION_RECORD(void)
5385 /* PEXCEPTION_RECORD */
5386 TEST_TYPE_SIZE (PEXCEPTION_RECORD, 4)
5387 TEST_TYPE_ALIGN (PEXCEPTION_RECORD, 4)
5388 TEST_TARGET_SIZE (PEXCEPTION_RECORD, 80)
5389 TEST_TARGET_ALIGN(PEXCEPTION_RECORD, 4)
5392 static void test_pack_PFLOATING_SAVE_AREA(void)
5394 /* PFLOATING_SAVE_AREA */
5395 TEST_TYPE_SIZE (PFLOATING_SAVE_AREA, 4)
5396 TEST_TYPE_ALIGN (PFLOATING_SAVE_AREA, 4)
5397 TEST_TARGET_SIZE (PFLOATING_SAVE_AREA, 112)
5398 TEST_TARGET_ALIGN(PFLOATING_SAVE_AREA, 4)
5401 static void test_pack_PFPO_DATA(void)
5404 TEST_TYPE_SIZE (PFPO_DATA, 4)
5405 TEST_TYPE_ALIGN (PFPO_DATA, 4)
5406 TEST_TARGET_SIZE (PFPO_DATA, 16)
5407 TEST_TARGET_ALIGN(PFPO_DATA, 4)
5410 static void test_pack_PGENERIC_MAPPING(void)
5412 /* PGENERIC_MAPPING */
5413 TEST_TYPE_SIZE (PGENERIC_MAPPING, 4)
5414 TEST_TYPE_ALIGN (PGENERIC_MAPPING, 4)
5415 TEST_TARGET_SIZE (PGENERIC_MAPPING, 16)
5416 TEST_TARGET_ALIGN(PGENERIC_MAPPING, 4)
5419 static void test_pack_PHANDLE(void)
5422 TEST_TYPE_SIZE (PHANDLE, 4)
5423 TEST_TYPE_ALIGN (PHANDLE, 4)
5424 TEST_TARGET_SIZE (PHANDLE, 4)
5425 TEST_TARGET_ALIGN(PHANDLE, 4)
5428 static void test_pack_PIMAGE_ARCHIVE_MEMBER_HEADER(void)
5430 /* PIMAGE_ARCHIVE_MEMBER_HEADER */
5431 TEST_TYPE_SIZE (PIMAGE_ARCHIVE_MEMBER_HEADER, 4)
5432 TEST_TYPE_ALIGN (PIMAGE_ARCHIVE_MEMBER_HEADER, 4)
5433 TEST_TARGET_SIZE (PIMAGE_ARCHIVE_MEMBER_HEADER, 60)
5434 TEST_TARGET_ALIGN(PIMAGE_ARCHIVE_MEMBER_HEADER, 1)
5437 static void test_pack_PIMAGE_AUX_SYMBOL(void)
5439 /* PIMAGE_AUX_SYMBOL */
5440 TEST_TYPE_SIZE (PIMAGE_AUX_SYMBOL, 4)
5441 TEST_TYPE_ALIGN (PIMAGE_AUX_SYMBOL, 4)
5444 static void test_pack_PIMAGE_BASE_RELOCATION(void)
5446 /* PIMAGE_BASE_RELOCATION */
5447 TEST_TYPE_SIZE (PIMAGE_BASE_RELOCATION, 4)
5448 TEST_TYPE_ALIGN (PIMAGE_BASE_RELOCATION, 4)
5449 TEST_TARGET_SIZE (PIMAGE_BASE_RELOCATION, 8)
5450 TEST_TARGET_ALIGN(PIMAGE_BASE_RELOCATION, 4)
5453 static void test_pack_PIMAGE_BOUND_FORWARDER_REF(void)
5455 /* PIMAGE_BOUND_FORWARDER_REF */
5456 TEST_TYPE_SIZE (PIMAGE_BOUND_FORWARDER_REF, 4)
5457 TEST_TYPE_ALIGN (PIMAGE_BOUND_FORWARDER_REF, 4)
5458 TEST_TARGET_SIZE (PIMAGE_BOUND_FORWARDER_REF, 8)
5459 TEST_TARGET_ALIGN(PIMAGE_BOUND_FORWARDER_REF, 4)
5462 static void test_pack_PIMAGE_BOUND_IMPORT_DESCRIPTOR(void)
5464 /* PIMAGE_BOUND_IMPORT_DESCRIPTOR */
5465 TEST_TYPE_SIZE (PIMAGE_BOUND_IMPORT_DESCRIPTOR, 4)
5466 TEST_TYPE_ALIGN (PIMAGE_BOUND_IMPORT_DESCRIPTOR, 4)
5467 TEST_TARGET_SIZE (PIMAGE_BOUND_IMPORT_DESCRIPTOR, 8)
5468 TEST_TARGET_ALIGN(PIMAGE_BOUND_IMPORT_DESCRIPTOR, 4)
5471 static void test_pack_PIMAGE_COFF_SYMBOLS_HEADER(void)
5473 /* PIMAGE_COFF_SYMBOLS_HEADER */
5474 TEST_TYPE_SIZE (PIMAGE_COFF_SYMBOLS_HEADER, 4)
5475 TEST_TYPE_ALIGN (PIMAGE_COFF_SYMBOLS_HEADER, 4)
5476 TEST_TARGET_SIZE (PIMAGE_COFF_SYMBOLS_HEADER, 32)
5477 TEST_TARGET_ALIGN(PIMAGE_COFF_SYMBOLS_HEADER, 4)
5480 static void test_pack_PIMAGE_DATA_DIRECTORY(void)
5482 /* PIMAGE_DATA_DIRECTORY */
5483 TEST_TYPE_SIZE (PIMAGE_DATA_DIRECTORY, 4)
5484 TEST_TYPE_ALIGN (PIMAGE_DATA_DIRECTORY, 4)
5485 TEST_TARGET_SIZE (PIMAGE_DATA_DIRECTORY, 8)
5486 TEST_TARGET_ALIGN(PIMAGE_DATA_DIRECTORY, 4)
5489 static void test_pack_PIMAGE_DEBUG_DIRECTORY(void)
5491 /* PIMAGE_DEBUG_DIRECTORY */
5492 TEST_TYPE_SIZE (PIMAGE_DEBUG_DIRECTORY, 4)
5493 TEST_TYPE_ALIGN (PIMAGE_DEBUG_DIRECTORY, 4)
5494 TEST_TARGET_SIZE (PIMAGE_DEBUG_DIRECTORY, 28)
5495 TEST_TARGET_ALIGN(PIMAGE_DEBUG_DIRECTORY, 4)
5498 static void test_pack_PIMAGE_DEBUG_MISC(void)
5500 /* PIMAGE_DEBUG_MISC */
5501 TEST_TYPE_SIZE (PIMAGE_DEBUG_MISC, 4)
5502 TEST_TYPE_ALIGN (PIMAGE_DEBUG_MISC, 4)
5503 TEST_TARGET_SIZE (PIMAGE_DEBUG_MISC, 16)
5504 TEST_TARGET_ALIGN(PIMAGE_DEBUG_MISC, 4)
5507 static void test_pack_PIMAGE_DOS_HEADER(void)
5509 /* PIMAGE_DOS_HEADER */
5510 TEST_TYPE_SIZE (PIMAGE_DOS_HEADER, 4)
5511 TEST_TYPE_ALIGN (PIMAGE_DOS_HEADER, 4)
5512 TEST_TARGET_SIZE (PIMAGE_DOS_HEADER, 64)
5513 TEST_TARGET_ALIGN(PIMAGE_DOS_HEADER, 2)
5516 static void test_pack_PIMAGE_EXPORT_DIRECTORY(void)
5518 /* PIMAGE_EXPORT_DIRECTORY */
5519 TEST_TYPE_SIZE (PIMAGE_EXPORT_DIRECTORY, 4)
5520 TEST_TYPE_ALIGN (PIMAGE_EXPORT_DIRECTORY, 4)
5521 TEST_TARGET_SIZE (PIMAGE_EXPORT_DIRECTORY, 40)
5522 TEST_TARGET_ALIGN(PIMAGE_EXPORT_DIRECTORY, 4)
5525 static void test_pack_PIMAGE_FILE_HEADER(void)
5527 /* PIMAGE_FILE_HEADER */
5528 TEST_TYPE_SIZE (PIMAGE_FILE_HEADER, 4)
5529 TEST_TYPE_ALIGN (PIMAGE_FILE_HEADER, 4)
5530 TEST_TARGET_SIZE (PIMAGE_FILE_HEADER, 20)
5531 TEST_TARGET_ALIGN(PIMAGE_FILE_HEADER, 4)
5534 static void test_pack_PIMAGE_FUNCTION_ENTRY(void)
5536 /* PIMAGE_FUNCTION_ENTRY */
5537 TEST_TYPE_SIZE (PIMAGE_FUNCTION_ENTRY, 4)
5538 TEST_TYPE_ALIGN (PIMAGE_FUNCTION_ENTRY, 4)
5539 TEST_TARGET_SIZE (PIMAGE_FUNCTION_ENTRY, 12)
5540 TEST_TARGET_ALIGN(PIMAGE_FUNCTION_ENTRY, 4)
5543 static void test_pack_PIMAGE_IMPORT_BY_NAME(void)
5545 /* PIMAGE_IMPORT_BY_NAME */
5546 TEST_TYPE_SIZE (PIMAGE_IMPORT_BY_NAME, 4)
5547 TEST_TYPE_ALIGN (PIMAGE_IMPORT_BY_NAME, 4)
5548 TEST_TARGET_SIZE (PIMAGE_IMPORT_BY_NAME, 4)
5549 TEST_TARGET_ALIGN(PIMAGE_IMPORT_BY_NAME, 2)
5552 static void test_pack_PIMAGE_IMPORT_DESCRIPTOR(void)
5554 /* PIMAGE_IMPORT_DESCRIPTOR */
5555 TEST_TYPE_SIZE (PIMAGE_IMPORT_DESCRIPTOR, 4)
5556 TEST_TYPE_ALIGN (PIMAGE_IMPORT_DESCRIPTOR, 4)
5559 static void test_pack_PIMAGE_LINENUMBER(void)
5561 /* PIMAGE_LINENUMBER */
5562 TEST_TYPE_SIZE (PIMAGE_LINENUMBER, 4)
5563 TEST_TYPE_ALIGN (PIMAGE_LINENUMBER, 4)
5566 static void test_pack_PIMAGE_LOAD_CONFIG_DIRECTORY(void)
5568 /* PIMAGE_LOAD_CONFIG_DIRECTORY */
5569 TEST_TYPE_SIZE (PIMAGE_LOAD_CONFIG_DIRECTORY, 4)
5570 TEST_TYPE_ALIGN (PIMAGE_LOAD_CONFIG_DIRECTORY, 4)
5571 TEST_TARGET_SIZE (PIMAGE_LOAD_CONFIG_DIRECTORY, 72)
5572 TEST_TARGET_ALIGN(PIMAGE_LOAD_CONFIG_DIRECTORY, 4)
5575 static void test_pack_PIMAGE_NT_HEADERS(void)
5577 /* PIMAGE_NT_HEADERS */
5578 TEST_TYPE_SIZE (PIMAGE_NT_HEADERS, 4)
5579 TEST_TYPE_ALIGN (PIMAGE_NT_HEADERS, 4)
5582 static void test_pack_PIMAGE_NT_HEADERS32(void)
5584 /* PIMAGE_NT_HEADERS32 */
5585 TEST_TYPE_SIZE (PIMAGE_NT_HEADERS32, 4)
5586 TEST_TYPE_ALIGN (PIMAGE_NT_HEADERS32, 4)
5587 TEST_TARGET_SIZE (PIMAGE_NT_HEADERS32, 248)
5588 TEST_TARGET_ALIGN(PIMAGE_NT_HEADERS32, 4)
5591 static void test_pack_PIMAGE_NT_HEADERS64(void)
5593 /* PIMAGE_NT_HEADERS64 */
5594 TEST_TYPE_SIZE (PIMAGE_NT_HEADERS64, 4)
5595 TEST_TYPE_ALIGN (PIMAGE_NT_HEADERS64, 4)
5596 TEST_TARGET_SIZE (PIMAGE_NT_HEADERS64, 264)
5597 TEST_TARGET_ALIGN(PIMAGE_NT_HEADERS64, 8)
5600 static void test_pack_PIMAGE_OPTIONAL_HEADER(void)
5602 /* PIMAGE_OPTIONAL_HEADER */
5603 TEST_TYPE_SIZE (PIMAGE_OPTIONAL_HEADER, 4)
5604 TEST_TYPE_ALIGN (PIMAGE_OPTIONAL_HEADER, 4)
5607 static void test_pack_PIMAGE_OPTIONAL_HEADER32(void)
5609 /* PIMAGE_OPTIONAL_HEADER32 */
5610 TEST_TYPE_SIZE (PIMAGE_OPTIONAL_HEADER32, 4)
5611 TEST_TYPE_ALIGN (PIMAGE_OPTIONAL_HEADER32, 4)
5612 TEST_TARGET_SIZE (PIMAGE_OPTIONAL_HEADER32, 224)
5613 TEST_TARGET_ALIGN(PIMAGE_OPTIONAL_HEADER32, 4)
5616 static void test_pack_PIMAGE_OPTIONAL_HEADER64(void)
5618 /* PIMAGE_OPTIONAL_HEADER64 */
5619 TEST_TYPE_SIZE (PIMAGE_OPTIONAL_HEADER64, 4)
5620 TEST_TYPE_ALIGN (PIMAGE_OPTIONAL_HEADER64, 4)
5621 TEST_TARGET_SIZE (PIMAGE_OPTIONAL_HEADER64, 240)
5622 TEST_TARGET_ALIGN(PIMAGE_OPTIONAL_HEADER64, 8)
5625 static void test_pack_PIMAGE_OS2_HEADER(void)
5627 /* PIMAGE_OS2_HEADER */
5628 TEST_TYPE_SIZE (PIMAGE_OS2_HEADER, 4)
5629 TEST_TYPE_ALIGN (PIMAGE_OS2_HEADER, 4)
5630 TEST_TARGET_SIZE (PIMAGE_OS2_HEADER, 64)
5631 TEST_TARGET_ALIGN(PIMAGE_OS2_HEADER, 2)
5634 static void test_pack_PIMAGE_RELOCATION(void)
5636 /* PIMAGE_RELOCATION */
5637 TEST_TYPE_SIZE (PIMAGE_RELOCATION, 4)
5638 TEST_TYPE_ALIGN (PIMAGE_RELOCATION, 4)
5641 static void test_pack_PIMAGE_RESOURCE_DATA_ENTRY(void)
5643 /* PIMAGE_RESOURCE_DATA_ENTRY */
5644 TEST_TYPE_SIZE (PIMAGE_RESOURCE_DATA_ENTRY, 4)
5645 TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DATA_ENTRY, 4)
5646 TEST_TARGET_SIZE (PIMAGE_RESOURCE_DATA_ENTRY, 16)
5647 TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DATA_ENTRY, 4)
5650 static void test_pack_PIMAGE_RESOURCE_DIRECTORY(void)
5652 /* PIMAGE_RESOURCE_DIRECTORY */
5653 TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIRECTORY, 4)
5654 TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIRECTORY, 4)
5655 TEST_TARGET_SIZE (PIMAGE_RESOURCE_DIRECTORY, 16)
5656 TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DIRECTORY, 4)
5659 static void test_pack_PIMAGE_RESOURCE_DIRECTORY_ENTRY(void)
5661 /* PIMAGE_RESOURCE_DIRECTORY_ENTRY */
5662 TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIRECTORY_ENTRY, 4)
5663 TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIRECTORY_ENTRY, 4)
5666 static void test_pack_PIMAGE_RESOURCE_DIRECTORY_STRING(void)
5668 /* PIMAGE_RESOURCE_DIRECTORY_STRING */
5669 TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIRECTORY_STRING, 4)
5670 TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIRECTORY_STRING, 4)
5671 TEST_TARGET_SIZE (PIMAGE_RESOURCE_DIRECTORY_STRING, 4)
5672 TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DIRECTORY_STRING, 2)
5675 static void test_pack_PIMAGE_RESOURCE_DIR_STRING_U(void)
5677 /* PIMAGE_RESOURCE_DIR_STRING_U */
5678 TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIR_STRING_U, 4)
5679 TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIR_STRING_U, 4)
5680 TEST_TARGET_SIZE (PIMAGE_RESOURCE_DIR_STRING_U, 4)
5681 TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DIR_STRING_U, 2)
5684 static void test_pack_PIMAGE_SECTION_HEADER(void)
5686 /* PIMAGE_SECTION_HEADER */
5687 TEST_TYPE_SIZE (PIMAGE_SECTION_HEADER, 4)
5688 TEST_TYPE_ALIGN (PIMAGE_SECTION_HEADER, 4)
5691 static void test_pack_PIMAGE_SEPARATE_DEBUG_HEADER(void)
5693 /* PIMAGE_SEPARATE_DEBUG_HEADER */
5694 TEST_TYPE_SIZE (PIMAGE_SEPARATE_DEBUG_HEADER, 4)
5695 TEST_TYPE_ALIGN (PIMAGE_SEPARATE_DEBUG_HEADER, 4)
5696 TEST_TARGET_SIZE (PIMAGE_SEPARATE_DEBUG_HEADER, 48)
5697 TEST_TARGET_ALIGN(PIMAGE_SEPARATE_DEBUG_HEADER, 4)
5700 static void test_pack_PIMAGE_SYMBOL(void)
5703 TEST_TYPE_SIZE (PIMAGE_SYMBOL, 4)
5704 TEST_TYPE_ALIGN (PIMAGE_SYMBOL, 4)
5707 static void test_pack_PIMAGE_THUNK_DATA(void)
5709 /* PIMAGE_THUNK_DATA */
5710 TEST_TYPE_SIZE (PIMAGE_THUNK_DATA, 4)
5711 TEST_TYPE_ALIGN (PIMAGE_THUNK_DATA, 4)
5714 static void test_pack_PIMAGE_TLS_CALLBACK(void)
5716 /* PIMAGE_TLS_CALLBACK */
5717 TEST_TYPE_SIZE (PIMAGE_TLS_CALLBACK, 4)
5718 TEST_TYPE_ALIGN (PIMAGE_TLS_CALLBACK, 4)
5721 static void test_pack_PIMAGE_TLS_DIRECTORY(void)
5723 /* PIMAGE_TLS_DIRECTORY */
5724 TEST_TYPE_SIZE (PIMAGE_TLS_DIRECTORY, 4)
5725 TEST_TYPE_ALIGN (PIMAGE_TLS_DIRECTORY, 4)
5728 static void test_pack_PIMAGE_VXD_HEADER(void)
5730 /* PIMAGE_VXD_HEADER */
5731 TEST_TYPE_SIZE (PIMAGE_VXD_HEADER, 4)
5732 TEST_TYPE_ALIGN (PIMAGE_VXD_HEADER, 4)
5733 TEST_TARGET_SIZE (PIMAGE_VXD_HEADER, 196)
5734 TEST_TARGET_ALIGN(PIMAGE_VXD_HEADER, 2)
5737 static void test_pack_PIO_COUNTERS(void)
5740 TEST_TYPE_SIZE (PIO_COUNTERS, 4)
5741 TEST_TYPE_ALIGN (PIO_COUNTERS, 4)
5742 TEST_TARGET_SIZE (PIO_COUNTERS, 48)
5743 TEST_TARGET_ALIGN(PIO_COUNTERS, 8)
5746 static void test_pack_PISECURITY_DESCRIPTOR(void)
5748 /* PISECURITY_DESCRIPTOR */
5749 TEST_TYPE_SIZE (PISECURITY_DESCRIPTOR, 4)
5750 TEST_TYPE_ALIGN (PISECURITY_DESCRIPTOR, 4)
5751 TEST_TARGET_SIZE (PISECURITY_DESCRIPTOR, 20)
5752 TEST_TARGET_ALIGN(PISECURITY_DESCRIPTOR, 4)
5755 static void test_pack_PISECURITY_DESCRIPTOR_RELATIVE(void)
5757 /* PISECURITY_DESCRIPTOR_RELATIVE */
5758 TEST_TYPE_SIZE (PISECURITY_DESCRIPTOR_RELATIVE, 4)
5759 TEST_TYPE_ALIGN (PISECURITY_DESCRIPTOR_RELATIVE, 4)
5760 TEST_TARGET_SIZE (PISECURITY_DESCRIPTOR_RELATIVE, 20)
5761 TEST_TARGET_ALIGN(PISECURITY_DESCRIPTOR_RELATIVE, 4)
5764 static void test_pack_PISID(void)
5767 TEST_TYPE_SIZE (PISID, 4)
5768 TEST_TYPE_ALIGN (PISID, 4)
5769 TEST_TARGET_SIZE (PISID, 12)
5770 TEST_TARGET_ALIGN(PISID, 4)
5773 static void test_pack_PLARGE_INTEGER(void)
5775 /* PLARGE_INTEGER */
5776 TEST_TYPE_SIZE (PLARGE_INTEGER, 4)
5777 TEST_TYPE_ALIGN (PLARGE_INTEGER, 4)
5780 static void test_pack_PLIST_ENTRY(void)
5783 TEST_TYPE_SIZE (PLIST_ENTRY, 4)
5784 TEST_TYPE_ALIGN (PLIST_ENTRY, 4)
5785 TEST_TARGET_SIZE (PLIST_ENTRY, 8)
5786 TEST_TARGET_ALIGN(PLIST_ENTRY, 4)
5789 static void test_pack_PLUID(void)
5792 TEST_TYPE_SIZE (PLUID, 4)
5793 TEST_TYPE_ALIGN (PLUID, 4)
5794 TEST_TARGET_SIZE (PLUID, 8)
5795 TEST_TARGET_ALIGN(PLUID, 4)
5798 static void test_pack_PLUID_AND_ATTRIBUTES(void)
5800 /* PLUID_AND_ATTRIBUTES */
5801 TEST_TYPE_SIZE (PLUID_AND_ATTRIBUTES, 4)
5802 TEST_TYPE_ALIGN (PLUID_AND_ATTRIBUTES, 4)
5803 TEST_TARGET_SIZE (PLUID_AND_ATTRIBUTES, 12)
5804 TEST_TARGET_ALIGN(PLUID_AND_ATTRIBUTES, 4)
5807 static void test_pack_PMEMORY_BASIC_INFORMATION(void)
5809 /* PMEMORY_BASIC_INFORMATION */
5810 TEST_TYPE_SIZE (PMEMORY_BASIC_INFORMATION, 4)
5811 TEST_TYPE_ALIGN (PMEMORY_BASIC_INFORMATION, 4)
5812 TEST_TARGET_SIZE (PMEMORY_BASIC_INFORMATION, 28)
5813 TEST_TARGET_ALIGN(PMEMORY_BASIC_INFORMATION, 4)
5816 static void test_pack_PMESSAGE_RESOURCE_BLOCK(void)
5818 /* PMESSAGE_RESOURCE_BLOCK */
5819 TEST_TYPE_SIZE (PMESSAGE_RESOURCE_BLOCK, 4)
5820 TEST_TYPE_ALIGN (PMESSAGE_RESOURCE_BLOCK, 4)
5821 TEST_TARGET_SIZE (PMESSAGE_RESOURCE_BLOCK, 12)
5822 TEST_TARGET_ALIGN(PMESSAGE_RESOURCE_BLOCK, 4)
5825 static void test_pack_PMESSAGE_RESOURCE_DATA(void)
5827 /* PMESSAGE_RESOURCE_DATA */
5828 TEST_TYPE_SIZE (PMESSAGE_RESOURCE_DATA, 4)
5829 TEST_TYPE_ALIGN (PMESSAGE_RESOURCE_DATA, 4)
5830 TEST_TARGET_SIZE (PMESSAGE_RESOURCE_DATA, 16)
5831 TEST_TARGET_ALIGN(PMESSAGE_RESOURCE_DATA, 4)
5834 static void test_pack_PMESSAGE_RESOURCE_ENTRY(void)
5836 /* PMESSAGE_RESOURCE_ENTRY */
5837 TEST_TYPE_SIZE (PMESSAGE_RESOURCE_ENTRY, 4)
5838 TEST_TYPE_ALIGN (PMESSAGE_RESOURCE_ENTRY, 4)
5839 TEST_TARGET_SIZE (PMESSAGE_RESOURCE_ENTRY, 6)
5840 TEST_TARGET_ALIGN(PMESSAGE_RESOURCE_ENTRY, 2)
5843 static void test_pack_PNT_TIB(void)
5846 TEST_TYPE_SIZE (PNT_TIB, 4)
5847 TEST_TYPE_ALIGN (PNT_TIB, 4)
5850 static void test_pack_POBJECT_TYPE_LIST(void)
5852 /* POBJECT_TYPE_LIST */
5853 TEST_TYPE_SIZE (POBJECT_TYPE_LIST, 4)
5854 TEST_TYPE_ALIGN (POBJECT_TYPE_LIST, 4)
5855 TEST_TARGET_SIZE (POBJECT_TYPE_LIST, 8)
5856 TEST_TARGET_ALIGN(POBJECT_TYPE_LIST, 4)
5859 static void test_pack_PPRIVILEGE_SET(void)
5861 /* PPRIVILEGE_SET */
5862 TEST_TYPE_SIZE (PPRIVILEGE_SET, 4)
5863 TEST_TYPE_ALIGN (PPRIVILEGE_SET, 4)
5864 TEST_TARGET_SIZE (PPRIVILEGE_SET, 20)
5865 TEST_TARGET_ALIGN(PPRIVILEGE_SET, 4)
5868 static void test_pack_PRIVILEGE_SET(void)
5871 TEST_TYPE_SIZE (PRIVILEGE_SET, 20)
5872 TEST_TYPE_ALIGN (PRIVILEGE_SET, 4)
5873 TEST_FIELD_SIZE (PRIVILEGE_SET, PrivilegeCount, 4)
5874 TEST_FIELD_ALIGN (PRIVILEGE_SET, PrivilegeCount, 4)
5875 TEST_FIELD_OFFSET(PRIVILEGE_SET, PrivilegeCount, 0)
5876 TEST_FIELD_SIZE (PRIVILEGE_SET, Control, 4)
5877 TEST_FIELD_ALIGN (PRIVILEGE_SET, Control, 4)
5878 TEST_FIELD_OFFSET(PRIVILEGE_SET, Control, 4)
5879 TEST_FIELD_SIZE (PRIVILEGE_SET, Privilege, 12)
5880 TEST_FIELD_ALIGN (PRIVILEGE_SET, Privilege, 4)
5881 TEST_FIELD_OFFSET(PRIVILEGE_SET, Privilege, 8)
5884 static void test_pack_PRLIST_ENTRY(void)
5887 TEST_TYPE_SIZE (PRLIST_ENTRY, 4)
5888 TEST_TYPE_ALIGN (PRLIST_ENTRY, 4)
5889 TEST_TARGET_SIZE (PRLIST_ENTRY, 8)
5890 TEST_TARGET_ALIGN(PRLIST_ENTRY, 4)
5893 static void test_pack_PRTL_CRITICAL_SECTION(void)
5895 /* PRTL_CRITICAL_SECTION */
5896 TEST_TYPE_SIZE (PRTL_CRITICAL_SECTION, 4)
5897 TEST_TYPE_ALIGN (PRTL_CRITICAL_SECTION, 4)
5898 TEST_TARGET_SIZE (PRTL_CRITICAL_SECTION, 24)
5899 TEST_TARGET_ALIGN(PRTL_CRITICAL_SECTION, 4)
5902 static void test_pack_PRTL_CRITICAL_SECTION_DEBUG(void)
5904 /* PRTL_CRITICAL_SECTION_DEBUG */
5905 TEST_TYPE_SIZE (PRTL_CRITICAL_SECTION_DEBUG, 4)
5906 TEST_TYPE_ALIGN (PRTL_CRITICAL_SECTION_DEBUG, 4)
5909 static void test_pack_PRTL_OSVERSIONINFOEXW(void)
5911 /* PRTL_OSVERSIONINFOEXW */
5912 TEST_TYPE_SIZE (PRTL_OSVERSIONINFOEXW, 4)
5913 TEST_TYPE_ALIGN (PRTL_OSVERSIONINFOEXW, 4)
5914 TEST_TARGET_SIZE (PRTL_OSVERSIONINFOEXW, 284)
5915 TEST_TARGET_ALIGN(PRTL_OSVERSIONINFOEXW, 4)
5918 static void test_pack_PRTL_OSVERSIONINFOW(void)
5920 /* PRTL_OSVERSIONINFOW */
5921 TEST_TYPE_SIZE (PRTL_OSVERSIONINFOW, 4)
5922 TEST_TYPE_ALIGN (PRTL_OSVERSIONINFOW, 4)
5923 TEST_TARGET_SIZE (PRTL_OSVERSIONINFOW, 276)
5924 TEST_TARGET_ALIGN(PRTL_OSVERSIONINFOW, 4)
5927 static void test_pack_PRTL_RESOURCE_DEBUG(void)
5929 /* PRTL_RESOURCE_DEBUG */
5930 TEST_TYPE_SIZE (PRTL_RESOURCE_DEBUG, 4)
5931 TEST_TYPE_ALIGN (PRTL_RESOURCE_DEBUG, 4)
5934 static void test_pack_PSECURITY_DESCRIPTOR(void)
5936 /* PSECURITY_DESCRIPTOR */
5937 TEST_TYPE_SIZE (PSECURITY_DESCRIPTOR, 4)
5938 TEST_TYPE_ALIGN (PSECURITY_DESCRIPTOR, 4)
5941 static void test_pack_PSECURITY_QUALITY_OF_SERVICE(void)
5943 /* PSECURITY_QUALITY_OF_SERVICE */
5944 TEST_TYPE_SIZE (PSECURITY_QUALITY_OF_SERVICE, 4)
5945 TEST_TYPE_ALIGN (PSECURITY_QUALITY_OF_SERVICE, 4)
5948 static void test_pack_PSID(void)
5951 TEST_TYPE_SIZE (PSID, 4)
5952 TEST_TYPE_ALIGN (PSID, 4)
5955 static void test_pack_PSID_IDENTIFIER_AUTHORITY(void)
5957 /* PSID_IDENTIFIER_AUTHORITY */
5958 TEST_TYPE_SIZE (PSID_IDENTIFIER_AUTHORITY, 4)
5959 TEST_TYPE_ALIGN (PSID_IDENTIFIER_AUTHORITY, 4)
5960 TEST_TARGET_SIZE (PSID_IDENTIFIER_AUTHORITY, 6)
5961 TEST_TARGET_ALIGN(PSID_IDENTIFIER_AUTHORITY, 1)
5964 static void test_pack_PSINGLE_LIST_ENTRY(void)
5966 /* PSINGLE_LIST_ENTRY */
5967 TEST_TYPE_SIZE (PSINGLE_LIST_ENTRY, 4)
5968 TEST_TYPE_ALIGN (PSINGLE_LIST_ENTRY, 4)
5969 TEST_TARGET_SIZE (PSINGLE_LIST_ENTRY, 4)
5970 TEST_TARGET_ALIGN(PSINGLE_LIST_ENTRY, 4)
5973 static void test_pack_PSTR(void)
5976 TEST_TYPE_SIZE (PSTR, 4)
5977 TEST_TYPE_ALIGN (PSTR, 4)
5978 TEST_TARGET_SIZE (PSTR, 1)
5979 TEST_TARGET_ALIGN(PSTR, 1)
5982 static void test_pack_PSYSTEM_ALARM_ACE(void)
5984 /* PSYSTEM_ALARM_ACE */
5985 TEST_TYPE_SIZE (PSYSTEM_ALARM_ACE, 4)
5986 TEST_TYPE_ALIGN (PSYSTEM_ALARM_ACE, 4)
5987 TEST_TARGET_SIZE (PSYSTEM_ALARM_ACE, 12)
5988 TEST_TARGET_ALIGN(PSYSTEM_ALARM_ACE, 4)
5991 static void test_pack_PSYSTEM_AUDIT_ACE(void)
5993 /* PSYSTEM_AUDIT_ACE */
5994 TEST_TYPE_SIZE (PSYSTEM_AUDIT_ACE, 4)
5995 TEST_TYPE_ALIGN (PSYSTEM_AUDIT_ACE, 4)
5996 TEST_TARGET_SIZE (PSYSTEM_AUDIT_ACE, 12)
5997 TEST_TARGET_ALIGN(PSYSTEM_AUDIT_ACE, 4)
6000 static void test_pack_PTOKEN_GROUPS(void)
6003 TEST_TYPE_SIZE (PTOKEN_GROUPS, 4)
6004 TEST_TYPE_ALIGN (PTOKEN_GROUPS, 4)
6005 TEST_TARGET_SIZE (PTOKEN_GROUPS, 12)
6006 TEST_TARGET_ALIGN(PTOKEN_GROUPS, 4)
6009 static void test_pack_PTOKEN_PRIVILEGES(void)
6011 /* PTOKEN_PRIVILEGES */
6012 TEST_TYPE_SIZE (PTOKEN_PRIVILEGES, 4)
6013 TEST_TYPE_ALIGN (PTOKEN_PRIVILEGES, 4)
6014 TEST_TARGET_SIZE (PTOKEN_PRIVILEGES, 16)
6015 TEST_TARGET_ALIGN(PTOKEN_PRIVILEGES, 4)
6018 static void test_pack_PTOKEN_USER(void)
6021 TEST_TYPE_SIZE (PTOKEN_USER, 4)
6022 TEST_TYPE_ALIGN (PTOKEN_USER, 4)
6023 TEST_TARGET_SIZE (PTOKEN_USER, 8)
6024 TEST_TARGET_ALIGN(PTOKEN_USER, 4)
6027 static void test_pack_PTSTR(void)
6030 TEST_TYPE_SIZE (PTSTR, 4)
6031 TEST_TYPE_ALIGN (PTSTR, 4)
6034 static void test_pack_PULARGE_INTEGER(void)
6036 /* PULARGE_INTEGER */
6037 TEST_TYPE_SIZE (PULARGE_INTEGER, 4)
6038 TEST_TYPE_ALIGN (PULARGE_INTEGER, 4)
6041 static void test_pack_PVECTORED_EXCEPTION_HANDLER(void)
6043 /* PVECTORED_EXCEPTION_HANDLER */
6044 TEST_TYPE_SIZE (PVECTORED_EXCEPTION_HANDLER, 4)
6045 TEST_TYPE_ALIGN (PVECTORED_EXCEPTION_HANDLER, 4)
6048 static void test_pack_PVOID(void)
6051 TEST_TYPE_SIZE (PVOID, 4)
6052 TEST_TYPE_ALIGN (PVOID, 4)
6055 static void test_pack_PWCH(void)
6058 TEST_TYPE_SIZE (PWCH, 4)
6059 TEST_TYPE_ALIGN (PWCH, 4)
6060 TEST_TARGET_SIZE (PWCH, 2)
6061 TEST_TARGET_ALIGN(PWCH, 2)
6064 static void test_pack_PWSTR(void)
6067 TEST_TYPE_SIZE (PWSTR, 4)
6068 TEST_TYPE_ALIGN (PWSTR, 4)
6069 TEST_TARGET_SIZE (PWSTR, 2)
6070 TEST_TARGET_ALIGN(PWSTR, 2)
6073 static void test_pack_RTL_CRITICAL_SECTION(void)
6075 /* RTL_CRITICAL_SECTION */
6076 TEST_TYPE_SIZE (RTL_CRITICAL_SECTION, 24)
6077 TEST_TYPE_ALIGN (RTL_CRITICAL_SECTION, 4)
6078 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, DebugInfo, 4)
6079 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, DebugInfo, 4)
6080 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, DebugInfo, 0)
6081 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, LockCount, 4)
6082 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, LockCount, 4)
6083 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, LockCount, 4)
6084 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, RecursionCount, 4)
6085 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, RecursionCount, 4)
6086 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, RecursionCount, 8)
6087 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, OwningThread, 4)
6088 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, OwningThread, 4)
6089 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, OwningThread, 12)
6090 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, LockSemaphore, 4)
6091 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, LockSemaphore, 4)
6092 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, LockSemaphore, 16)
6093 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, SpinCount, 4)
6094 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, SpinCount, 4)
6095 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, SpinCount, 20)
6098 static void test_pack_RTL_CRITICAL_SECTION_DEBUG(void)
6100 /* RTL_CRITICAL_SECTION_DEBUG */
6101 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, Type, 2)
6102 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, Type, 2)
6103 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, Type, 0)
6104 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, CreatorBackTraceIndex, 2)
6105 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, CreatorBackTraceIndex, 2)
6106 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, CreatorBackTraceIndex, 2)
6107 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, CriticalSection, 4)
6108 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, CriticalSection, 4)
6109 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, CriticalSection, 4)
6110 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, ProcessLocksList, 8)
6111 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, ProcessLocksList, 4)
6112 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, ProcessLocksList, 8)
6113 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, EntryCount, 4)
6114 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, EntryCount, 4)
6115 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, EntryCount, 16)
6116 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, ContentionCount, 4)
6117 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, ContentionCount, 4)
6118 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, ContentionCount, 20)
6121 static void test_pack_RTL_OSVERSIONINFOEXW(void)
6123 /* RTL_OSVERSIONINFOEXW */
6124 TEST_TYPE_SIZE (RTL_OSVERSIONINFOEXW, 284)
6125 TEST_TYPE_ALIGN (RTL_OSVERSIONINFOEXW, 4)
6126 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwOSVersionInfoSize, 4)
6127 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwOSVersionInfoSize, 4)
6128 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwOSVersionInfoSize, 0)
6129 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwMajorVersion, 4)
6130 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwMajorVersion, 4)
6131 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwMajorVersion, 4)
6132 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwMinorVersion, 4)
6133 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwMinorVersion, 4)
6134 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwMinorVersion, 8)
6135 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwBuildNumber, 4)
6136 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwBuildNumber, 4)
6137 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwBuildNumber, 12)
6138 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwPlatformId, 4)
6139 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwPlatformId, 4)
6140 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwPlatformId, 16)
6141 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, szCSDVersion, 256)
6142 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, szCSDVersion, 2)
6143 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, szCSDVersion, 20)
6144 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wServicePackMajor, 2)
6145 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wServicePackMajor, 2)
6146 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wServicePackMajor, 276)
6147 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wServicePackMinor, 2)
6148 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wServicePackMinor, 2)
6149 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wServicePackMinor, 278)
6150 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wSuiteMask, 2)
6151 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wSuiteMask, 2)
6152 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wSuiteMask, 280)
6153 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wProductType, 1)
6154 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wProductType, 1)
6155 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wProductType, 282)
6156 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wReserved, 1)
6157 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wReserved, 1)
6158 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wReserved, 283)
6161 static void test_pack_RTL_OSVERSIONINFOW(void)
6163 /* RTL_OSVERSIONINFOW */
6164 TEST_TYPE_SIZE (RTL_OSVERSIONINFOW, 276)
6165 TEST_TYPE_ALIGN (RTL_OSVERSIONINFOW, 4)
6166 TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwOSVersionInfoSize, 4)
6167 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwOSVersionInfoSize, 4)
6168 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwOSVersionInfoSize, 0)
6169 TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwMajorVersion, 4)
6170 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwMajorVersion, 4)
6171 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwMajorVersion, 4)
6172 TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwMinorVersion, 4)
6173 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwMinorVersion, 4)
6174 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwMinorVersion, 8)
6175 TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwBuildNumber, 4)
6176 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwBuildNumber, 4)
6177 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwBuildNumber, 12)
6178 TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwPlatformId, 4)
6179 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwPlatformId, 4)
6180 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwPlatformId, 16)
6181 TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, szCSDVersion, 256)
6182 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, szCSDVersion, 2)
6183 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, szCSDVersion, 20)
6186 static void test_pack_RTL_RESOURCE_DEBUG(void)
6188 /* RTL_RESOURCE_DEBUG */
6189 TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, Type, 2)
6190 TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, Type, 2)
6191 TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, Type, 0)
6192 TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, CreatorBackTraceIndex, 2)
6193 TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, CreatorBackTraceIndex, 2)
6194 TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, CreatorBackTraceIndex, 2)
6195 TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, CriticalSection, 4)
6196 TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, CriticalSection, 4)
6197 TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, CriticalSection, 4)
6198 TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, ProcessLocksList, 8)
6199 TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, ProcessLocksList, 4)
6200 TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, ProcessLocksList, 8)
6201 TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, EntryCount, 4)
6202 TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, EntryCount, 4)
6203 TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, EntryCount, 16)
6204 TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, ContentionCount, 4)
6205 TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, ContentionCount, 4)
6206 TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, ContentionCount, 20)
6209 static void test_pack_SECURITY_CONTEXT_TRACKING_MODE(void)
6211 /* SECURITY_CONTEXT_TRACKING_MODE */
6212 TEST_TYPE_SIZE (SECURITY_CONTEXT_TRACKING_MODE, 1)
6213 TEST_TYPE_ALIGN (SECURITY_CONTEXT_TRACKING_MODE, 1)
6216 static void test_pack_SECURITY_DESCRIPTOR(void)
6218 /* SECURITY_DESCRIPTOR */
6219 TEST_TYPE_SIZE (SECURITY_DESCRIPTOR, 20)
6220 TEST_TYPE_ALIGN (SECURITY_DESCRIPTOR, 4)
6221 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Revision, 1)
6222 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Revision, 1)
6223 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Revision, 0)
6224 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Sbz1, 1)
6225 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Sbz1, 1)
6226 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Sbz1, 1)
6227 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Control, 2)
6228 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Control, 2)
6229 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Control, 2)
6230 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Owner, 4)
6231 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Owner, 4)
6232 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Owner, 4)
6233 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Group, 4)
6234 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Group, 4)
6235 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Group, 8)
6236 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Sacl, 4)
6237 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Sacl, 4)
6238 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Sacl, 12)
6239 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Dacl, 4)
6240 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Dacl, 4)
6241 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Dacl, 16)
6244 static void test_pack_SECURITY_DESCRIPTOR_CONTROL(void)
6246 /* SECURITY_DESCRIPTOR_CONTROL */
6247 TEST_TYPE_SIZE (SECURITY_DESCRIPTOR_CONTROL, 2)
6248 TEST_TYPE_ALIGN (SECURITY_DESCRIPTOR_CONTROL, 2)
6249 TEST_TYPE_UNSIGNED(SECURITY_DESCRIPTOR_CONTROL)
6252 static void test_pack_SECURITY_DESCRIPTOR_RELATIVE(void)
6254 /* SECURITY_DESCRIPTOR_RELATIVE */
6255 TEST_TYPE_SIZE (SECURITY_DESCRIPTOR_RELATIVE, 20)
6256 TEST_TYPE_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, 4)
6257 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Revision, 1)
6258 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Revision, 1)
6259 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Revision, 0)
6260 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Sbz1, 1)
6261 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Sbz1, 1)
6262 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Sbz1, 1)
6263 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Control, 2)
6264 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Control, 2)
6265 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Control, 2)
6266 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Owner, 4)
6267 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Owner, 4)
6268 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Owner, 4)
6269 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Group, 4)
6270 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Group, 4)
6271 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Group, 8)
6272 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Sacl, 4)
6273 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Sacl, 4)
6274 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Sacl, 12)
6275 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Dacl, 4)
6276 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Dacl, 4)
6277 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Dacl, 16)
6280 static void test_pack_SECURITY_INFORMATION(void)
6282 /* SECURITY_INFORMATION */
6283 TEST_TYPE_SIZE (SECURITY_INFORMATION, 4)
6284 TEST_TYPE_ALIGN (SECURITY_INFORMATION, 4)
6285 TEST_TYPE_UNSIGNED(SECURITY_INFORMATION)
6288 static void test_pack_SECURITY_QUALITY_OF_SERVICE(void)
6290 /* SECURITY_QUALITY_OF_SERVICE */
6291 TEST_FIELD_SIZE (SECURITY_QUALITY_OF_SERVICE, Length, 4)
6292 TEST_FIELD_ALIGN (SECURITY_QUALITY_OF_SERVICE, Length, 4)
6293 TEST_FIELD_OFFSET(SECURITY_QUALITY_OF_SERVICE, Length, 0)
6296 static void test_pack_SHORT(void)
6299 TEST_TYPE_SIZE (SHORT, 2)
6300 TEST_TYPE_ALIGN (SHORT, 2)
6301 TEST_TYPE_SIGNED(SHORT)
6304 static void test_pack_SID(void)
6307 TEST_TYPE_SIZE (SID, 12)
6308 TEST_TYPE_ALIGN (SID, 4)
6309 TEST_FIELD_SIZE (SID, Revision, 1)
6310 TEST_FIELD_ALIGN (SID, Revision, 1)
6311 TEST_FIELD_OFFSET(SID, Revision, 0)
6312 TEST_FIELD_SIZE (SID, SubAuthorityCount, 1)
6313 TEST_FIELD_ALIGN (SID, SubAuthorityCount, 1)
6314 TEST_FIELD_OFFSET(SID, SubAuthorityCount, 1)
6315 TEST_FIELD_SIZE (SID, IdentifierAuthority, 6)
6316 TEST_FIELD_ALIGN (SID, IdentifierAuthority, 1)
6317 TEST_FIELD_OFFSET(SID, IdentifierAuthority, 2)
6318 TEST_FIELD_SIZE (SID, SubAuthority, 4)
6319 TEST_FIELD_ALIGN (SID, SubAuthority, 4)
6320 TEST_FIELD_OFFSET(SID, SubAuthority, 8)
6323 static void test_pack_SID_AND_ATTRIBUTES(void)
6325 /* SID_AND_ATTRIBUTES */
6326 TEST_TYPE_SIZE (SID_AND_ATTRIBUTES, 8)
6327 TEST_TYPE_ALIGN (SID_AND_ATTRIBUTES, 4)
6328 TEST_FIELD_SIZE (SID_AND_ATTRIBUTES, Sid, 4)
6329 TEST_FIELD_ALIGN (SID_AND_ATTRIBUTES, Sid, 4)
6330 TEST_FIELD_OFFSET(SID_AND_ATTRIBUTES, Sid, 0)
6331 TEST_FIELD_SIZE (SID_AND_ATTRIBUTES, Attributes, 4)
6332 TEST_FIELD_ALIGN (SID_AND_ATTRIBUTES, Attributes, 4)
6333 TEST_FIELD_OFFSET(SID_AND_ATTRIBUTES, Attributes, 4)
6336 static void test_pack_SID_IDENTIFIER_AUTHORITY(void)
6338 /* SID_IDENTIFIER_AUTHORITY */
6339 TEST_TYPE_SIZE (SID_IDENTIFIER_AUTHORITY, 6)
6340 TEST_TYPE_ALIGN (SID_IDENTIFIER_AUTHORITY, 1)
6341 TEST_FIELD_SIZE (SID_IDENTIFIER_AUTHORITY, Value, 6)
6342 TEST_FIELD_ALIGN (SID_IDENTIFIER_AUTHORITY, Value, 1)
6343 TEST_FIELD_OFFSET(SID_IDENTIFIER_AUTHORITY, Value, 0)
6346 static void test_pack_SINGLE_LIST_ENTRY(void)
6348 /* SINGLE_LIST_ENTRY */
6349 TEST_TYPE_SIZE (SINGLE_LIST_ENTRY, 4)
6350 TEST_TYPE_ALIGN (SINGLE_LIST_ENTRY, 4)
6351 TEST_FIELD_SIZE (SINGLE_LIST_ENTRY, Next, 4)
6352 TEST_FIELD_ALIGN (SINGLE_LIST_ENTRY, Next, 4)
6353 TEST_FIELD_OFFSET(SINGLE_LIST_ENTRY, Next, 0)
6356 static void test_pack_SYSTEM_ALARM_ACE(void)
6358 /* SYSTEM_ALARM_ACE */
6359 TEST_TYPE_SIZE (SYSTEM_ALARM_ACE, 12)
6360 TEST_TYPE_ALIGN (SYSTEM_ALARM_ACE, 4)
6361 TEST_FIELD_SIZE (SYSTEM_ALARM_ACE, Header, 4)
6362 TEST_FIELD_ALIGN (SYSTEM_ALARM_ACE, Header, 2)
6363 TEST_FIELD_OFFSET(SYSTEM_ALARM_ACE, Header, 0)
6364 TEST_FIELD_SIZE (SYSTEM_ALARM_ACE, Mask, 4)
6365 TEST_FIELD_ALIGN (SYSTEM_ALARM_ACE, Mask, 4)
6366 TEST_FIELD_OFFSET(SYSTEM_ALARM_ACE, Mask, 4)
6367 TEST_FIELD_SIZE (SYSTEM_ALARM_ACE, SidStart, 4)
6368 TEST_FIELD_ALIGN (SYSTEM_ALARM_ACE, SidStart, 4)
6369 TEST_FIELD_OFFSET(SYSTEM_ALARM_ACE, SidStart, 8)
6372 static void test_pack_SYSTEM_AUDIT_ACE(void)
6374 /* SYSTEM_AUDIT_ACE */
6375 TEST_TYPE_SIZE (SYSTEM_AUDIT_ACE, 12)
6376 TEST_TYPE_ALIGN (SYSTEM_AUDIT_ACE, 4)
6377 TEST_FIELD_SIZE (SYSTEM_AUDIT_ACE, Header, 4)
6378 TEST_FIELD_ALIGN (SYSTEM_AUDIT_ACE, Header, 2)
6379 TEST_FIELD_OFFSET(SYSTEM_AUDIT_ACE, Header, 0)
6380 TEST_FIELD_SIZE (SYSTEM_AUDIT_ACE, Mask, 4)
6381 TEST_FIELD_ALIGN (SYSTEM_AUDIT_ACE, Mask, 4)
6382 TEST_FIELD_OFFSET(SYSTEM_AUDIT_ACE, Mask, 4)
6383 TEST_FIELD_SIZE (SYSTEM_AUDIT_ACE, SidStart, 4)
6384 TEST_FIELD_ALIGN (SYSTEM_AUDIT_ACE, SidStart, 4)
6385 TEST_FIELD_OFFSET(SYSTEM_AUDIT_ACE, SidStart, 8)
6388 static void test_pack_TCHAR(void)
6391 TEST_TYPE_SIZE (TCHAR, 1)
6392 TEST_TYPE_ALIGN (TCHAR, 1)
6395 static void test_pack_TOKEN_DEFAULT_DACL(void)
6397 /* TOKEN_DEFAULT_DACL */
6398 TEST_TYPE_SIZE (TOKEN_DEFAULT_DACL, 4)
6399 TEST_TYPE_ALIGN (TOKEN_DEFAULT_DACL, 4)
6400 TEST_FIELD_SIZE (TOKEN_DEFAULT_DACL, DefaultDacl, 4)
6401 TEST_FIELD_ALIGN (TOKEN_DEFAULT_DACL, DefaultDacl, 4)
6402 TEST_FIELD_OFFSET(TOKEN_DEFAULT_DACL, DefaultDacl, 0)
6405 static void test_pack_TOKEN_GROUPS(void)
6408 TEST_TYPE_SIZE (TOKEN_GROUPS, 12)
6409 TEST_TYPE_ALIGN (TOKEN_GROUPS, 4)
6410 TEST_FIELD_SIZE (TOKEN_GROUPS, GroupCount, 4)
6411 TEST_FIELD_ALIGN (TOKEN_GROUPS, GroupCount, 4)
6412 TEST_FIELD_OFFSET(TOKEN_GROUPS, GroupCount, 0)
6413 TEST_FIELD_SIZE (TOKEN_GROUPS, Groups, 8)
6414 TEST_FIELD_ALIGN (TOKEN_GROUPS, Groups, 4)
6415 TEST_FIELD_OFFSET(TOKEN_GROUPS, Groups, 4)
6418 static void test_pack_TOKEN_OWNER(void)
6421 TEST_TYPE_SIZE (TOKEN_OWNER, 4)
6422 TEST_TYPE_ALIGN (TOKEN_OWNER, 4)
6423 TEST_FIELD_SIZE (TOKEN_OWNER, Owner, 4)
6424 TEST_FIELD_ALIGN (TOKEN_OWNER, Owner, 4)
6425 TEST_FIELD_OFFSET(TOKEN_OWNER, Owner, 0)
6428 static void test_pack_TOKEN_PRIMARY_GROUP(void)
6430 /* TOKEN_PRIMARY_GROUP */
6431 TEST_TYPE_SIZE (TOKEN_PRIMARY_GROUP, 4)
6432 TEST_TYPE_ALIGN (TOKEN_PRIMARY_GROUP, 4)
6433 TEST_FIELD_SIZE (TOKEN_PRIMARY_GROUP, PrimaryGroup, 4)
6434 TEST_FIELD_ALIGN (TOKEN_PRIMARY_GROUP, PrimaryGroup, 4)
6435 TEST_FIELD_OFFSET(TOKEN_PRIMARY_GROUP, PrimaryGroup, 0)
6438 static void test_pack_TOKEN_PRIVILEGES(void)
6440 /* TOKEN_PRIVILEGES */
6441 TEST_TYPE_SIZE (TOKEN_PRIVILEGES, 16)
6442 TEST_TYPE_ALIGN (TOKEN_PRIVILEGES, 4)
6443 TEST_FIELD_SIZE (TOKEN_PRIVILEGES, PrivilegeCount, 4)
6444 TEST_FIELD_ALIGN (TOKEN_PRIVILEGES, PrivilegeCount, 4)
6445 TEST_FIELD_OFFSET(TOKEN_PRIVILEGES, PrivilegeCount, 0)
6446 TEST_FIELD_SIZE (TOKEN_PRIVILEGES, Privileges, 12)
6447 TEST_FIELD_ALIGN (TOKEN_PRIVILEGES, Privileges, 4)
6448 TEST_FIELD_OFFSET(TOKEN_PRIVILEGES, Privileges, 4)
6451 static void test_pack_TOKEN_SOURCE(void)
6454 TEST_TYPE_SIZE (TOKEN_SOURCE, 16)
6455 TEST_TYPE_ALIGN (TOKEN_SOURCE, 4)
6456 TEST_FIELD_SIZE (TOKEN_SOURCE, SourceName, 8)
6457 TEST_FIELD_ALIGN (TOKEN_SOURCE, SourceName, 1)
6458 TEST_FIELD_OFFSET(TOKEN_SOURCE, SourceName, 0)
6459 TEST_FIELD_SIZE (TOKEN_SOURCE, SourceIdentifier, 8)
6460 TEST_FIELD_ALIGN (TOKEN_SOURCE, SourceIdentifier, 4)
6461 TEST_FIELD_OFFSET(TOKEN_SOURCE, SourceIdentifier, 8)
6464 static void test_pack_TOKEN_STATISTICS(void)
6466 /* TOKEN_STATISTICS (pack 4) */
6467 TEST_FIELD_SIZE (TOKEN_STATISTICS, TokenId, 8)
6468 TEST_FIELD_ALIGN (TOKEN_STATISTICS, TokenId, 4)
6469 TEST_FIELD_OFFSET(TOKEN_STATISTICS, TokenId, 0)
6470 TEST_FIELD_SIZE (TOKEN_STATISTICS, AuthenticationId, 8)
6471 TEST_FIELD_ALIGN (TOKEN_STATISTICS, AuthenticationId, 4)
6472 TEST_FIELD_OFFSET(TOKEN_STATISTICS, AuthenticationId, 8)
6473 TEST_FIELD_SIZE (TOKEN_STATISTICS, ExpirationTime, 8)
6474 TEST_FIELD_ALIGN (TOKEN_STATISTICS, ExpirationTime, 4)
6475 TEST_FIELD_OFFSET(TOKEN_STATISTICS, ExpirationTime, 16)
6478 static void test_pack_TOKEN_USER(void)
6481 TEST_TYPE_SIZE (TOKEN_USER, 8)
6482 TEST_TYPE_ALIGN (TOKEN_USER, 4)
6483 TEST_FIELD_SIZE (TOKEN_USER, User, 8)
6484 TEST_FIELD_ALIGN (TOKEN_USER, User, 4)
6485 TEST_FIELD_OFFSET(TOKEN_USER, User, 0)
6488 static void test_pack_ULARGE_INTEGER(void)
6490 /* ULARGE_INTEGER */
6493 static void test_pack_ULONGLONG(void)
6496 TEST_TYPE_SIZE (ULONGLONG, 8)
6497 TEST_TYPE_ALIGN (ULONGLONG, 8)
6498 TEST_TYPE_UNSIGNED(ULONGLONG)
6501 static void test_pack_WAITORTIMERCALLBACKFUNC(void)
6503 /* WAITORTIMERCALLBACKFUNC */
6504 TEST_TYPE_SIZE (WAITORTIMERCALLBACKFUNC, 4)
6505 TEST_TYPE_ALIGN (WAITORTIMERCALLBACKFUNC, 4)
6508 static void test_pack_WCHAR(void)
6511 TEST_TYPE_SIZE (WCHAR, 2)
6512 TEST_TYPE_ALIGN (WCHAR, 2)
6513 TEST_TYPE_UNSIGNED(WCHAR)
6516 static void test_pack_ATOM(void)
6519 TEST_TYPE_SIZE (ATOM, 2)
6520 TEST_TYPE_ALIGN (ATOM, 2)
6521 TEST_TYPE_UNSIGNED(ATOM)
6524 static void test_pack_BOOL(void)
6527 TEST_TYPE_SIZE (BOOL, 4)
6528 TEST_TYPE_ALIGN (BOOL, 4)
6529 TEST_TYPE_SIGNED(BOOL)
6532 static void test_pack_BYTE(void)
6535 TEST_TYPE_SIZE (BYTE, 1)
6536 TEST_TYPE_ALIGN (BYTE, 1)
6537 TEST_TYPE_UNSIGNED(BYTE)
6540 static void test_pack_COLORREF(void)
6543 TEST_TYPE_SIZE (COLORREF, 4)
6544 TEST_TYPE_ALIGN (COLORREF, 4)
6545 TEST_TYPE_UNSIGNED(COLORREF)
6548 static void test_pack_DWORD(void)
6551 TEST_TYPE_SIZE (DWORD, 4)
6552 TEST_TYPE_ALIGN (DWORD, 4)
6553 TEST_TYPE_UNSIGNED(DWORD)
6556 static void test_pack_FARPROC(void)
6559 TEST_TYPE_SIZE (FARPROC, 4)
6560 TEST_TYPE_ALIGN (FARPROC, 4)
6563 static void test_pack_FLOAT(void)
6566 TEST_TYPE_SIZE (FLOAT, 4)
6567 TEST_TYPE_ALIGN (FLOAT, 4)
6570 static void test_pack_GLOBALHANDLE(void)
6573 TEST_TYPE_SIZE (GLOBALHANDLE, 4)
6574 TEST_TYPE_ALIGN (GLOBALHANDLE, 4)
6577 static void test_pack_HCURSOR(void)
6580 TEST_TYPE_SIZE (HCURSOR, 4)
6581 TEST_TYPE_ALIGN (HCURSOR, 4)
6584 static void test_pack_HFILE(void)
6587 TEST_TYPE_SIZE (HFILE, 4)
6588 TEST_TYPE_ALIGN (HFILE, 4)
6589 TEST_TYPE_SIGNED(HFILE)
6592 static void test_pack_HGDIOBJ(void)
6595 TEST_TYPE_SIZE (HGDIOBJ, 4)
6596 TEST_TYPE_ALIGN (HGDIOBJ, 4)
6599 static void test_pack_HGLOBAL(void)
6602 TEST_TYPE_SIZE (HGLOBAL, 4)
6603 TEST_TYPE_ALIGN (HGLOBAL, 4)
6606 static void test_pack_HLOCAL(void)
6609 TEST_TYPE_SIZE (HLOCAL, 4)
6610 TEST_TYPE_ALIGN (HLOCAL, 4)
6613 static void test_pack_HMODULE(void)
6616 TEST_TYPE_SIZE (HMODULE, 4)
6617 TEST_TYPE_ALIGN (HMODULE, 4)
6620 static void test_pack_INT(void)
6623 TEST_TYPE_SIZE (INT, 4)
6624 TEST_TYPE_ALIGN (INT, 4)
6625 TEST_TYPE_SIGNED(INT)
6628 static void test_pack_LOCALHANDLE(void)
6631 TEST_TYPE_SIZE (LOCALHANDLE, 4)
6632 TEST_TYPE_ALIGN (LOCALHANDLE, 4)
6635 static void test_pack_LPARAM(void)
6638 TEST_TYPE_SIZE (LPARAM, 4)
6639 TEST_TYPE_ALIGN (LPARAM, 4)
6642 static void test_pack_LPCRECT(void)
6645 TEST_TYPE_SIZE (LPCRECT, 4)
6646 TEST_TYPE_ALIGN (LPCRECT, 4)
6647 TEST_TARGET_SIZE (LPCRECT, 16)
6648 TEST_TARGET_ALIGN(LPCRECT, 4)
6651 static void test_pack_LPCRECTL(void)
6654 TEST_TYPE_SIZE (LPCRECTL, 4)
6655 TEST_TYPE_ALIGN (LPCRECTL, 4)
6656 TEST_TARGET_SIZE (LPCRECTL, 16)
6657 TEST_TARGET_ALIGN(LPCRECTL, 4)
6660 static void test_pack_LPCVOID(void)
6663 TEST_TYPE_SIZE (LPCVOID, 4)
6664 TEST_TYPE_ALIGN (LPCVOID, 4)
6667 static void test_pack_LPPOINT(void)
6670 TEST_TYPE_SIZE (LPPOINT, 4)
6671 TEST_TYPE_ALIGN (LPPOINT, 4)
6672 TEST_TARGET_SIZE (LPPOINT, 8)
6673 TEST_TARGET_ALIGN(LPPOINT, 4)
6676 static void test_pack_LPRECT(void)
6679 TEST_TYPE_SIZE (LPRECT, 4)
6680 TEST_TYPE_ALIGN (LPRECT, 4)
6681 TEST_TARGET_SIZE (LPRECT, 16)
6682 TEST_TARGET_ALIGN(LPRECT, 4)
6685 static void test_pack_LPRECTL(void)
6688 TEST_TYPE_SIZE (LPRECTL, 4)
6689 TEST_TYPE_ALIGN (LPRECTL, 4)
6690 TEST_TARGET_SIZE (LPRECTL, 16)
6691 TEST_TARGET_ALIGN(LPRECTL, 4)
6694 static void test_pack_LPSIZE(void)
6697 TEST_TYPE_SIZE (LPSIZE, 4)
6698 TEST_TYPE_ALIGN (LPSIZE, 4)
6699 TEST_TARGET_SIZE (LPSIZE, 8)
6700 TEST_TARGET_ALIGN(LPSIZE, 4)
6703 static void test_pack_LRESULT(void)
6706 TEST_TYPE_SIZE (LRESULT, 4)
6707 TEST_TYPE_ALIGN (LRESULT, 4)
6710 static void test_pack_POINT(void)
6713 TEST_TYPE_SIZE (POINT, 8)
6714 TEST_TYPE_ALIGN (POINT, 4)
6715 TEST_FIELD_SIZE (POINT, x, 4)
6716 TEST_FIELD_ALIGN (POINT, x, 4)
6717 TEST_FIELD_OFFSET(POINT, x, 0)
6718 TEST_FIELD_SIZE (POINT, y, 4)
6719 TEST_FIELD_ALIGN (POINT, y, 4)
6720 TEST_FIELD_OFFSET(POINT, y, 4)
6723 static void test_pack_POINTL(void)
6726 TEST_TYPE_SIZE (POINTL, 8)
6727 TEST_TYPE_ALIGN (POINTL, 4)
6728 TEST_FIELD_SIZE (POINTL, x, 4)
6729 TEST_FIELD_ALIGN (POINTL, x, 4)
6730 TEST_FIELD_OFFSET(POINTL, x, 0)
6731 TEST_FIELD_SIZE (POINTL, y, 4)
6732 TEST_FIELD_ALIGN (POINTL, y, 4)
6733 TEST_FIELD_OFFSET(POINTL, y, 4)
6736 static void test_pack_PPOINT(void)
6739 TEST_TYPE_SIZE (PPOINT, 4)
6740 TEST_TYPE_ALIGN (PPOINT, 4)
6741 TEST_TARGET_SIZE (PPOINT, 8)
6742 TEST_TARGET_ALIGN(PPOINT, 4)
6745 static void test_pack_PPOINTL(void)
6748 TEST_TYPE_SIZE (PPOINTL, 4)
6749 TEST_TYPE_ALIGN (PPOINTL, 4)
6750 TEST_TARGET_SIZE (PPOINTL, 8)
6751 TEST_TARGET_ALIGN(PPOINTL, 4)
6754 static void test_pack_PRECT(void)
6757 TEST_TYPE_SIZE (PRECT, 4)
6758 TEST_TYPE_ALIGN (PRECT, 4)
6759 TEST_TARGET_SIZE (PRECT, 16)
6760 TEST_TARGET_ALIGN(PRECT, 4)
6763 static void test_pack_PRECTL(void)
6766 TEST_TYPE_SIZE (PRECTL, 4)
6767 TEST_TYPE_ALIGN (PRECTL, 4)
6768 TEST_TARGET_SIZE (PRECTL, 16)
6769 TEST_TARGET_ALIGN(PRECTL, 4)
6772 static void test_pack_PROC(void)
6775 TEST_TYPE_SIZE (PROC, 4)
6776 TEST_TYPE_ALIGN (PROC, 4)
6779 static void test_pack_PSIZE(void)
6782 TEST_TYPE_SIZE (PSIZE, 4)
6783 TEST_TYPE_ALIGN (PSIZE, 4)
6784 TEST_TARGET_SIZE (PSIZE, 8)
6785 TEST_TARGET_ALIGN(PSIZE, 4)
6788 static void test_pack_PSZ(void)
6791 TEST_TYPE_SIZE (PSZ, 4)
6792 TEST_TYPE_ALIGN (PSZ, 4)
6795 static void test_pack_RECT(void)
6798 TEST_TYPE_SIZE (RECT, 16)
6799 TEST_TYPE_ALIGN (RECT, 4)
6800 TEST_FIELD_SIZE (RECT, left, 4)
6801 TEST_FIELD_ALIGN (RECT, left, 4)
6802 TEST_FIELD_OFFSET(RECT, left, 0)
6803 TEST_FIELD_SIZE (RECT, top, 4)
6804 TEST_FIELD_ALIGN (RECT, top, 4)
6805 TEST_FIELD_OFFSET(RECT, top, 4)
6806 TEST_FIELD_SIZE (RECT, right, 4)
6807 TEST_FIELD_ALIGN (RECT, right, 4)
6808 TEST_FIELD_OFFSET(RECT, right, 8)
6809 TEST_FIELD_SIZE (RECT, bottom, 4)
6810 TEST_FIELD_ALIGN (RECT, bottom, 4)
6811 TEST_FIELD_OFFSET(RECT, bottom, 12)
6814 static void test_pack_RECTL(void)
6817 TEST_TYPE_SIZE (RECTL, 16)
6818 TEST_TYPE_ALIGN (RECTL, 4)
6819 TEST_FIELD_SIZE (RECTL, left, 4)
6820 TEST_FIELD_ALIGN (RECTL, left, 4)
6821 TEST_FIELD_OFFSET(RECTL, left, 0)
6822 TEST_FIELD_SIZE (RECTL, top, 4)
6823 TEST_FIELD_ALIGN (RECTL, top, 4)
6824 TEST_FIELD_OFFSET(RECTL, top, 4)
6825 TEST_FIELD_SIZE (RECTL, right, 4)
6826 TEST_FIELD_ALIGN (RECTL, right, 4)
6827 TEST_FIELD_OFFSET(RECTL, right, 8)
6828 TEST_FIELD_SIZE (RECTL, bottom, 4)
6829 TEST_FIELD_ALIGN (RECTL, bottom, 4)
6830 TEST_FIELD_OFFSET(RECTL, bottom, 12)
6833 static void test_pack_SIZE(void)
6836 TEST_TYPE_SIZE (SIZE, 8)
6837 TEST_TYPE_ALIGN (SIZE, 4)
6838 TEST_FIELD_SIZE (SIZE, cx, 4)
6839 TEST_FIELD_ALIGN (SIZE, cx, 4)
6840 TEST_FIELD_OFFSET(SIZE, cx, 0)
6841 TEST_FIELD_SIZE (SIZE, cy, 4)
6842 TEST_FIELD_ALIGN (SIZE, cy, 4)
6843 TEST_FIELD_OFFSET(SIZE, cy, 4)
6846 static void test_pack_SIZEL(void)
6849 TEST_TYPE_SIZE (SIZEL, 8)
6850 TEST_TYPE_ALIGN (SIZEL, 4)
6853 static void test_pack_UCHAR(void)
6856 TEST_TYPE_SIZE (UCHAR, 1)
6857 TEST_TYPE_ALIGN (UCHAR, 1)
6858 TEST_TYPE_UNSIGNED(UCHAR)
6861 static void test_pack_UINT(void)
6864 TEST_TYPE_SIZE (UINT, 4)
6865 TEST_TYPE_ALIGN (UINT, 4)
6866 TEST_TYPE_UNSIGNED(UINT)
6869 static void test_pack_ULONG(void)
6872 TEST_TYPE_SIZE (ULONG, 4)
6873 TEST_TYPE_ALIGN (ULONG, 4)
6874 TEST_TYPE_UNSIGNED(ULONG)
6877 static void test_pack_USHORT(void)
6880 TEST_TYPE_SIZE (USHORT, 2)
6881 TEST_TYPE_ALIGN (USHORT, 2)
6882 TEST_TYPE_UNSIGNED(USHORT)
6885 static void test_pack_WORD(void)
6888 TEST_TYPE_SIZE (WORD, 2)
6889 TEST_TYPE_ALIGN (WORD, 2)
6890 TEST_TYPE_UNSIGNED(WORD)
6893 static void test_pack_WPARAM(void)
6896 TEST_TYPE_SIZE (WPARAM, 4)
6897 TEST_TYPE_ALIGN (WPARAM, 4)
6902 static void test_pack(void)
6904 test_pack_ACCESS_ALLOWED_ACE();
6905 test_pack_ACCESS_DENIED_ACE();
6906 test_pack_ACCESS_MASK();
6907 test_pack_ACE_HEADER();
6909 test_pack_ACL_REVISION_INFORMATION();
6910 test_pack_ACL_SIZE_INFORMATION();
6913 test_pack_BOOLEAN();
6917 test_pack_COLORREF();
6919 test_pack_DWORD32();
6920 test_pack_DWORD64();
6921 test_pack_DWORDLONG();
6922 test_pack_DWORD_PTR();
6923 test_pack_EXCEPTION_POINTERS();
6924 test_pack_EXCEPTION_RECORD();
6925 test_pack_EXECUTION_STATE();
6926 test_pack_FARPROC();
6928 test_pack_FLOATING_SAVE_AREA();
6929 test_pack_FPO_DATA();
6930 test_pack_GENERIC_MAPPING();
6931 test_pack_GLOBALHANDLE();
6932 test_pack_HALF_PTR();
6934 test_pack_HCURSOR();
6936 test_pack_HGDIOBJ();
6937 test_pack_HGLOBAL();
6939 test_pack_HMODULE();
6940 test_pack_HRESULT();
6941 test_pack_IMAGE_ARCHIVE_MEMBER_HEADER();
6942 test_pack_IMAGE_AUX_SYMBOL();
6943 test_pack_IMAGE_BASE_RELOCATION();
6944 test_pack_IMAGE_BOUND_FORWARDER_REF();
6945 test_pack_IMAGE_BOUND_IMPORT_DESCRIPTOR();
6946 test_pack_IMAGE_COFF_SYMBOLS_HEADER();
6947 test_pack_IMAGE_DATA_DIRECTORY();
6948 test_pack_IMAGE_DEBUG_DIRECTORY();
6949 test_pack_IMAGE_DEBUG_MISC();
6950 test_pack_IMAGE_DOS_HEADER();
6951 test_pack_IMAGE_EXPORT_DIRECTORY();
6952 test_pack_IMAGE_FILE_HEADER();
6953 test_pack_IMAGE_FUNCTION_ENTRY();
6954 test_pack_IMAGE_IMPORT_BY_NAME();
6955 test_pack_IMAGE_IMPORT_DESCRIPTOR();
6956 test_pack_IMAGE_LINENUMBER();
6957 test_pack_IMAGE_LOAD_CONFIG_DIRECTORY();
6958 test_pack_IMAGE_NT_HEADERS();
6959 test_pack_IMAGE_NT_HEADERS32();
6960 test_pack_IMAGE_NT_HEADERS64();
6961 test_pack_IMAGE_OPTIONAL_HEADER();
6962 test_pack_IMAGE_OPTIONAL_HEADER32();
6963 test_pack_IMAGE_OPTIONAL_HEADER64();
6964 test_pack_IMAGE_OS2_HEADER();
6965 test_pack_IMAGE_RELOCATION();
6966 test_pack_IMAGE_RESOURCE_DATA_ENTRY();
6967 test_pack_IMAGE_RESOURCE_DIRECTORY();
6968 test_pack_IMAGE_RESOURCE_DIRECTORY_ENTRY();
6969 test_pack_IMAGE_RESOURCE_DIRECTORY_STRING();
6970 test_pack_IMAGE_RESOURCE_DIR_STRING_U();
6971 test_pack_IMAGE_SECTION_HEADER();
6972 test_pack_IMAGE_SEPARATE_DEBUG_HEADER();
6973 test_pack_IMAGE_SYMBOL();
6974 test_pack_IMAGE_THUNK_DATA();
6975 test_pack_IMAGE_TLS_DIRECTORY();
6976 test_pack_IMAGE_TLS_DIRECTORY32();
6977 test_pack_IMAGE_TLS_DIRECTORY64();
6978 test_pack_IMAGE_VXD_HEADER();
6984 test_pack_INT_PTR();
6985 test_pack_IO_COUNTERS();
6987 test_pack_LARGE_INTEGER();
6989 test_pack_LIST_ENTRY();
6990 test_pack_LOCALHANDLE();
6994 test_pack_LONGLONG();
6995 test_pack_LONG_PTR();
6997 test_pack_LPCRECT();
6998 test_pack_LPCRECTL();
6999 test_pack_LPCVOID();
7000 test_pack_LPPOINT();
7002 test_pack_LPRECTL();
7004 test_pack_LRESULT();
7006 test_pack_LUID_AND_ATTRIBUTES();
7007 test_pack_MEMORY_BASIC_INFORMATION();
7008 test_pack_MESSAGE_RESOURCE_BLOCK();
7009 test_pack_MESSAGE_RESOURCE_DATA();
7010 test_pack_MESSAGE_RESOURCE_ENTRY();
7012 test_pack_OBJECT_TYPE_LIST();
7013 test_pack_PACCESS_ALLOWED_ACE();
7014 test_pack_PACCESS_DENIED_ACE();
7015 test_pack_PACCESS_TOKEN();
7016 test_pack_PACE_HEADER();
7018 test_pack_PACL_REVISION_INFORMATION();
7019 test_pack_PACL_SIZE_INFORMATION();
7026 test_pack_PEXCEPTION_POINTERS();
7027 test_pack_PEXCEPTION_RECORD();
7028 test_pack_PFLOATING_SAVE_AREA();
7029 test_pack_PFPO_DATA();
7030 test_pack_PGENERIC_MAPPING();
7031 test_pack_PHANDLE();
7032 test_pack_PIMAGE_ARCHIVE_MEMBER_HEADER();
7033 test_pack_PIMAGE_AUX_SYMBOL();
7034 test_pack_PIMAGE_BASE_RELOCATION();
7035 test_pack_PIMAGE_BOUND_FORWARDER_REF();
7036 test_pack_PIMAGE_BOUND_IMPORT_DESCRIPTOR();
7037 test_pack_PIMAGE_COFF_SYMBOLS_HEADER();
7038 test_pack_PIMAGE_DATA_DIRECTORY();
7039 test_pack_PIMAGE_DEBUG_DIRECTORY();
7040 test_pack_PIMAGE_DEBUG_MISC();
7041 test_pack_PIMAGE_DOS_HEADER();
7042 test_pack_PIMAGE_EXPORT_DIRECTORY();
7043 test_pack_PIMAGE_FILE_HEADER();
7044 test_pack_PIMAGE_FUNCTION_ENTRY();
7045 test_pack_PIMAGE_IMPORT_BY_NAME();
7046 test_pack_PIMAGE_IMPORT_DESCRIPTOR();
7047 test_pack_PIMAGE_LINENUMBER();
7048 test_pack_PIMAGE_LOAD_CONFIG_DIRECTORY();
7049 test_pack_PIMAGE_NT_HEADERS();
7050 test_pack_PIMAGE_NT_HEADERS32();
7051 test_pack_PIMAGE_NT_HEADERS64();
7052 test_pack_PIMAGE_OPTIONAL_HEADER();
7053 test_pack_PIMAGE_OPTIONAL_HEADER32();
7054 test_pack_PIMAGE_OPTIONAL_HEADER64();
7055 test_pack_PIMAGE_OS2_HEADER();
7056 test_pack_PIMAGE_RELOCATION();
7057 test_pack_PIMAGE_RESOURCE_DATA_ENTRY();
7058 test_pack_PIMAGE_RESOURCE_DIRECTORY();
7059 test_pack_PIMAGE_RESOURCE_DIRECTORY_ENTRY();
7060 test_pack_PIMAGE_RESOURCE_DIRECTORY_STRING();
7061 test_pack_PIMAGE_RESOURCE_DIR_STRING_U();
7062 test_pack_PIMAGE_SECTION_HEADER();
7063 test_pack_PIMAGE_SEPARATE_DEBUG_HEADER();
7064 test_pack_PIMAGE_SYMBOL();
7065 test_pack_PIMAGE_THUNK_DATA();
7066 test_pack_PIMAGE_TLS_CALLBACK();
7067 test_pack_PIMAGE_TLS_DIRECTORY();
7068 test_pack_PIMAGE_VXD_HEADER();
7069 test_pack_PIO_COUNTERS();
7070 test_pack_PISECURITY_DESCRIPTOR();
7071 test_pack_PISECURITY_DESCRIPTOR_RELATIVE();
7073 test_pack_PLARGE_INTEGER();
7074 test_pack_PLIST_ENTRY();
7076 test_pack_PLUID_AND_ATTRIBUTES();
7077 test_pack_PMEMORY_BASIC_INFORMATION();
7078 test_pack_PMESSAGE_RESOURCE_BLOCK();
7079 test_pack_PMESSAGE_RESOURCE_DATA();
7080 test_pack_PMESSAGE_RESOURCE_ENTRY();
7081 test_pack_PNT_TIB();
7082 test_pack_POBJECT_TYPE_LIST();
7086 test_pack_PPOINTL();
7087 test_pack_PPRIVILEGE_SET();
7090 test_pack_PRIVILEGE_SET();
7091 test_pack_PRLIST_ENTRY();
7093 test_pack_PRTL_CRITICAL_SECTION();
7094 test_pack_PRTL_CRITICAL_SECTION_DEBUG();
7095 test_pack_PRTL_OSVERSIONINFOEXW();
7096 test_pack_PRTL_OSVERSIONINFOW();
7097 test_pack_PRTL_RESOURCE_DEBUG();
7098 test_pack_PSECURITY_DESCRIPTOR();
7099 test_pack_PSECURITY_QUALITY_OF_SERVICE();
7101 test_pack_PSID_IDENTIFIER_AUTHORITY();
7102 test_pack_PSINGLE_LIST_ENTRY();
7105 test_pack_PSYSTEM_ALARM_ACE();
7106 test_pack_PSYSTEM_AUDIT_ACE();
7108 test_pack_PTOKEN_GROUPS();
7109 test_pack_PTOKEN_PRIVILEGES();
7110 test_pack_PTOKEN_USER();
7112 test_pack_PULARGE_INTEGER();
7113 test_pack_PVECTORED_EXCEPTION_HANDLER();
7119 test_pack_RTL_CRITICAL_SECTION();
7120 test_pack_RTL_CRITICAL_SECTION_DEBUG();
7121 test_pack_RTL_OSVERSIONINFOEXW();
7122 test_pack_RTL_OSVERSIONINFOW();
7123 test_pack_RTL_RESOURCE_DEBUG();
7124 test_pack_SECURITY_CONTEXT_TRACKING_MODE();
7125 test_pack_SECURITY_DESCRIPTOR();
7126 test_pack_SECURITY_DESCRIPTOR_CONTROL();
7127 test_pack_SECURITY_DESCRIPTOR_RELATIVE();
7128 test_pack_SECURITY_INFORMATION();
7129 test_pack_SECURITY_QUALITY_OF_SERVICE();
7132 test_pack_SID_AND_ATTRIBUTES();
7133 test_pack_SID_IDENTIFIER_AUTHORITY();
7134 test_pack_SINGLE_LIST_ENTRY();
7138 test_pack_SSIZE_T();
7139 test_pack_SYSTEM_ALARM_ACE();
7140 test_pack_SYSTEM_AUDIT_ACE();
7142 test_pack_TOKEN_DEFAULT_DACL();
7143 test_pack_TOKEN_GROUPS();
7144 test_pack_TOKEN_OWNER();
7145 test_pack_TOKEN_PRIMARY_GROUP();
7146 test_pack_TOKEN_PRIVILEGES();
7147 test_pack_TOKEN_SOURCE();
7148 test_pack_TOKEN_STATISTICS();
7149 test_pack_TOKEN_USER();
7151 test_pack_UHALF_PTR();
7157 test_pack_UINT_PTR();
7158 test_pack_ULARGE_INTEGER();
7160 test_pack_ULONG32();
7161 test_pack_ULONG64();
7162 test_pack_ULONGLONG();
7163 test_pack_ULONG_PTR();
7165 test_pack_WAITORTIMERCALLBACKFUNC();
7171 START_TEST(generated)