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