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 #include "ntdll_test.h" 9 10 /*********************************************************************** 11 * Compatibility macros 12 */ 13 14 #define DWORD_PTR UINT_PTR 15 #define LONG_PTR INT_PTR 16 #define ULONG_PTR UINT_PTR 17 18 /*********************************************************************** 19 * Windows API extension 20 */ 21 22 #if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus) 23 # define _TYPE_ALIGNMENT(type) __alignof(type) 24 #elif defined(__GNUC__) 25 # define _TYPE_ALIGNMENT(type) __alignof__(type) 26 #else 27 /* 28 * FIXME: May not be possible without a compiler extension 29 * (if type is not just a name that is, otherwise the normal 30 * TYPE_ALIGNMENT can be used) 31 */ 32 #endif 33 34 #if defined(TYPE_ALIGNMENT) && defined(_MSC_VER) && _MSC_VER >= 800 && !defined(__cplusplus) 35 #pragma warning(disable:4116) 36 #endif 37 38 #if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT) 39 # define TYPE_ALIGNMENT _TYPE_ALIGNMENT 40 #endif 41 42 /*********************************************************************** 43 * Test helper macros 44 */ 45 46 #define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size); 47 48 #ifdef TYPE_ALIGNMENT 49 # define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align); 50 #else 51 # define TEST_TYPE_ALIGN(type, align) 52 #endif 53 54 #ifdef _TYPE_ALIGNMENT 55 # define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align); 56 # define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align); 57 #else 58 # define TEST_TARGET_ALIGN(type, align) 59 # define TEST_FIELD_ALIGN(type, field, align) 60 #endif 61 62 #define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset); 63 64 #define TEST_TARGET_SIZE(type, size) TEST_TYPE_SIZE(*(type)0, size) 65 #define TEST_FIELD_SIZE(type, field, size) TEST_TYPE_SIZE((((type*)0)->field), size) 66 #define TEST_TYPE_SIGNED(type) C_ASSERT((type) -1 < 0); 67 #define TEST_TYPE_UNSIGNED(type) C_ASSERT((type) -1 > 0); 68 69 70 #ifdef _WIN64 71 72 static void test_pack_DWORD32(void) 73 { 74 /* DWORD32 */ 75 TEST_TYPE_SIZE (DWORD32, 4) 76 TEST_TYPE_ALIGN (DWORD32, 4) 77 TEST_TYPE_UNSIGNED(DWORD32) 78 } 79 80 static void test_pack_DWORD64(void) 81 { 82 /* DWORD64 */ 83 TEST_TYPE_SIZE (DWORD64, 8) 84 TEST_TYPE_ALIGN (DWORD64, 8) 85 TEST_TYPE_UNSIGNED(DWORD64) 86 } 87 88 static void test_pack_DWORD_PTR(void) 89 { 90 /* DWORD_PTR */ 91 TEST_TYPE_SIZE (DWORD_PTR, 8) 92 TEST_TYPE_ALIGN (DWORD_PTR, 8) 93 } 94 95 static void test_pack_HALF_PTR(void) 96 { 97 /* HALF_PTR */ 98 TEST_TYPE_SIZE (HALF_PTR, 4) 99 TEST_TYPE_ALIGN (HALF_PTR, 4) 100 TEST_TYPE_SIGNED(HALF_PTR) 101 } 102 103 static void test_pack_INT16(void) 104 { 105 /* INT16 */ 106 TEST_TYPE_SIZE (INT16, 2) 107 TEST_TYPE_ALIGN (INT16, 2) 108 TEST_TYPE_SIGNED(INT16) 109 } 110 111 static void test_pack_INT32(void) 112 { 113 /* INT32 */ 114 TEST_TYPE_SIZE (INT32, 4) 115 TEST_TYPE_ALIGN (INT32, 4) 116 TEST_TYPE_SIGNED(INT32) 117 } 118 119 static void test_pack_INT64(void) 120 { 121 /* INT64 */ 122 TEST_TYPE_SIZE (INT64, 8) 123 TEST_TYPE_ALIGN (INT64, 8) 124 TEST_TYPE_SIGNED(INT64) 125 } 126 127 static void test_pack_INT8(void) 128 { 129 /* INT8 */ 130 TEST_TYPE_SIZE (INT8, 1) 131 TEST_TYPE_ALIGN (INT8, 1) 132 TEST_TYPE_SIGNED(INT8) 133 } 134 135 static void test_pack_INT_PTR(void) 136 { 137 /* INT_PTR */ 138 TEST_TYPE_SIZE (INT_PTR, 8) 139 TEST_TYPE_ALIGN (INT_PTR, 8) 140 TEST_TYPE_SIGNED(INT_PTR) 141 } 142 143 static void test_pack_LONG32(void) 144 { 145 /* LONG32 */ 146 TEST_TYPE_SIZE (LONG32, 4) 147 TEST_TYPE_ALIGN (LONG32, 4) 148 TEST_TYPE_SIGNED(LONG32) 149 } 150 151 static void test_pack_LONG64(void) 152 { 153 /* LONG64 */ 154 TEST_TYPE_SIZE (LONG64, 8) 155 TEST_TYPE_ALIGN (LONG64, 8) 156 TEST_TYPE_SIGNED(LONG64) 157 } 158 159 static void test_pack_LONG_PTR(void) 160 { 161 /* LONG_PTR */ 162 TEST_TYPE_SIZE (LONG_PTR, 8) 163 TEST_TYPE_ALIGN (LONG_PTR, 8) 164 TEST_TYPE_SIGNED(LONG_PTR) 165 } 166 167 static void test_pack_SIZE_T(void) 168 { 169 /* SIZE_T */ 170 TEST_TYPE_SIZE (SIZE_T, 8) 171 TEST_TYPE_ALIGN (SIZE_T, 8) 172 } 173 174 static void test_pack_SSIZE_T(void) 175 { 176 /* SSIZE_T */ 177 TEST_TYPE_SIZE (SSIZE_T, 8) 178 TEST_TYPE_ALIGN (SSIZE_T, 8) 179 } 180 181 static void test_pack_UHALF_PTR(void) 182 { 183 /* UHALF_PTR */ 184 TEST_TYPE_SIZE (UHALF_PTR, 4) 185 TEST_TYPE_ALIGN (UHALF_PTR, 4) 186 TEST_TYPE_UNSIGNED(UHALF_PTR) 187 } 188 189 static void test_pack_UINT16(void) 190 { 191 /* UINT16 */ 192 TEST_TYPE_SIZE (UINT16, 2) 193 TEST_TYPE_ALIGN (UINT16, 2) 194 TEST_TYPE_UNSIGNED(UINT16) 195 } 196 197 static void test_pack_UINT32(void) 198 { 199 /* UINT32 */ 200 TEST_TYPE_SIZE (UINT32, 4) 201 TEST_TYPE_ALIGN (UINT32, 4) 202 TEST_TYPE_UNSIGNED(UINT32) 203 } 204 205 static void test_pack_UINT64(void) 206 { 207 /* UINT64 */ 208 TEST_TYPE_SIZE (UINT64, 8) 209 TEST_TYPE_ALIGN (UINT64, 8) 210 TEST_TYPE_UNSIGNED(UINT64) 211 } 212 213 static void test_pack_UINT8(void) 214 { 215 /* UINT8 */ 216 TEST_TYPE_SIZE (UINT8, 1) 217 TEST_TYPE_ALIGN (UINT8, 1) 218 TEST_TYPE_UNSIGNED(UINT8) 219 } 220 221 static void test_pack_UINT_PTR(void) 222 { 223 /* UINT_PTR */ 224 TEST_TYPE_SIZE (UINT_PTR, 8) 225 TEST_TYPE_ALIGN (UINT_PTR, 8) 226 TEST_TYPE_UNSIGNED(UINT_PTR) 227 } 228 229 static void test_pack_ULONG32(void) 230 { 231 /* ULONG32 */ 232 TEST_TYPE_SIZE (ULONG32, 4) 233 TEST_TYPE_ALIGN (ULONG32, 4) 234 TEST_TYPE_UNSIGNED(ULONG32) 235 } 236 237 static void test_pack_ULONG64(void) 238 { 239 /* ULONG64 */ 240 TEST_TYPE_SIZE (ULONG64, 8) 241 TEST_TYPE_ALIGN (ULONG64, 8) 242 TEST_TYPE_UNSIGNED(ULONG64) 243 } 244 245 static void test_pack_ULONG_PTR(void) 246 { 247 /* ULONG_PTR */ 248 TEST_TYPE_SIZE (ULONG_PTR, 8) 249 TEST_TYPE_ALIGN (ULONG_PTR, 8) 250 TEST_TYPE_UNSIGNED(ULONG_PTR) 251 } 252 253 static void test_pack_ACCESS_ALLOWED_ACE(void) 254 { 255 /* ACCESS_ALLOWED_ACE */ 256 TEST_TYPE_SIZE (ACCESS_ALLOWED_ACE, 12) 257 TEST_TYPE_ALIGN (ACCESS_ALLOWED_ACE, 4) 258 TEST_FIELD_SIZE (ACCESS_ALLOWED_ACE, Header, 4) 259 TEST_FIELD_ALIGN (ACCESS_ALLOWED_ACE, Header, 2) 260 TEST_FIELD_OFFSET(ACCESS_ALLOWED_ACE, Header, 0) 261 TEST_FIELD_SIZE (ACCESS_ALLOWED_ACE, Mask, 4) 262 TEST_FIELD_ALIGN (ACCESS_ALLOWED_ACE, Mask, 4) 263 TEST_FIELD_OFFSET(ACCESS_ALLOWED_ACE, Mask, 4) 264 TEST_FIELD_SIZE (ACCESS_ALLOWED_ACE, SidStart, 4) 265 TEST_FIELD_ALIGN (ACCESS_ALLOWED_ACE, SidStart, 4) 266 TEST_FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart, 8) 267 } 268 269 static void test_pack_ACCESS_DENIED_ACE(void) 270 { 271 /* ACCESS_DENIED_ACE */ 272 TEST_TYPE_SIZE (ACCESS_DENIED_ACE, 12) 273 TEST_TYPE_ALIGN (ACCESS_DENIED_ACE, 4) 274 TEST_FIELD_SIZE (ACCESS_DENIED_ACE, Header, 4) 275 TEST_FIELD_ALIGN (ACCESS_DENIED_ACE, Header, 2) 276 TEST_FIELD_OFFSET(ACCESS_DENIED_ACE, Header, 0) 277 TEST_FIELD_SIZE (ACCESS_DENIED_ACE, Mask, 4) 278 TEST_FIELD_ALIGN (ACCESS_DENIED_ACE, Mask, 4) 279 TEST_FIELD_OFFSET(ACCESS_DENIED_ACE, Mask, 4) 280 TEST_FIELD_SIZE (ACCESS_DENIED_ACE, SidStart, 4) 281 TEST_FIELD_ALIGN (ACCESS_DENIED_ACE, SidStart, 4) 282 TEST_FIELD_OFFSET(ACCESS_DENIED_ACE, SidStart, 8) 283 } 284 285 static void test_pack_ACCESS_MASK(void) 286 { 287 /* ACCESS_MASK */ 288 TEST_TYPE_SIZE (ACCESS_MASK, 4) 289 TEST_TYPE_ALIGN (ACCESS_MASK, 4) 290 TEST_TYPE_UNSIGNED(ACCESS_MASK) 291 } 292 293 static void test_pack_ACE_HEADER(void) 294 { 295 /* ACE_HEADER */ 296 TEST_TYPE_SIZE (ACE_HEADER, 4) 297 TEST_TYPE_ALIGN (ACE_HEADER, 2) 298 TEST_FIELD_SIZE (ACE_HEADER, AceType, 1) 299 TEST_FIELD_ALIGN (ACE_HEADER, AceType, 1) 300 TEST_FIELD_OFFSET(ACE_HEADER, AceType, 0) 301 TEST_FIELD_SIZE (ACE_HEADER, AceFlags, 1) 302 TEST_FIELD_ALIGN (ACE_HEADER, AceFlags, 1) 303 TEST_FIELD_OFFSET(ACE_HEADER, AceFlags, 1) 304 TEST_FIELD_SIZE (ACE_HEADER, AceSize, 2) 305 TEST_FIELD_ALIGN (ACE_HEADER, AceSize, 2) 306 TEST_FIELD_OFFSET(ACE_HEADER, AceSize, 2) 307 } 308 309 static void test_pack_ACL(void) 310 { 311 /* ACL */ 312 TEST_TYPE_SIZE (ACL, 8) 313 TEST_TYPE_ALIGN (ACL, 2) 314 TEST_FIELD_SIZE (ACL, AclRevision, 1) 315 TEST_FIELD_ALIGN (ACL, AclRevision, 1) 316 TEST_FIELD_OFFSET(ACL, AclRevision, 0) 317 TEST_FIELD_SIZE (ACL, Sbz1, 1) 318 TEST_FIELD_ALIGN (ACL, Sbz1, 1) 319 TEST_FIELD_OFFSET(ACL, Sbz1, 1) 320 TEST_FIELD_SIZE (ACL, AclSize, 2) 321 TEST_FIELD_ALIGN (ACL, AclSize, 2) 322 TEST_FIELD_OFFSET(ACL, AclSize, 2) 323 TEST_FIELD_SIZE (ACL, AceCount, 2) 324 TEST_FIELD_ALIGN (ACL, AceCount, 2) 325 TEST_FIELD_OFFSET(ACL, AceCount, 4) 326 TEST_FIELD_SIZE (ACL, Sbz2, 2) 327 TEST_FIELD_ALIGN (ACL, Sbz2, 2) 328 TEST_FIELD_OFFSET(ACL, Sbz2, 6) 329 } 330 331 static void test_pack_ACL_REVISION_INFORMATION(void) 332 { 333 /* ACL_REVISION_INFORMATION */ 334 TEST_TYPE_SIZE (ACL_REVISION_INFORMATION, 4) 335 TEST_TYPE_ALIGN (ACL_REVISION_INFORMATION, 4) 336 TEST_FIELD_SIZE (ACL_REVISION_INFORMATION, AclRevision, 4) 337 TEST_FIELD_ALIGN (ACL_REVISION_INFORMATION, AclRevision, 4) 338 TEST_FIELD_OFFSET(ACL_REVISION_INFORMATION, AclRevision, 0) 339 } 340 341 static void test_pack_ACL_SIZE_INFORMATION(void) 342 { 343 /* ACL_SIZE_INFORMATION */ 344 TEST_TYPE_SIZE (ACL_SIZE_INFORMATION, 12) 345 TEST_TYPE_ALIGN (ACL_SIZE_INFORMATION, 4) 346 TEST_FIELD_SIZE (ACL_SIZE_INFORMATION, AceCount, 4) 347 TEST_FIELD_ALIGN (ACL_SIZE_INFORMATION, AceCount, 4) 348 TEST_FIELD_OFFSET(ACL_SIZE_INFORMATION, AceCount, 0) 349 TEST_FIELD_SIZE (ACL_SIZE_INFORMATION, AclBytesInUse, 4) 350 TEST_FIELD_ALIGN (ACL_SIZE_INFORMATION, AclBytesInUse, 4) 351 TEST_FIELD_OFFSET(ACL_SIZE_INFORMATION, AclBytesInUse, 4) 352 TEST_FIELD_SIZE (ACL_SIZE_INFORMATION, AclBytesFree, 4) 353 TEST_FIELD_ALIGN (ACL_SIZE_INFORMATION, AclBytesFree, 4) 354 TEST_FIELD_OFFSET(ACL_SIZE_INFORMATION, AclBytesFree, 8) 355 } 356 357 static void test_pack_BOOLEAN(void) 358 { 359 /* BOOLEAN */ 360 TEST_TYPE_SIZE (BOOLEAN, 1) 361 TEST_TYPE_ALIGN (BOOLEAN, 1) 362 TEST_TYPE_UNSIGNED(BOOLEAN) 363 } 364 365 static void test_pack_CCHAR(void) 366 { 367 /* CCHAR */ 368 TEST_TYPE_SIZE (CCHAR, 1) 369 TEST_TYPE_ALIGN (CCHAR, 1) 370 } 371 372 static void test_pack_CHAR(void) 373 { 374 /* CHAR */ 375 TEST_TYPE_SIZE (CHAR, 1) 376 TEST_TYPE_ALIGN (CHAR, 1) 377 } 378 379 static void test_pack_DWORDLONG(void) 380 { 381 /* DWORDLONG */ 382 TEST_TYPE_SIZE (DWORDLONG, 8) 383 TEST_TYPE_ALIGN (DWORDLONG, 8) 384 TEST_TYPE_UNSIGNED(DWORDLONG) 385 } 386 387 static void test_pack_EXCEPTION_POINTERS(void) 388 { 389 /* EXCEPTION_POINTERS */ 390 TEST_TYPE_SIZE (EXCEPTION_POINTERS, 16) 391 TEST_TYPE_ALIGN (EXCEPTION_POINTERS, 8) 392 TEST_FIELD_SIZE (EXCEPTION_POINTERS, ExceptionRecord, 8) 393 TEST_FIELD_ALIGN (EXCEPTION_POINTERS, ExceptionRecord, 8) 394 TEST_FIELD_OFFSET(EXCEPTION_POINTERS, ExceptionRecord, 0) 395 TEST_FIELD_SIZE (EXCEPTION_POINTERS, ContextRecord, 8) 396 TEST_FIELD_ALIGN (EXCEPTION_POINTERS, ContextRecord, 8) 397 TEST_FIELD_OFFSET(EXCEPTION_POINTERS, ContextRecord, 8) 398 } 399 400 static void test_pack_EXCEPTION_RECORD(void) 401 { 402 /* EXCEPTION_RECORD */ 403 TEST_TYPE_SIZE (EXCEPTION_RECORD, 152) 404 TEST_TYPE_ALIGN (EXCEPTION_RECORD, 8) 405 TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionCode, 4) 406 TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionCode, 4) 407 TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionCode, 0) 408 TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionFlags, 4) 409 TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionFlags, 4) 410 TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionFlags, 4) 411 TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionRecord, 8) 412 TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionRecord, 8) 413 TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionRecord, 8) 414 TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionAddress, 8) 415 TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionAddress, 8) 416 TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionAddress, 16) 417 TEST_FIELD_SIZE (EXCEPTION_RECORD, NumberParameters, 4) 418 TEST_FIELD_ALIGN (EXCEPTION_RECORD, NumberParameters, 4) 419 TEST_FIELD_OFFSET(EXCEPTION_RECORD, NumberParameters, 24) 420 TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionInformation, 120) 421 TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionInformation, 8) 422 TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionInformation, 32) 423 } 424 425 static void test_pack_EXECUTION_STATE(void) 426 { 427 /* EXECUTION_STATE */ 428 TEST_TYPE_SIZE (EXECUTION_STATE, 4) 429 TEST_TYPE_ALIGN (EXECUTION_STATE, 4) 430 TEST_TYPE_UNSIGNED(EXECUTION_STATE) 431 } 432 433 static void test_pack_FPO_DATA(void) 434 { 435 /* FPO_DATA */ 436 TEST_TYPE_SIZE (FPO_DATA, 16) 437 TEST_TYPE_ALIGN (FPO_DATA, 4) 438 TEST_FIELD_SIZE (FPO_DATA, ulOffStart, 4) 439 TEST_FIELD_ALIGN (FPO_DATA, ulOffStart, 4) 440 TEST_FIELD_OFFSET(FPO_DATA, ulOffStart, 0) 441 TEST_FIELD_SIZE (FPO_DATA, cbProcSize, 4) 442 TEST_FIELD_ALIGN (FPO_DATA, cbProcSize, 4) 443 TEST_FIELD_OFFSET(FPO_DATA, cbProcSize, 4) 444 TEST_FIELD_SIZE (FPO_DATA, cdwLocals, 4) 445 TEST_FIELD_ALIGN (FPO_DATA, cdwLocals, 4) 446 TEST_FIELD_OFFSET(FPO_DATA, cdwLocals, 8) 447 TEST_FIELD_SIZE (FPO_DATA, cdwParams, 2) 448 TEST_FIELD_ALIGN (FPO_DATA, cdwParams, 2) 449 TEST_FIELD_OFFSET(FPO_DATA, cdwParams, 12) 450 } 451 452 static void test_pack_GENERIC_MAPPING(void) 453 { 454 /* GENERIC_MAPPING */ 455 TEST_TYPE_SIZE (GENERIC_MAPPING, 16) 456 TEST_TYPE_ALIGN (GENERIC_MAPPING, 4) 457 TEST_FIELD_SIZE (GENERIC_MAPPING, GenericRead, 4) 458 TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericRead, 4) 459 TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericRead, 0) 460 TEST_FIELD_SIZE (GENERIC_MAPPING, GenericWrite, 4) 461 TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericWrite, 4) 462 TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericWrite, 4) 463 TEST_FIELD_SIZE (GENERIC_MAPPING, GenericExecute, 4) 464 TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericExecute, 4) 465 TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericExecute, 8) 466 TEST_FIELD_SIZE (GENERIC_MAPPING, GenericAll, 4) 467 TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericAll, 4) 468 TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericAll, 12) 469 } 470 471 static void test_pack_HANDLE(void) 472 { 473 /* HANDLE */ 474 TEST_TYPE_SIZE (HANDLE, 8) 475 TEST_TYPE_ALIGN (HANDLE, 8) 476 } 477 478 static void test_pack_HRESULT(void) 479 { 480 /* HRESULT */ 481 TEST_TYPE_SIZE (HRESULT, 4) 482 TEST_TYPE_ALIGN (HRESULT, 4) 483 } 484 485 static void test_pack_IMAGE_ARCHIVE_MEMBER_HEADER(void) 486 { 487 /* IMAGE_ARCHIVE_MEMBER_HEADER */ 488 TEST_TYPE_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, 60) 489 TEST_TYPE_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, 1) 490 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Name, 16) 491 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Name, 1) 492 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Name, 0) 493 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Date, 12) 494 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Date, 1) 495 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Date, 16) 496 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, UserID, 6) 497 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, UserID, 1) 498 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, UserID, 28) 499 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, GroupID, 6) 500 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, GroupID, 1) 501 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, GroupID, 34) 502 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Mode, 8) 503 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Mode, 1) 504 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Mode, 40) 505 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Size, 10) 506 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Size, 1) 507 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Size, 48) 508 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, EndHeader, 2) 509 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, EndHeader, 1) 510 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, EndHeader, 58) 511 } 512 513 static void test_pack_IMAGE_AUX_SYMBOL(void) 514 { 515 /* IMAGE_AUX_SYMBOL (pack 2) */ 516 } 517 518 static void test_pack_IMAGE_BASE_RELOCATION(void) 519 { 520 /* IMAGE_BASE_RELOCATION */ 521 TEST_TYPE_SIZE (IMAGE_BASE_RELOCATION, 8) 522 TEST_TYPE_ALIGN (IMAGE_BASE_RELOCATION, 4) 523 TEST_FIELD_SIZE (IMAGE_BASE_RELOCATION, VirtualAddress, 4) 524 TEST_FIELD_ALIGN (IMAGE_BASE_RELOCATION, VirtualAddress, 4) 525 TEST_FIELD_OFFSET(IMAGE_BASE_RELOCATION, VirtualAddress, 0) 526 TEST_FIELD_SIZE (IMAGE_BASE_RELOCATION, SizeOfBlock, 4) 527 TEST_FIELD_ALIGN (IMAGE_BASE_RELOCATION, SizeOfBlock, 4) 528 TEST_FIELD_OFFSET(IMAGE_BASE_RELOCATION, SizeOfBlock, 4) 529 } 530 531 static void test_pack_IMAGE_BOUND_FORWARDER_REF(void) 532 { 533 /* IMAGE_BOUND_FORWARDER_REF */ 534 TEST_TYPE_SIZE (IMAGE_BOUND_FORWARDER_REF, 8) 535 TEST_TYPE_ALIGN (IMAGE_BOUND_FORWARDER_REF, 4) 536 TEST_FIELD_SIZE (IMAGE_BOUND_FORWARDER_REF, TimeDateStamp, 4) 537 TEST_FIELD_ALIGN (IMAGE_BOUND_FORWARDER_REF, TimeDateStamp, 4) 538 TEST_FIELD_OFFSET(IMAGE_BOUND_FORWARDER_REF, TimeDateStamp, 0) 539 TEST_FIELD_SIZE (IMAGE_BOUND_FORWARDER_REF, OffsetModuleName, 2) 540 TEST_FIELD_ALIGN (IMAGE_BOUND_FORWARDER_REF, OffsetModuleName, 2) 541 TEST_FIELD_OFFSET(IMAGE_BOUND_FORWARDER_REF, OffsetModuleName, 4) 542 TEST_FIELD_SIZE (IMAGE_BOUND_FORWARDER_REF, Reserved, 2) 543 TEST_FIELD_ALIGN (IMAGE_BOUND_FORWARDER_REF, Reserved, 2) 544 TEST_FIELD_OFFSET(IMAGE_BOUND_FORWARDER_REF, Reserved, 6) 545 } 546 547 static void test_pack_IMAGE_BOUND_IMPORT_DESCRIPTOR(void) 548 { 549 /* IMAGE_BOUND_IMPORT_DESCRIPTOR */ 550 TEST_TYPE_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, 8) 551 TEST_TYPE_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, 4) 552 TEST_FIELD_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, TimeDateStamp, 4) 553 TEST_FIELD_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, TimeDateStamp, 4) 554 TEST_FIELD_OFFSET(IMAGE_BOUND_IMPORT_DESCRIPTOR, TimeDateStamp, 0) 555 TEST_FIELD_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, OffsetModuleName, 2) 556 TEST_FIELD_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, OffsetModuleName, 2) 557 TEST_FIELD_OFFSET(IMAGE_BOUND_IMPORT_DESCRIPTOR, OffsetModuleName, 4) 558 TEST_FIELD_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, NumberOfModuleForwarderRefs, 2) 559 TEST_FIELD_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, NumberOfModuleForwarderRefs, 2) 560 TEST_FIELD_OFFSET(IMAGE_BOUND_IMPORT_DESCRIPTOR, NumberOfModuleForwarderRefs, 6) 561 } 562 563 static void test_pack_IMAGE_COFF_SYMBOLS_HEADER(void) 564 { 565 /* IMAGE_COFF_SYMBOLS_HEADER */ 566 TEST_TYPE_SIZE (IMAGE_COFF_SYMBOLS_HEADER, 32) 567 TEST_TYPE_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, 4) 568 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, NumberOfSymbols, 4) 569 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, NumberOfSymbols, 4) 570 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, NumberOfSymbols, 0) 571 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstSymbol, 4) 572 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstSymbol, 4) 573 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstSymbol, 4) 574 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, NumberOfLinenumbers, 4) 575 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, NumberOfLinenumbers, 4) 576 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, NumberOfLinenumbers, 8) 577 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstLinenumber, 4) 578 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstLinenumber, 4) 579 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstLinenumber, 12) 580 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfCode, 4) 581 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfCode, 4) 582 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfCode, 16) 583 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfCode, 4) 584 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfCode, 4) 585 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfCode, 20) 586 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfData, 4) 587 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfData, 4) 588 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfData, 24) 589 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfData, 4) 590 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfData, 4) 591 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfData, 28) 592 } 593 594 static void test_pack_IMAGE_DATA_DIRECTORY(void) 595 { 596 /* IMAGE_DATA_DIRECTORY */ 597 TEST_TYPE_SIZE (IMAGE_DATA_DIRECTORY, 8) 598 TEST_TYPE_ALIGN (IMAGE_DATA_DIRECTORY, 4) 599 TEST_FIELD_SIZE (IMAGE_DATA_DIRECTORY, VirtualAddress, 4) 600 TEST_FIELD_ALIGN (IMAGE_DATA_DIRECTORY, VirtualAddress, 4) 601 TEST_FIELD_OFFSET(IMAGE_DATA_DIRECTORY, VirtualAddress, 0) 602 TEST_FIELD_SIZE (IMAGE_DATA_DIRECTORY, Size, 4) 603 TEST_FIELD_ALIGN (IMAGE_DATA_DIRECTORY, Size, 4) 604 TEST_FIELD_OFFSET(IMAGE_DATA_DIRECTORY, Size, 4) 605 } 606 607 static void test_pack_IMAGE_DEBUG_DIRECTORY(void) 608 { 609 /* IMAGE_DEBUG_DIRECTORY */ 610 TEST_TYPE_SIZE (IMAGE_DEBUG_DIRECTORY, 28) 611 TEST_TYPE_ALIGN (IMAGE_DEBUG_DIRECTORY, 4) 612 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, Characteristics, 4) 613 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, Characteristics, 4) 614 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, Characteristics, 0) 615 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, TimeDateStamp, 4) 616 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, TimeDateStamp, 4) 617 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, TimeDateStamp, 4) 618 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, MajorVersion, 2) 619 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, MajorVersion, 2) 620 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, MajorVersion, 8) 621 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, MinorVersion, 2) 622 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, MinorVersion, 2) 623 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, MinorVersion, 10) 624 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, Type, 4) 625 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, Type, 4) 626 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, Type, 12) 627 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, SizeOfData, 4) 628 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, SizeOfData, 4) 629 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, SizeOfData, 16) 630 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, AddressOfRawData, 4) 631 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, AddressOfRawData, 4) 632 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, AddressOfRawData, 20) 633 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, PointerToRawData, 4) 634 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, PointerToRawData, 4) 635 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, PointerToRawData, 24) 636 } 637 638 static void test_pack_IMAGE_DEBUG_MISC(void) 639 { 640 /* IMAGE_DEBUG_MISC */ 641 TEST_TYPE_SIZE (IMAGE_DEBUG_MISC, 16) 642 TEST_TYPE_ALIGN (IMAGE_DEBUG_MISC, 4) 643 TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, DataType, 4) 644 TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, DataType, 4) 645 TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, DataType, 0) 646 TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Length, 4) 647 TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Length, 4) 648 TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Length, 4) 649 TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Unicode, 1) 650 TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Unicode, 1) 651 TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Unicode, 8) 652 TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Reserved, 3) 653 TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Reserved, 1) 654 TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Reserved, 9) 655 TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Data, 1) 656 TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Data, 1) 657 TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Data, 12) 658 } 659 660 static void test_pack_IMAGE_DOS_HEADER(void) 661 { 662 /* IMAGE_DOS_HEADER (pack 2) */ 663 TEST_TYPE_SIZE (IMAGE_DOS_HEADER, 64) 664 TEST_TYPE_ALIGN (IMAGE_DOS_HEADER, 2) 665 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_magic, 2) 666 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_magic, 2) 667 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_magic, 0) 668 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cblp, 2) 669 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cblp, 2) 670 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cblp, 2) 671 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cp, 2) 672 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cp, 2) 673 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cp, 4) 674 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_crlc, 2) 675 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_crlc, 2) 676 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_crlc, 6) 677 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cparhdr, 2) 678 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cparhdr, 2) 679 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cparhdr, 8) 680 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_minalloc, 2) 681 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_minalloc, 2) 682 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_minalloc, 10) 683 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_maxalloc, 2) 684 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_maxalloc, 2) 685 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_maxalloc, 12) 686 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_ss, 2) 687 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_ss, 2) 688 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_ss, 14) 689 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_sp, 2) 690 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_sp, 2) 691 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_sp, 16) 692 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_csum, 2) 693 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_csum, 2) 694 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_csum, 18) 695 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_ip, 2) 696 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_ip, 2) 697 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_ip, 20) 698 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cs, 2) 699 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cs, 2) 700 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cs, 22) 701 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_lfarlc, 2) 702 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_lfarlc, 2) 703 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_lfarlc, 24) 704 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_ovno, 2) 705 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_ovno, 2) 706 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_ovno, 26) 707 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_res, 8) 708 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_res, 2) 709 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_res, 28) 710 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_oemid, 2) 711 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_oemid, 2) 712 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_oemid, 36) 713 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_oeminfo, 2) 714 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_oeminfo, 2) 715 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_oeminfo, 38) 716 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_res2, 20) 717 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_res2, 2) 718 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_res2, 40) 719 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_lfanew, 4) 720 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_lfanew, 2) 721 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_lfanew, 60) 722 } 723 724 static void test_pack_IMAGE_EXPORT_DIRECTORY(void) 725 { 726 /* IMAGE_EXPORT_DIRECTORY */ 727 TEST_TYPE_SIZE (IMAGE_EXPORT_DIRECTORY, 40) 728 TEST_TYPE_ALIGN (IMAGE_EXPORT_DIRECTORY, 4) 729 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, Characteristics, 4) 730 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, Characteristics, 4) 731 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, Characteristics, 0) 732 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, TimeDateStamp, 4) 733 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, TimeDateStamp, 4) 734 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, TimeDateStamp, 4) 735 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, MajorVersion, 2) 736 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, MajorVersion, 2) 737 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, MajorVersion, 8) 738 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, MinorVersion, 2) 739 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, MinorVersion, 2) 740 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, MinorVersion, 10) 741 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, Name, 4) 742 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, Name, 4) 743 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, Name, 12) 744 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, Base, 4) 745 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, Base, 4) 746 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, Base, 16) 747 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, NumberOfFunctions, 4) 748 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, NumberOfFunctions, 4) 749 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, NumberOfFunctions, 20) 750 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, NumberOfNames, 4) 751 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, NumberOfNames, 4) 752 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, NumberOfNames, 24) 753 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, AddressOfFunctions, 4) 754 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, AddressOfFunctions, 4) 755 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, AddressOfFunctions, 28) 756 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, AddressOfNames, 4) 757 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, AddressOfNames, 4) 758 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, AddressOfNames, 32) 759 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, AddressOfNameOrdinals, 4) 760 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, AddressOfNameOrdinals, 4) 761 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, AddressOfNameOrdinals, 36) 762 } 763 764 static void test_pack_IMAGE_FILE_HEADER(void) 765 { 766 /* IMAGE_FILE_HEADER */ 767 TEST_TYPE_SIZE (IMAGE_FILE_HEADER, 20) 768 TEST_TYPE_ALIGN (IMAGE_FILE_HEADER, 4) 769 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, Machine, 2) 770 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, Machine, 2) 771 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, Machine, 0) 772 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, NumberOfSections, 2) 773 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, NumberOfSections, 2) 774 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, NumberOfSections, 2) 775 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, TimeDateStamp, 4) 776 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, TimeDateStamp, 4) 777 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, TimeDateStamp, 4) 778 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, PointerToSymbolTable, 4) 779 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, PointerToSymbolTable, 4) 780 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, PointerToSymbolTable, 8) 781 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, NumberOfSymbols, 4) 782 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, NumberOfSymbols, 4) 783 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, NumberOfSymbols, 12) 784 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, SizeOfOptionalHeader, 2) 785 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, SizeOfOptionalHeader, 2) 786 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, SizeOfOptionalHeader, 16) 787 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, Characteristics, 2) 788 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, Characteristics, 2) 789 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, Characteristics, 18) 790 } 791 792 static void test_pack_IMAGE_FUNCTION_ENTRY(void) 793 { 794 /* IMAGE_FUNCTION_ENTRY */ 795 TEST_TYPE_SIZE (IMAGE_FUNCTION_ENTRY, 12) 796 TEST_TYPE_ALIGN (IMAGE_FUNCTION_ENTRY, 4) 797 TEST_FIELD_SIZE (IMAGE_FUNCTION_ENTRY, StartingAddress, 4) 798 TEST_FIELD_ALIGN (IMAGE_FUNCTION_ENTRY, StartingAddress, 4) 799 TEST_FIELD_OFFSET(IMAGE_FUNCTION_ENTRY, StartingAddress, 0) 800 TEST_FIELD_SIZE (IMAGE_FUNCTION_ENTRY, EndingAddress, 4) 801 TEST_FIELD_ALIGN (IMAGE_FUNCTION_ENTRY, EndingAddress, 4) 802 TEST_FIELD_OFFSET(IMAGE_FUNCTION_ENTRY, EndingAddress, 4) 803 TEST_FIELD_SIZE (IMAGE_FUNCTION_ENTRY, EndOfPrologue, 4) 804 TEST_FIELD_ALIGN (IMAGE_FUNCTION_ENTRY, EndOfPrologue, 4) 805 TEST_FIELD_OFFSET(IMAGE_FUNCTION_ENTRY, EndOfPrologue, 8) 806 } 807 808 static void test_pack_IMAGE_IMPORT_BY_NAME(void) 809 { 810 /* IMAGE_IMPORT_BY_NAME */ 811 TEST_TYPE_SIZE (IMAGE_IMPORT_BY_NAME, 4) 812 TEST_TYPE_ALIGN (IMAGE_IMPORT_BY_NAME, 2) 813 TEST_FIELD_SIZE (IMAGE_IMPORT_BY_NAME, Hint, 2) 814 TEST_FIELD_ALIGN (IMAGE_IMPORT_BY_NAME, Hint, 2) 815 TEST_FIELD_OFFSET(IMAGE_IMPORT_BY_NAME, Hint, 0) 816 TEST_FIELD_SIZE (IMAGE_IMPORT_BY_NAME, Name, 1) 817 TEST_FIELD_ALIGN (IMAGE_IMPORT_BY_NAME, Name, 1) 818 TEST_FIELD_OFFSET(IMAGE_IMPORT_BY_NAME, Name, 2) 819 } 820 821 static void test_pack_IMAGE_IMPORT_DESCRIPTOR(void) 822 { 823 /* IMAGE_IMPORT_DESCRIPTOR */ 824 } 825 826 static void test_pack_IMAGE_LINENUMBER(void) 827 { 828 /* IMAGE_LINENUMBER (pack 2) */ 829 } 830 831 static void test_pack_IMAGE_LOAD_CONFIG_DIRECTORY(void) 832 { 833 /* IMAGE_LOAD_CONFIG_DIRECTORY */ 834 TEST_TYPE_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, 112) 835 TEST_TYPE_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, 8) 836 } 837 838 static void test_pack_IMAGE_LOAD_CONFIG_DIRECTORY32(void) 839 { 840 /* IMAGE_LOAD_CONFIG_DIRECTORY32 */ 841 TEST_TYPE_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, 88) 842 TEST_TYPE_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, 8) 843 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, Size, 4) 844 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, Size, 4) 845 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, Size, 0) 846 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, TimeDateStamp, 4) 847 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, TimeDateStamp, 4) 848 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, TimeDateStamp, 4) 849 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, MajorVersion, 2) 850 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, MajorVersion, 2) 851 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, MajorVersion, 8) 852 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, MinorVersion, 2) 853 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, MinorVersion, 2) 854 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, MinorVersion, 10) 855 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, GlobalFlagsClear, 4) 856 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, GlobalFlagsClear, 4) 857 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, GlobalFlagsClear, 12) 858 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, GlobalFlagsSet, 4) 859 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, GlobalFlagsSet, 4) 860 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, GlobalFlagsSet, 16) 861 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, CriticalSectionDefaultTimeout, 4) 862 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, CriticalSectionDefaultTimeout, 4) 863 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, CriticalSectionDefaultTimeout, 20) 864 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, DeCommitFreeBlockThreshold, 4) 865 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, DeCommitFreeBlockThreshold, 4) 866 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, DeCommitFreeBlockThreshold, 24) 867 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, DeCommitTotalFreeThreshold, 4) 868 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, DeCommitTotalFreeThreshold, 4) 869 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, DeCommitTotalFreeThreshold, 28) 870 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, LockPrefixTable, 8) 871 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, LockPrefixTable, 8) 872 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, LockPrefixTable, 32) 873 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, MaximumAllocationSize, 4) 874 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, MaximumAllocationSize, 4) 875 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, MaximumAllocationSize, 40) 876 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, VirtualMemoryThreshold, 4) 877 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, VirtualMemoryThreshold, 4) 878 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, VirtualMemoryThreshold, 44) 879 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, ProcessHeapFlags, 4) 880 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, ProcessHeapFlags, 4) 881 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, ProcessHeapFlags, 48) 882 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, ProcessAffinityMask, 4) 883 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, ProcessAffinityMask, 4) 884 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, ProcessAffinityMask, 52) 885 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, CSDVersion, 2) 886 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, CSDVersion, 2) 887 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, CSDVersion, 56) 888 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, Reserved1, 2) 889 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, Reserved1, 2) 890 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, Reserved1, 58) 891 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, EditList, 8) 892 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, EditList, 8) 893 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, EditList, 64) 894 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, SecurityCookie, 4) 895 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, SecurityCookie, 4) 896 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, SecurityCookie, 72) 897 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, SEHandlerTable, 4) 898 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, SEHandlerTable, 4) 899 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, SEHandlerTable, 76) 900 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, SEHandlerCount, 4) 901 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, SEHandlerCount, 4) 902 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, SEHandlerCount, 80) 903 } 904 905 static void test_pack_IMAGE_LOAD_CONFIG_DIRECTORY64(void) 906 { 907 /* IMAGE_LOAD_CONFIG_DIRECTORY64 */ 908 TEST_TYPE_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, 112) 909 TEST_TYPE_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, 8) 910 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, Size, 4) 911 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, Size, 4) 912 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, Size, 0) 913 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, TimeDateStamp, 4) 914 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, TimeDateStamp, 4) 915 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, TimeDateStamp, 4) 916 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, MajorVersion, 2) 917 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, MajorVersion, 2) 918 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, MajorVersion, 8) 919 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, MinorVersion, 2) 920 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, MinorVersion, 2) 921 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, MinorVersion, 10) 922 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, GlobalFlagsClear, 4) 923 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, GlobalFlagsClear, 4) 924 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, GlobalFlagsClear, 12) 925 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, GlobalFlagsSet, 4) 926 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, GlobalFlagsSet, 4) 927 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, GlobalFlagsSet, 16) 928 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, CriticalSectionDefaultTimeout, 4) 929 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, CriticalSectionDefaultTimeout, 4) 930 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, CriticalSectionDefaultTimeout, 20) 931 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, DeCommitFreeBlockThreshold, 8) 932 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, DeCommitFreeBlockThreshold, 8) 933 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, DeCommitFreeBlockThreshold, 24) 934 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, DeCommitTotalFreeThreshold, 8) 935 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, DeCommitTotalFreeThreshold, 8) 936 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, DeCommitTotalFreeThreshold, 32) 937 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, LockPrefixTable, 8) 938 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, LockPrefixTable, 8) 939 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, LockPrefixTable, 40) 940 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, MaximumAllocationSize, 8) 941 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, MaximumAllocationSize, 8) 942 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, MaximumAllocationSize, 48) 943 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, VirtualMemoryThreshold, 8) 944 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, VirtualMemoryThreshold, 8) 945 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, VirtualMemoryThreshold, 56) 946 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, ProcessAffinityMask, 8) 947 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, ProcessAffinityMask, 8) 948 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, ProcessAffinityMask, 64) 949 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, ProcessHeapFlags, 4) 950 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, ProcessHeapFlags, 4) 951 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, ProcessHeapFlags, 72) 952 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, CSDVersion, 2) 953 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, CSDVersion, 2) 954 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, CSDVersion, 76) 955 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, Reserved1, 2) 956 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, Reserved1, 2) 957 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, Reserved1, 78) 958 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, EditList, 8) 959 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, EditList, 8) 960 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, EditList, 80) 961 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, SecurityCookie, 8) 962 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, SecurityCookie, 8) 963 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, SecurityCookie, 88) 964 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, SEHandlerTable, 8) 965 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, SEHandlerTable, 8) 966 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, SEHandlerTable, 96) 967 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, SEHandlerCount, 8) 968 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, SEHandlerCount, 8) 969 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, SEHandlerCount, 104) 970 } 971 972 static void test_pack_IMAGE_NT_HEADERS(void) 973 { 974 /* IMAGE_NT_HEADERS */ 975 TEST_TYPE_SIZE (IMAGE_NT_HEADERS, 264) 976 TEST_TYPE_ALIGN (IMAGE_NT_HEADERS, 8) 977 } 978 979 static void test_pack_IMAGE_NT_HEADERS32(void) 980 { 981 /* IMAGE_NT_HEADERS32 */ 982 TEST_TYPE_SIZE (IMAGE_NT_HEADERS32, 248) 983 TEST_TYPE_ALIGN (IMAGE_NT_HEADERS32, 4) 984 TEST_FIELD_SIZE (IMAGE_NT_HEADERS32, Signature, 4) 985 TEST_FIELD_ALIGN (IMAGE_NT_HEADERS32, Signature, 4) 986 TEST_FIELD_OFFSET(IMAGE_NT_HEADERS32, Signature, 0) 987 TEST_FIELD_SIZE (IMAGE_NT_HEADERS32, FileHeader, 20) 988 TEST_FIELD_ALIGN (IMAGE_NT_HEADERS32, FileHeader, 4) 989 TEST_FIELD_OFFSET(IMAGE_NT_HEADERS32, FileHeader, 4) 990 TEST_FIELD_SIZE (IMAGE_NT_HEADERS32, OptionalHeader, 224) 991 TEST_FIELD_ALIGN (IMAGE_NT_HEADERS32, OptionalHeader, 4) 992 TEST_FIELD_OFFSET(IMAGE_NT_HEADERS32, OptionalHeader, 24) 993 } 994 995 static void test_pack_IMAGE_NT_HEADERS64(void) 996 { 997 /* IMAGE_NT_HEADERS64 */ 998 TEST_TYPE_SIZE (IMAGE_NT_HEADERS64, 264) 999 TEST_TYPE_ALIGN (IMAGE_NT_HEADERS64, 8) 1000 TEST_FIELD_SIZE (IMAGE_NT_HEADERS64, Signature, 4) 1001 TEST_FIELD_ALIGN (IMAGE_NT_HEADERS64, Signature, 4) 1002 TEST_FIELD_OFFSET(IMAGE_NT_HEADERS64, Signature, 0) 1003 TEST_FIELD_SIZE (IMAGE_NT_HEADERS64, FileHeader, 20) 1004 TEST_FIELD_ALIGN (IMAGE_NT_HEADERS64, FileHeader, 4) 1005 TEST_FIELD_OFFSET(IMAGE_NT_HEADERS64, FileHeader, 4) 1006 TEST_FIELD_SIZE (IMAGE_NT_HEADERS64, OptionalHeader, 240) 1007 TEST_FIELD_ALIGN (IMAGE_NT_HEADERS64, OptionalHeader, 8) 1008 TEST_FIELD_OFFSET(IMAGE_NT_HEADERS64, OptionalHeader, 24) 1009 } 1010 1011 static void test_pack_IMAGE_OPTIONAL_HEADER(void) 1012 { 1013 /* IMAGE_OPTIONAL_HEADER */ 1014 TEST_TYPE_SIZE (IMAGE_OPTIONAL_HEADER, 240) 1015 TEST_TYPE_ALIGN (IMAGE_OPTIONAL_HEADER, 8) 1016 } 1017 1018 static void test_pack_IMAGE_OPTIONAL_HEADER32(void) 1019 { 1020 /* IMAGE_OPTIONAL_HEADER32 */ 1021 TEST_TYPE_SIZE (IMAGE_OPTIONAL_HEADER32, 224) 1022 TEST_TYPE_ALIGN (IMAGE_OPTIONAL_HEADER32, 4) 1023 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, Magic, 2) 1024 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, Magic, 2) 1025 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, Magic, 0) 1026 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MajorLinkerVersion, 1) 1027 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MajorLinkerVersion, 1) 1028 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MajorLinkerVersion, 2) 1029 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MinorLinkerVersion, 1) 1030 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MinorLinkerVersion, 1) 1031 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MinorLinkerVersion, 3) 1032 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfCode, 4) 1033 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfCode, 4) 1034 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfCode, 4) 1035 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfInitializedData, 4) 1036 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfInitializedData, 4) 1037 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfInitializedData, 8) 1038 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfUninitializedData, 4) 1039 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfUninitializedData, 4) 1040 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfUninitializedData, 12) 1041 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, AddressOfEntryPoint, 4) 1042 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, AddressOfEntryPoint, 4) 1043 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, AddressOfEntryPoint, 16) 1044 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, BaseOfCode, 4) 1045 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, BaseOfCode, 4) 1046 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, BaseOfCode, 20) 1047 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, BaseOfData, 4) 1048 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, BaseOfData, 4) 1049 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, BaseOfData, 24) 1050 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, ImageBase, 4) 1051 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, ImageBase, 4) 1052 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, ImageBase, 28) 1053 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SectionAlignment, 4) 1054 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SectionAlignment, 4) 1055 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SectionAlignment, 32) 1056 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, FileAlignment, 4) 1057 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, FileAlignment, 4) 1058 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, FileAlignment, 36) 1059 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MajorOperatingSystemVersion, 2) 1060 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MajorOperatingSystemVersion, 2) 1061 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MajorOperatingSystemVersion, 40) 1062 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MinorOperatingSystemVersion, 2) 1063 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MinorOperatingSystemVersion, 2) 1064 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MinorOperatingSystemVersion, 42) 1065 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MajorImageVersion, 2) 1066 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MajorImageVersion, 2) 1067 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MajorImageVersion, 44) 1068 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MinorImageVersion, 2) 1069 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MinorImageVersion, 2) 1070 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MinorImageVersion, 46) 1071 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MajorSubsystemVersion, 2) 1072 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MajorSubsystemVersion, 2) 1073 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MajorSubsystemVersion, 48) 1074 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MinorSubsystemVersion, 2) 1075 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MinorSubsystemVersion, 2) 1076 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MinorSubsystemVersion, 50) 1077 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, Win32VersionValue, 4) 1078 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, Win32VersionValue, 4) 1079 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, Win32VersionValue, 52) 1080 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfImage, 4) 1081 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfImage, 4) 1082 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfImage, 56) 1083 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfHeaders, 4) 1084 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfHeaders, 4) 1085 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfHeaders, 60) 1086 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, CheckSum, 4) 1087 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, CheckSum, 4) 1088 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, CheckSum, 64) 1089 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, Subsystem, 2) 1090 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, Subsystem, 2) 1091 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, Subsystem, 68) 1092 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, DllCharacteristics, 2) 1093 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, DllCharacteristics, 2) 1094 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, DllCharacteristics, 70) 1095 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfStackReserve, 4) 1096 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfStackReserve, 4) 1097 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfStackReserve, 72) 1098 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfStackCommit, 4) 1099 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfStackCommit, 4) 1100 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfStackCommit, 76) 1101 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfHeapReserve, 4) 1102 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfHeapReserve, 4) 1103 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfHeapReserve, 80) 1104 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfHeapCommit, 4) 1105 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfHeapCommit, 4) 1106 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfHeapCommit, 84) 1107 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, LoaderFlags, 4) 1108 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, LoaderFlags, 4) 1109 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, LoaderFlags, 88) 1110 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, NumberOfRvaAndSizes, 4) 1111 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, NumberOfRvaAndSizes, 4) 1112 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, NumberOfRvaAndSizes, 92) 1113 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, DataDirectory, 128) 1114 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, DataDirectory, 4) 1115 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, DataDirectory, 96) 1116 } 1117 1118 static void test_pack_IMAGE_OPTIONAL_HEADER64(void) 1119 { 1120 /* IMAGE_OPTIONAL_HEADER64 */ 1121 TEST_TYPE_SIZE (IMAGE_OPTIONAL_HEADER64, 240) 1122 TEST_TYPE_ALIGN (IMAGE_OPTIONAL_HEADER64, 8) 1123 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, Magic, 2) 1124 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, Magic, 2) 1125 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, Magic, 0) 1126 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MajorLinkerVersion, 1) 1127 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MajorLinkerVersion, 1) 1128 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MajorLinkerVersion, 2) 1129 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MinorLinkerVersion, 1) 1130 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MinorLinkerVersion, 1) 1131 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MinorLinkerVersion, 3) 1132 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfCode, 4) 1133 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfCode, 4) 1134 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfCode, 4) 1135 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfInitializedData, 4) 1136 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfInitializedData, 4) 1137 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfInitializedData, 8) 1138 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfUninitializedData, 4) 1139 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfUninitializedData, 4) 1140 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfUninitializedData, 12) 1141 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, AddressOfEntryPoint, 4) 1142 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, AddressOfEntryPoint, 4) 1143 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, AddressOfEntryPoint, 16) 1144 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, BaseOfCode, 4) 1145 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, BaseOfCode, 4) 1146 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, BaseOfCode, 20) 1147 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, ImageBase, 8) 1148 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, ImageBase, 8) 1149 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, ImageBase, 24) 1150 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SectionAlignment, 4) 1151 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SectionAlignment, 4) 1152 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SectionAlignment, 32) 1153 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, FileAlignment, 4) 1154 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, FileAlignment, 4) 1155 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, FileAlignment, 36) 1156 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MajorOperatingSystemVersion, 2) 1157 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MajorOperatingSystemVersion, 2) 1158 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MajorOperatingSystemVersion, 40) 1159 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MinorOperatingSystemVersion, 2) 1160 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MinorOperatingSystemVersion, 2) 1161 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MinorOperatingSystemVersion, 42) 1162 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MajorImageVersion, 2) 1163 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MajorImageVersion, 2) 1164 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MajorImageVersion, 44) 1165 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MinorImageVersion, 2) 1166 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MinorImageVersion, 2) 1167 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MinorImageVersion, 46) 1168 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MajorSubsystemVersion, 2) 1169 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MajorSubsystemVersion, 2) 1170 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MajorSubsystemVersion, 48) 1171 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MinorSubsystemVersion, 2) 1172 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MinorSubsystemVersion, 2) 1173 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MinorSubsystemVersion, 50) 1174 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, Win32VersionValue, 4) 1175 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, Win32VersionValue, 4) 1176 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, Win32VersionValue, 52) 1177 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfImage, 4) 1178 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfImage, 4) 1179 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfImage, 56) 1180 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfHeaders, 4) 1181 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfHeaders, 4) 1182 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfHeaders, 60) 1183 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, CheckSum, 4) 1184 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, CheckSum, 4) 1185 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, CheckSum, 64) 1186 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, Subsystem, 2) 1187 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, Subsystem, 2) 1188 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, Subsystem, 68) 1189 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, DllCharacteristics, 2) 1190 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, DllCharacteristics, 2) 1191 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, DllCharacteristics, 70) 1192 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfStackReserve, 8) 1193 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfStackReserve, 8) 1194 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfStackReserve, 72) 1195 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfStackCommit, 8) 1196 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfStackCommit, 8) 1197 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfStackCommit, 80) 1198 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfHeapReserve, 8) 1199 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfHeapReserve, 8) 1200 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfHeapReserve, 88) 1201 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfHeapCommit, 8) 1202 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfHeapCommit, 8) 1203 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfHeapCommit, 96) 1204 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, LoaderFlags, 4) 1205 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, LoaderFlags, 4) 1206 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, LoaderFlags, 104) 1207 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, NumberOfRvaAndSizes, 4) 1208 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, NumberOfRvaAndSizes, 4) 1209 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, NumberOfRvaAndSizes, 108) 1210 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, DataDirectory, 128) 1211 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, DataDirectory, 4) 1212 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, DataDirectory, 112) 1213 } 1214 1215 static void test_pack_IMAGE_OS2_HEADER(void) 1216 { 1217 /* IMAGE_OS2_HEADER (pack 2) */ 1218 TEST_TYPE_SIZE (IMAGE_OS2_HEADER, 64) 1219 TEST_TYPE_ALIGN (IMAGE_OS2_HEADER, 2) 1220 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_magic, 2) 1221 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_magic, 2) 1222 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_magic, 0) 1223 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_ver, 1) 1224 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_ver, 1) 1225 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_ver, 2) 1226 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_rev, 1) 1227 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_rev, 1) 1228 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_rev, 3) 1229 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_enttab, 2) 1230 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_enttab, 2) 1231 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_enttab, 4) 1232 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cbenttab, 2) 1233 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cbenttab, 2) 1234 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cbenttab, 6) 1235 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_crc, 4) 1236 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_crc, 2) 1237 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_crc, 8) 1238 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_flags, 2) 1239 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_flags, 2) 1240 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_flags, 12) 1241 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_autodata, 2) 1242 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_autodata, 2) 1243 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_autodata, 14) 1244 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_heap, 2) 1245 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_heap, 2) 1246 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_heap, 16) 1247 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_stack, 2) 1248 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_stack, 2) 1249 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_stack, 18) 1250 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_csip, 4) 1251 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_csip, 2) 1252 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_csip, 20) 1253 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_sssp, 4) 1254 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_sssp, 2) 1255 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_sssp, 24) 1256 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cseg, 2) 1257 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cseg, 2) 1258 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cseg, 28) 1259 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cmod, 2) 1260 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cmod, 2) 1261 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cmod, 30) 1262 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cbnrestab, 2) 1263 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cbnrestab, 2) 1264 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cbnrestab, 32) 1265 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_segtab, 2) 1266 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_segtab, 2) 1267 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_segtab, 34) 1268 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_rsrctab, 2) 1269 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_rsrctab, 2) 1270 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_rsrctab, 36) 1271 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_restab, 2) 1272 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_restab, 2) 1273 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_restab, 38) 1274 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_modtab, 2) 1275 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_modtab, 2) 1276 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_modtab, 40) 1277 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_imptab, 2) 1278 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_imptab, 2) 1279 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_imptab, 42) 1280 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_nrestab, 4) 1281 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_nrestab, 2) 1282 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_nrestab, 44) 1283 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cmovent, 2) 1284 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cmovent, 2) 1285 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cmovent, 48) 1286 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_align, 2) 1287 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_align, 2) 1288 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_align, 50) 1289 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cres, 2) 1290 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cres, 2) 1291 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cres, 52) 1292 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_exetyp, 1) 1293 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_exetyp, 1) 1294 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_exetyp, 54) 1295 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_flagsothers, 1) 1296 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_flagsothers, 1) 1297 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_flagsothers, 55) 1298 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_pretthunks, 2) 1299 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_pretthunks, 2) 1300 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_pretthunks, 56) 1301 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_psegrefbytes, 2) 1302 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_psegrefbytes, 2) 1303 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_psegrefbytes, 58) 1304 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_swaparea, 2) 1305 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_swaparea, 2) 1306 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_swaparea, 60) 1307 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_expver, 2) 1308 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_expver, 2) 1309 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_expver, 62) 1310 } 1311 1312 static void test_pack_IMAGE_RELOCATION(void) 1313 { 1314 /* IMAGE_RELOCATION (pack 2) */ 1315 } 1316 1317 static void test_pack_IMAGE_RESOURCE_DATA_ENTRY(void) 1318 { 1319 /* IMAGE_RESOURCE_DATA_ENTRY */ 1320 TEST_TYPE_SIZE (IMAGE_RESOURCE_DATA_ENTRY, 16) 1321 TEST_TYPE_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, 4) 1322 TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, OffsetToData, 4) 1323 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, OffsetToData, 4) 1324 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, OffsetToData, 0) 1325 TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, Size, 4) 1326 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, Size, 4) 1327 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, Size, 4) 1328 TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, CodePage, 4) 1329 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, CodePage, 4) 1330 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, CodePage, 8) 1331 TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, Reserved, 4) 1332 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, Reserved, 4) 1333 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, Reserved, 12) 1334 } 1335 1336 static void test_pack_IMAGE_RESOURCE_DIRECTORY(void) 1337 { 1338 /* IMAGE_RESOURCE_DIRECTORY */ 1339 TEST_TYPE_SIZE (IMAGE_RESOURCE_DIRECTORY, 16) 1340 TEST_TYPE_ALIGN (IMAGE_RESOURCE_DIRECTORY, 4) 1341 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, Characteristics, 4) 1342 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, Characteristics, 4) 1343 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, Characteristics, 0) 1344 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, TimeDateStamp, 4) 1345 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, TimeDateStamp, 4) 1346 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, TimeDateStamp, 4) 1347 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, MajorVersion, 2) 1348 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, MajorVersion, 2) 1349 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, MajorVersion, 8) 1350 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, MinorVersion, 2) 1351 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, MinorVersion, 2) 1352 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, MinorVersion, 10) 1353 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, NumberOfNamedEntries, 2) 1354 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, NumberOfNamedEntries, 2) 1355 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, NumberOfNamedEntries, 12) 1356 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, NumberOfIdEntries, 2) 1357 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, NumberOfIdEntries, 2) 1358 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, NumberOfIdEntries, 14) 1359 } 1360 1361 static void test_pack_IMAGE_RESOURCE_DIRECTORY_ENTRY(void) 1362 { 1363 /* IMAGE_RESOURCE_DIRECTORY_ENTRY */ 1364 } 1365 1366 static void test_pack_IMAGE_RESOURCE_DIRECTORY_STRING(void) 1367 { 1368 /* IMAGE_RESOURCE_DIRECTORY_STRING */ 1369 TEST_TYPE_SIZE (IMAGE_RESOURCE_DIRECTORY_STRING, 4) 1370 TEST_TYPE_ALIGN (IMAGE_RESOURCE_DIRECTORY_STRING, 2) 1371 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY_STRING, Length, 2) 1372 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY_STRING, Length, 2) 1373 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY_STRING, Length, 0) 1374 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY_STRING, NameString, 1) 1375 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY_STRING, NameString, 1) 1376 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY_STRING, NameString, 2) 1377 } 1378 1379 static void test_pack_IMAGE_RESOURCE_DIR_STRING_U(void) 1380 { 1381 /* IMAGE_RESOURCE_DIR_STRING_U */ 1382 TEST_TYPE_SIZE (IMAGE_RESOURCE_DIR_STRING_U, 4) 1383 TEST_TYPE_ALIGN (IMAGE_RESOURCE_DIR_STRING_U, 2) 1384 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIR_STRING_U, Length, 2) 1385 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIR_STRING_U, Length, 2) 1386 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIR_STRING_U, Length, 0) 1387 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIR_STRING_U, NameString, 2) 1388 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIR_STRING_U, NameString, 2) 1389 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIR_STRING_U, NameString, 2) 1390 } 1391 1392 static void test_pack_IMAGE_SECTION_HEADER(void) 1393 { 1394 /* IMAGE_SECTION_HEADER */ 1395 TEST_FIELD_SIZE (IMAGE_SECTION_HEADER, Name, 8) 1396 TEST_FIELD_ALIGN (IMAGE_SECTION_HEADER, Name, 1) 1397 TEST_FIELD_OFFSET(IMAGE_SECTION_HEADER, Name, 0) 1398 } 1399 1400 static void test_pack_IMAGE_SEPARATE_DEBUG_HEADER(void) 1401 { 1402 /* IMAGE_SEPARATE_DEBUG_HEADER */ 1403 TEST_TYPE_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, 48) 1404 TEST_TYPE_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, 4) 1405 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Signature, 2) 1406 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Signature, 2) 1407 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Signature, 0) 1408 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Flags, 2) 1409 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Flags, 2) 1410 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Flags, 2) 1411 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Machine, 2) 1412 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Machine, 2) 1413 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Machine, 4) 1414 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Characteristics, 2) 1415 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Characteristics, 2) 1416 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Characteristics, 6) 1417 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, TimeDateStamp, 4) 1418 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, TimeDateStamp, 4) 1419 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, TimeDateStamp, 8) 1420 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, CheckSum, 4) 1421 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, CheckSum, 4) 1422 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, CheckSum, 12) 1423 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, ImageBase, 4) 1424 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, ImageBase, 4) 1425 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, ImageBase, 16) 1426 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, SizeOfImage, 4) 1427 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, SizeOfImage, 4) 1428 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, SizeOfImage, 20) 1429 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, NumberOfSections, 4) 1430 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, NumberOfSections, 4) 1431 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, NumberOfSections, 24) 1432 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, ExportedNamesSize, 4) 1433 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, ExportedNamesSize, 4) 1434 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, ExportedNamesSize, 28) 1435 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, DebugDirectorySize, 4) 1436 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, DebugDirectorySize, 4) 1437 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, DebugDirectorySize, 32) 1438 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, SectionAlignment, 4) 1439 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, SectionAlignment, 4) 1440 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, SectionAlignment, 36) 1441 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Reserved, 8) 1442 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Reserved, 4) 1443 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Reserved, 40) 1444 } 1445 1446 static void test_pack_IMAGE_SYMBOL(void) 1447 { 1448 /* IMAGE_SYMBOL (pack 2) */ 1449 } 1450 1451 static void test_pack_IMAGE_THUNK_DATA(void) 1452 { 1453 /* IMAGE_THUNK_DATA */ 1454 } 1455 1456 static void test_pack_IMAGE_TLS_DIRECTORY(void) 1457 { 1458 /* IMAGE_TLS_DIRECTORY */ 1459 TEST_TYPE_SIZE (IMAGE_TLS_DIRECTORY, 40) 1460 TEST_TYPE_ALIGN (IMAGE_TLS_DIRECTORY, 8) 1461 } 1462 1463 static void test_pack_IMAGE_TLS_DIRECTORY32(void) 1464 { 1465 /* IMAGE_TLS_DIRECTORY32 */ 1466 TEST_TYPE_SIZE (IMAGE_TLS_DIRECTORY32, 24) 1467 TEST_TYPE_ALIGN (IMAGE_TLS_DIRECTORY32, 4) 1468 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, StartAddressOfRawData, 4) 1469 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, StartAddressOfRawData, 4) 1470 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, StartAddressOfRawData, 0) 1471 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, EndAddressOfRawData, 4) 1472 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, EndAddressOfRawData, 4) 1473 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, EndAddressOfRawData, 4) 1474 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, AddressOfIndex, 4) 1475 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, AddressOfIndex, 4) 1476 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, AddressOfIndex, 8) 1477 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, AddressOfCallBacks, 4) 1478 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, AddressOfCallBacks, 4) 1479 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, AddressOfCallBacks, 12) 1480 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, SizeOfZeroFill, 4) 1481 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, SizeOfZeroFill, 4) 1482 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, SizeOfZeroFill, 16) 1483 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, Characteristics, 4) 1484 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, Characteristics, 4) 1485 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, Characteristics, 20) 1486 } 1487 1488 static void test_pack_IMAGE_TLS_DIRECTORY64(void) 1489 { 1490 /* IMAGE_TLS_DIRECTORY64 */ 1491 TEST_TYPE_SIZE (IMAGE_TLS_DIRECTORY64, 40) 1492 TEST_TYPE_ALIGN (IMAGE_TLS_DIRECTORY64, 8) 1493 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, StartAddressOfRawData, 8) 1494 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, StartAddressOfRawData, 8) 1495 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, StartAddressOfRawData, 0) 1496 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, EndAddressOfRawData, 8) 1497 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, EndAddressOfRawData, 8) 1498 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, EndAddressOfRawData, 8) 1499 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, AddressOfIndex, 8) 1500 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, AddressOfIndex, 8) 1501 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, AddressOfIndex, 16) 1502 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, AddressOfCallBacks, 8) 1503 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, AddressOfCallBacks, 8) 1504 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, AddressOfCallBacks, 24) 1505 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, SizeOfZeroFill, 4) 1506 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, SizeOfZeroFill, 4) 1507 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, SizeOfZeroFill, 32) 1508 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, Characteristics, 4) 1509 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, Characteristics, 4) 1510 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, Characteristics, 36) 1511 } 1512 1513 static void test_pack_IMAGE_VXD_HEADER(void) 1514 { 1515 /* IMAGE_VXD_HEADER (pack 2) */ 1516 TEST_TYPE_SIZE (IMAGE_VXD_HEADER, 196) 1517 TEST_TYPE_ALIGN (IMAGE_VXD_HEADER, 2) 1518 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_magic, 2) 1519 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_magic, 2) 1520 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_magic, 0) 1521 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_border, 1) 1522 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_border, 1) 1523 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_border, 2) 1524 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_worder, 1) 1525 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_worder, 1) 1526 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_worder, 3) 1527 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_level, 4) 1528 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_level, 2) 1529 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_level, 4) 1530 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_cpu, 2) 1531 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_cpu, 2) 1532 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_cpu, 8) 1533 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_os, 2) 1534 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_os, 2) 1535 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_os, 10) 1536 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ver, 4) 1537 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ver, 2) 1538 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ver, 12) 1539 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_mflags, 4) 1540 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_mflags, 2) 1541 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_mflags, 16) 1542 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_mpages, 4) 1543 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_mpages, 2) 1544 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_mpages, 20) 1545 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_startobj, 4) 1546 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_startobj, 2) 1547 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_startobj, 24) 1548 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_eip, 4) 1549 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_eip, 2) 1550 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_eip, 28) 1551 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_stackobj, 4) 1552 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_stackobj, 2) 1553 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_stackobj, 32) 1554 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_esp, 4) 1555 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_esp, 2) 1556 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_esp, 36) 1557 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_pagesize, 4) 1558 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_pagesize, 2) 1559 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_pagesize, 40) 1560 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_lastpagesize, 4) 1561 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_lastpagesize, 2) 1562 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_lastpagesize, 44) 1563 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_fixupsize, 4) 1564 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_fixupsize, 2) 1565 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_fixupsize, 48) 1566 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_fixupsum, 4) 1567 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_fixupsum, 2) 1568 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_fixupsum, 52) 1569 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ldrsize, 4) 1570 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ldrsize, 2) 1571 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ldrsize, 56) 1572 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ldrsum, 4) 1573 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ldrsum, 2) 1574 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ldrsum, 60) 1575 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_objtab, 4) 1576 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_objtab, 2) 1577 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_objtab, 64) 1578 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_objcnt, 4) 1579 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_objcnt, 2) 1580 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_objcnt, 68) 1581 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_objmap, 4) 1582 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_objmap, 2) 1583 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_objmap, 72) 1584 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_itermap, 4) 1585 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_itermap, 2) 1586 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_itermap, 76) 1587 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_rsrctab, 4) 1588 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_rsrctab, 2) 1589 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_rsrctab, 80) 1590 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_rsrccnt, 4) 1591 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_rsrccnt, 2) 1592 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_rsrccnt, 84) 1593 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_restab, 4) 1594 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_restab, 2) 1595 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_restab, 88) 1596 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_enttab, 4) 1597 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_enttab, 2) 1598 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_enttab, 92) 1599 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_dirtab, 4) 1600 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_dirtab, 2) 1601 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_dirtab, 96) 1602 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_dircnt, 4) 1603 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_dircnt, 2) 1604 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_dircnt, 100) 1605 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_fpagetab, 4) 1606 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_fpagetab, 2) 1607 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_fpagetab, 104) 1608 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_frectab, 4) 1609 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_frectab, 2) 1610 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_frectab, 108) 1611 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_impmod, 4) 1612 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_impmod, 2) 1613 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_impmod, 112) 1614 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_impmodcnt, 4) 1615 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_impmodcnt, 2) 1616 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_impmodcnt, 116) 1617 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_impproc, 4) 1618 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_impproc, 2) 1619 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_impproc, 120) 1620 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_pagesum, 4) 1621 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_pagesum, 2) 1622 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_pagesum, 124) 1623 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_datapage, 4) 1624 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_datapage, 2) 1625 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_datapage, 128) 1626 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_preload, 4) 1627 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_preload, 2) 1628 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_preload, 132) 1629 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_nrestab, 4) 1630 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_nrestab, 2) 1631 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_nrestab, 136) 1632 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_cbnrestab, 4) 1633 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_cbnrestab, 2) 1634 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_cbnrestab, 140) 1635 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_nressum, 4) 1636 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_nressum, 2) 1637 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_nressum, 144) 1638 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_autodata, 4) 1639 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_autodata, 2) 1640 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_autodata, 148) 1641 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_debuginfo, 4) 1642 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_debuginfo, 2) 1643 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_debuginfo, 152) 1644 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_debuglen, 4) 1645 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_debuglen, 2) 1646 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_debuglen, 156) 1647 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_instpreload, 4) 1648 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_instpreload, 2) 1649 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_instpreload, 160) 1650 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_instdemand, 4) 1651 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_instdemand, 2) 1652 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_instdemand, 164) 1653 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_heapsize, 4) 1654 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_heapsize, 2) 1655 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_heapsize, 168) 1656 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_res3, 12) 1657 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_res3, 1) 1658 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_res3, 172) 1659 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_winresoff, 4) 1660 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_winresoff, 2) 1661 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_winresoff, 184) 1662 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_winreslen, 4) 1663 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_winreslen, 2) 1664 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_winreslen, 188) 1665 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_devid, 2) 1666 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_devid, 2) 1667 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_devid, 192) 1668 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ddkver, 2) 1669 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ddkver, 2) 1670 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ddkver, 194) 1671 } 1672 1673 static void test_pack_IO_COUNTERS(void) 1674 { 1675 /* IO_COUNTERS (pack 8) */ 1676 TEST_TYPE_SIZE (IO_COUNTERS, 48) 1677 TEST_TYPE_ALIGN (IO_COUNTERS, 8) 1678 TEST_FIELD_SIZE (IO_COUNTERS, ReadOperationCount, 8) 1679 TEST_FIELD_ALIGN (IO_COUNTERS, ReadOperationCount, 8) 1680 TEST_FIELD_OFFSET(IO_COUNTERS, ReadOperationCount, 0) 1681 TEST_FIELD_SIZE (IO_COUNTERS, WriteOperationCount, 8) 1682 TEST_FIELD_ALIGN (IO_COUNTERS, WriteOperationCount, 8) 1683 TEST_FIELD_OFFSET(IO_COUNTERS, WriteOperationCount, 8) 1684 TEST_FIELD_SIZE (IO_COUNTERS, OtherOperationCount, 8) 1685 TEST_FIELD_ALIGN (IO_COUNTERS, OtherOperationCount, 8) 1686 TEST_FIELD_OFFSET(IO_COUNTERS, OtherOperationCount, 16) 1687 TEST_FIELD_SIZE (IO_COUNTERS, ReadTransferCount, 8) 1688 TEST_FIELD_ALIGN (IO_COUNTERS, ReadTransferCount, 8) 1689 TEST_FIELD_OFFSET(IO_COUNTERS, ReadTransferCount, 24) 1690 TEST_FIELD_SIZE (IO_COUNTERS, WriteTransferCount, 8) 1691 TEST_FIELD_ALIGN (IO_COUNTERS, WriteTransferCount, 8) 1692 TEST_FIELD_OFFSET(IO_COUNTERS, WriteTransferCount, 32) 1693 TEST_FIELD_SIZE (IO_COUNTERS, OtherTransferCount, 8) 1694 TEST_FIELD_ALIGN (IO_COUNTERS, OtherTransferCount, 8) 1695 TEST_FIELD_OFFSET(IO_COUNTERS, OtherTransferCount, 40) 1696 } 1697 1698 static void test_pack_LANGID(void) 1699 { 1700 /* LANGID */ 1701 TEST_TYPE_SIZE (LANGID, 2) 1702 TEST_TYPE_ALIGN (LANGID, 2) 1703 TEST_TYPE_UNSIGNED(LANGID) 1704 } 1705 1706 static void test_pack_LARGE_INTEGER(void) 1707 { 1708 /* LARGE_INTEGER */ 1709 } 1710 1711 static void test_pack_LCID(void) 1712 { 1713 /* LCID */ 1714 TEST_TYPE_SIZE (LCID, 4) 1715 TEST_TYPE_ALIGN (LCID, 4) 1716 TEST_TYPE_UNSIGNED(LCID) 1717 } 1718 1719 static void test_pack_LIST_ENTRY(void) 1720 { 1721 /* LIST_ENTRY */ 1722 TEST_TYPE_SIZE (LIST_ENTRY, 16) 1723 TEST_TYPE_ALIGN (LIST_ENTRY, 8) 1724 TEST_FIELD_SIZE (LIST_ENTRY, Flink, 8) 1725 TEST_FIELD_ALIGN (LIST_ENTRY, Flink, 8) 1726 TEST_FIELD_OFFSET(LIST_ENTRY, Flink, 0) 1727 TEST_FIELD_SIZE (LIST_ENTRY, Blink, 8) 1728 TEST_FIELD_ALIGN (LIST_ENTRY, Blink, 8) 1729 TEST_FIELD_OFFSET(LIST_ENTRY, Blink, 8) 1730 } 1731 1732 static void test_pack_LONG(void) 1733 { 1734 /* LONG */ 1735 TEST_TYPE_SIZE (LONG, 4) 1736 TEST_TYPE_ALIGN (LONG, 4) 1737 TEST_TYPE_SIGNED(LONG) 1738 } 1739 1740 static void test_pack_LONGLONG(void) 1741 { 1742 /* LONGLONG */ 1743 TEST_TYPE_SIZE (LONGLONG, 8) 1744 TEST_TYPE_ALIGN (LONGLONG, 8) 1745 TEST_TYPE_SIGNED(LONGLONG) 1746 } 1747 1748 static void test_pack_LUID(void) 1749 { 1750 /* LUID */ 1751 TEST_TYPE_SIZE (LUID, 8) 1752 TEST_TYPE_ALIGN (LUID, 4) 1753 TEST_FIELD_SIZE (LUID, LowPart, 4) 1754 TEST_FIELD_ALIGN (LUID, LowPart, 4) 1755 TEST_FIELD_OFFSET(LUID, LowPart, 0) 1756 TEST_FIELD_SIZE (LUID, HighPart, 4) 1757 TEST_FIELD_ALIGN (LUID, HighPart, 4) 1758 TEST_FIELD_OFFSET(LUID, HighPart, 4) 1759 } 1760 1761 static void test_pack_LUID_AND_ATTRIBUTES(void) 1762 { 1763 /* LUID_AND_ATTRIBUTES (pack 4) */ 1764 TEST_TYPE_SIZE (LUID_AND_ATTRIBUTES, 12) 1765 TEST_TYPE_ALIGN (LUID_AND_ATTRIBUTES, 4) 1766 TEST_FIELD_SIZE (LUID_AND_ATTRIBUTES, Luid, 8) 1767 TEST_FIELD_ALIGN (LUID_AND_ATTRIBUTES, Luid, 4) 1768 TEST_FIELD_OFFSET(LUID_AND_ATTRIBUTES, Luid, 0) 1769 TEST_FIELD_SIZE (LUID_AND_ATTRIBUTES, Attributes, 4) 1770 TEST_FIELD_ALIGN (LUID_AND_ATTRIBUTES, Attributes, 4) 1771 TEST_FIELD_OFFSET(LUID_AND_ATTRIBUTES, Attributes, 8) 1772 } 1773 1774 static void test_pack_MEMORY_BASIC_INFORMATION(void) 1775 { 1776 /* MEMORY_BASIC_INFORMATION */ 1777 TEST_TYPE_SIZE (MEMORY_BASIC_INFORMATION, 48) 1778 TEST_TYPE_ALIGN (MEMORY_BASIC_INFORMATION, 8) 1779 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, BaseAddress, 8) 1780 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, BaseAddress, 8) 1781 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, BaseAddress, 0) 1782 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, AllocationBase, 8) 1783 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, AllocationBase, 8) 1784 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, AllocationBase, 8) 1785 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, AllocationProtect, 4) 1786 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, AllocationProtect, 4) 1787 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, AllocationProtect, 16) 1788 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, RegionSize, 8) 1789 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, RegionSize, 8) 1790 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, RegionSize, 24) 1791 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, State, 4) 1792 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, State, 4) 1793 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, State, 32) 1794 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, Protect, 4) 1795 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, Protect, 4) 1796 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, Protect, 36) 1797 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, Type, 4) 1798 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, Type, 4) 1799 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, Type, 40) 1800 } 1801 1802 static void test_pack_MESSAGE_RESOURCE_BLOCK(void) 1803 { 1804 /* MESSAGE_RESOURCE_BLOCK */ 1805 TEST_TYPE_SIZE (MESSAGE_RESOURCE_BLOCK, 12) 1806 TEST_TYPE_ALIGN (MESSAGE_RESOURCE_BLOCK, 4) 1807 TEST_FIELD_SIZE (MESSAGE_RESOURCE_BLOCK, LowId, 4) 1808 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_BLOCK, LowId, 4) 1809 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_BLOCK, LowId, 0) 1810 TEST_FIELD_SIZE (MESSAGE_RESOURCE_BLOCK, HighId, 4) 1811 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_BLOCK, HighId, 4) 1812 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_BLOCK, HighId, 4) 1813 TEST_FIELD_SIZE (MESSAGE_RESOURCE_BLOCK, OffsetToEntries, 4) 1814 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_BLOCK, OffsetToEntries, 4) 1815 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_BLOCK, OffsetToEntries, 8) 1816 } 1817 1818 static void test_pack_MESSAGE_RESOURCE_DATA(void) 1819 { 1820 /* MESSAGE_RESOURCE_DATA */ 1821 TEST_TYPE_SIZE (MESSAGE_RESOURCE_DATA, 16) 1822 TEST_TYPE_ALIGN (MESSAGE_RESOURCE_DATA, 4) 1823 TEST_FIELD_SIZE (MESSAGE_RESOURCE_DATA, NumberOfBlocks, 4) 1824 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_DATA, NumberOfBlocks, 4) 1825 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_DATA, NumberOfBlocks, 0) 1826 TEST_FIELD_SIZE (MESSAGE_RESOURCE_DATA, Blocks, 12) 1827 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_DATA, Blocks, 4) 1828 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_DATA, Blocks, 4) 1829 } 1830 1831 static void test_pack_MESSAGE_RESOURCE_ENTRY(void) 1832 { 1833 /* MESSAGE_RESOURCE_ENTRY */ 1834 TEST_TYPE_SIZE (MESSAGE_RESOURCE_ENTRY, 6) 1835 TEST_TYPE_ALIGN (MESSAGE_RESOURCE_ENTRY, 2) 1836 TEST_FIELD_SIZE (MESSAGE_RESOURCE_ENTRY, Length, 2) 1837 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_ENTRY, Length, 2) 1838 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_ENTRY, Length, 0) 1839 TEST_FIELD_SIZE (MESSAGE_RESOURCE_ENTRY, Flags, 2) 1840 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_ENTRY, Flags, 2) 1841 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_ENTRY, Flags, 2) 1842 TEST_FIELD_SIZE (MESSAGE_RESOURCE_ENTRY, Text, 1) 1843 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_ENTRY, Text, 1) 1844 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_ENTRY, Text, 4) 1845 } 1846 1847 static void test_pack_NT_TIB(void) 1848 { 1849 /* NT_TIB */ 1850 TEST_FIELD_SIZE (NT_TIB, ExceptionList, 8) 1851 TEST_FIELD_ALIGN (NT_TIB, ExceptionList, 8) 1852 TEST_FIELD_OFFSET(NT_TIB, ExceptionList, 0) 1853 TEST_FIELD_SIZE (NT_TIB, StackBase, 8) 1854 TEST_FIELD_ALIGN (NT_TIB, StackBase, 8) 1855 TEST_FIELD_OFFSET(NT_TIB, StackBase, 8) 1856 TEST_FIELD_SIZE (NT_TIB, StackLimit, 8) 1857 TEST_FIELD_ALIGN (NT_TIB, StackLimit, 8) 1858 TEST_FIELD_OFFSET(NT_TIB, StackLimit, 16) 1859 TEST_FIELD_SIZE (NT_TIB, SubSystemTib, 8) 1860 TEST_FIELD_ALIGN (NT_TIB, SubSystemTib, 8) 1861 TEST_FIELD_OFFSET(NT_TIB, SubSystemTib, 24) 1862 } 1863 1864 static void test_pack_OBJECT_TYPE_LIST(void) 1865 { 1866 /* OBJECT_TYPE_LIST */ 1867 TEST_TYPE_SIZE (OBJECT_TYPE_LIST, 16) 1868 TEST_TYPE_ALIGN (OBJECT_TYPE_LIST, 8) 1869 TEST_FIELD_SIZE (OBJECT_TYPE_LIST, Level, 2) 1870 TEST_FIELD_ALIGN (OBJECT_TYPE_LIST, Level, 2) 1871 TEST_FIELD_OFFSET(OBJECT_TYPE_LIST, Level, 0) 1872 TEST_FIELD_SIZE (OBJECT_TYPE_LIST, Sbz, 2) 1873 TEST_FIELD_ALIGN (OBJECT_TYPE_LIST, Sbz, 2) 1874 TEST_FIELD_OFFSET(OBJECT_TYPE_LIST, Sbz, 2) 1875 TEST_FIELD_SIZE (OBJECT_TYPE_LIST, ObjectType, 8) 1876 TEST_FIELD_ALIGN (OBJECT_TYPE_LIST, ObjectType, 8) 1877 TEST_FIELD_OFFSET(OBJECT_TYPE_LIST, ObjectType, 8) 1878 } 1879 1880 static void test_pack_PACCESS_ALLOWED_ACE(void) 1881 { 1882 /* PACCESS_ALLOWED_ACE */ 1883 TEST_TYPE_SIZE (PACCESS_ALLOWED_ACE, 8) 1884 TEST_TYPE_ALIGN (PACCESS_ALLOWED_ACE, 8) 1885 TEST_TARGET_SIZE (PACCESS_ALLOWED_ACE, 12) 1886 TEST_TARGET_ALIGN(PACCESS_ALLOWED_ACE, 4) 1887 } 1888 1889 static void test_pack_PACCESS_DENIED_ACE(void) 1890 { 1891 /* PACCESS_DENIED_ACE */ 1892 TEST_TYPE_SIZE (PACCESS_DENIED_ACE, 8) 1893 TEST_TYPE_ALIGN (PACCESS_DENIED_ACE, 8) 1894 TEST_TARGET_SIZE (PACCESS_DENIED_ACE, 12) 1895 TEST_TARGET_ALIGN(PACCESS_DENIED_ACE, 4) 1896 } 1897 1898 static void test_pack_PACCESS_TOKEN(void) 1899 { 1900 /* PACCESS_TOKEN */ 1901 TEST_TYPE_SIZE (PACCESS_TOKEN, 8) 1902 TEST_TYPE_ALIGN (PACCESS_TOKEN, 8) 1903 } 1904 1905 static void test_pack_PACE_HEADER(void) 1906 { 1907 /* PACE_HEADER */ 1908 TEST_TYPE_SIZE (PACE_HEADER, 8) 1909 TEST_TYPE_ALIGN (PACE_HEADER, 8) 1910 TEST_TARGET_SIZE (PACE_HEADER, 4) 1911 TEST_TARGET_ALIGN(PACE_HEADER, 2) 1912 } 1913 1914 static void test_pack_PACL(void) 1915 { 1916 /* PACL */ 1917 TEST_TYPE_SIZE (PACL, 8) 1918 TEST_TYPE_ALIGN (PACL, 8) 1919 TEST_TARGET_SIZE (PACL, 8) 1920 TEST_TARGET_ALIGN(PACL, 2) 1921 } 1922 1923 static void test_pack_PACL_REVISION_INFORMATION(void) 1924 { 1925 /* PACL_REVISION_INFORMATION */ 1926 TEST_TYPE_SIZE (PACL_REVISION_INFORMATION, 8) 1927 TEST_TYPE_ALIGN (PACL_REVISION_INFORMATION, 8) 1928 TEST_TARGET_SIZE (PACL_REVISION_INFORMATION, 4) 1929 TEST_TARGET_ALIGN(PACL_REVISION_INFORMATION, 4) 1930 } 1931 1932 static void test_pack_PACL_SIZE_INFORMATION(void) 1933 { 1934 /* PACL_SIZE_INFORMATION */ 1935 TEST_TYPE_SIZE (PACL_SIZE_INFORMATION, 8) 1936 TEST_TYPE_ALIGN (PACL_SIZE_INFORMATION, 8) 1937 TEST_TARGET_SIZE (PACL_SIZE_INFORMATION, 12) 1938 TEST_TARGET_ALIGN(PACL_SIZE_INFORMATION, 4) 1939 } 1940 1941 static void test_pack_PCCH(void) 1942 { 1943 /* PCCH */ 1944 TEST_TYPE_SIZE (PCCH, 8) 1945 TEST_TYPE_ALIGN (PCCH, 8) 1946 TEST_TARGET_SIZE (PCCH, 1) 1947 TEST_TARGET_ALIGN(PCCH, 1) 1948 } 1949 1950 static void test_pack_PCH(void) 1951 { 1952 /* PCH */ 1953 TEST_TYPE_SIZE (PCH, 8) 1954 TEST_TYPE_ALIGN (PCH, 8) 1955 TEST_TARGET_SIZE (PCH, 1) 1956 TEST_TARGET_ALIGN(PCH, 1) 1957 } 1958 1959 static void test_pack_PCSTR(void) 1960 { 1961 /* PCSTR */ 1962 TEST_TYPE_SIZE (PCSTR, 8) 1963 TEST_TYPE_ALIGN (PCSTR, 8) 1964 TEST_TARGET_SIZE (PCSTR, 1) 1965 TEST_TARGET_ALIGN(PCSTR, 1) 1966 } 1967 1968 static void test_pack_PCWCH(void) 1969 { 1970 /* PCWCH */ 1971 TEST_TYPE_SIZE (PCWCH, 8) 1972 TEST_TYPE_ALIGN (PCWCH, 8) 1973 TEST_TARGET_SIZE (PCWCH, 2) 1974 TEST_TARGET_ALIGN(PCWCH, 2) 1975 } 1976 1977 static void test_pack_PCWSTR(void) 1978 { 1979 /* PCWSTR */ 1980 TEST_TYPE_SIZE (PCWSTR, 8) 1981 TEST_TYPE_ALIGN (PCWSTR, 8) 1982 TEST_TARGET_SIZE (PCWSTR, 2) 1983 TEST_TARGET_ALIGN(PCWSTR, 2) 1984 } 1985 1986 static void test_pack_PEXCEPTION_POINTERS(void) 1987 { 1988 /* PEXCEPTION_POINTERS */ 1989 TEST_TYPE_SIZE (PEXCEPTION_POINTERS, 8) 1990 TEST_TYPE_ALIGN (PEXCEPTION_POINTERS, 8) 1991 TEST_TARGET_SIZE (PEXCEPTION_POINTERS, 16) 1992 TEST_TARGET_ALIGN(PEXCEPTION_POINTERS, 8) 1993 } 1994 1995 static void test_pack_PEXCEPTION_RECORD(void) 1996 { 1997 /* PEXCEPTION_RECORD */ 1998 TEST_TYPE_SIZE (PEXCEPTION_RECORD, 8) 1999 TEST_TYPE_ALIGN (PEXCEPTION_RECORD, 8) 2000 TEST_TARGET_SIZE (PEXCEPTION_RECORD, 152) 2001 TEST_TARGET_ALIGN(PEXCEPTION_RECORD, 8) 2002 } 2003 2004 static void test_pack_PFPO_DATA(void) 2005 { 2006 /* PFPO_DATA */ 2007 TEST_TYPE_SIZE (PFPO_DATA, 8) 2008 TEST_TYPE_ALIGN (PFPO_DATA, 8) 2009 TEST_TARGET_SIZE (PFPO_DATA, 16) 2010 TEST_TARGET_ALIGN(PFPO_DATA, 4) 2011 } 2012 2013 static void test_pack_PGENERIC_MAPPING(void) 2014 { 2015 /* PGENERIC_MAPPING */ 2016 TEST_TYPE_SIZE (PGENERIC_MAPPING, 8) 2017 TEST_TYPE_ALIGN (PGENERIC_MAPPING, 8) 2018 TEST_TARGET_SIZE (PGENERIC_MAPPING, 16) 2019 TEST_TARGET_ALIGN(PGENERIC_MAPPING, 4) 2020 } 2021 2022 static void test_pack_PHANDLE(void) 2023 { 2024 /* PHANDLE */ 2025 TEST_TYPE_SIZE (PHANDLE, 8) 2026 TEST_TYPE_ALIGN (PHANDLE, 8) 2027 TEST_TARGET_SIZE (PHANDLE, 8) 2028 TEST_TARGET_ALIGN(PHANDLE, 8) 2029 } 2030 2031 static void test_pack_PIMAGE_ARCHIVE_MEMBER_HEADER(void) 2032 { 2033 /* PIMAGE_ARCHIVE_MEMBER_HEADER */ 2034 TEST_TYPE_SIZE (PIMAGE_ARCHIVE_MEMBER_HEADER, 8) 2035 TEST_TYPE_ALIGN (PIMAGE_ARCHIVE_MEMBER_HEADER, 8) 2036 TEST_TARGET_SIZE (PIMAGE_ARCHIVE_MEMBER_HEADER, 60) 2037 TEST_TARGET_ALIGN(PIMAGE_ARCHIVE_MEMBER_HEADER, 1) 2038 } 2039 2040 static void test_pack_PIMAGE_AUX_SYMBOL(void) 2041 { 2042 /* PIMAGE_AUX_SYMBOL */ 2043 TEST_TYPE_SIZE (PIMAGE_AUX_SYMBOL, 8) 2044 TEST_TYPE_ALIGN (PIMAGE_AUX_SYMBOL, 8) 2045 } 2046 2047 static void test_pack_PIMAGE_BASE_RELOCATION(void) 2048 { 2049 /* PIMAGE_BASE_RELOCATION */ 2050 TEST_TYPE_SIZE (PIMAGE_BASE_RELOCATION, 8) 2051 TEST_TYPE_ALIGN (PIMAGE_BASE_RELOCATION, 8) 2052 TEST_TARGET_SIZE (PIMAGE_BASE_RELOCATION, 8) 2053 TEST_TARGET_ALIGN(PIMAGE_BASE_RELOCATION, 4) 2054 } 2055 2056 static void test_pack_PIMAGE_BOUND_FORWARDER_REF(void) 2057 { 2058 /* PIMAGE_BOUND_FORWARDER_REF */ 2059 TEST_TYPE_SIZE (PIMAGE_BOUND_FORWARDER_REF, 8) 2060 TEST_TYPE_ALIGN (PIMAGE_BOUND_FORWARDER_REF, 8) 2061 TEST_TARGET_SIZE (PIMAGE_BOUND_FORWARDER_REF, 8) 2062 TEST_TARGET_ALIGN(PIMAGE_BOUND_FORWARDER_REF, 4) 2063 } 2064 2065 static void test_pack_PIMAGE_BOUND_IMPORT_DESCRIPTOR(void) 2066 { 2067 /* PIMAGE_BOUND_IMPORT_DESCRIPTOR */ 2068 TEST_TYPE_SIZE (PIMAGE_BOUND_IMPORT_DESCRIPTOR, 8) 2069 TEST_TYPE_ALIGN (PIMAGE_BOUND_IMPORT_DESCRIPTOR, 8) 2070 TEST_TARGET_SIZE (PIMAGE_BOUND_IMPORT_DESCRIPTOR, 8) 2071 TEST_TARGET_ALIGN(PIMAGE_BOUND_IMPORT_DESCRIPTOR, 4) 2072 } 2073 2074 static void test_pack_PIMAGE_COFF_SYMBOLS_HEADER(void) 2075 { 2076 /* PIMAGE_COFF_SYMBOLS_HEADER */ 2077 TEST_TYPE_SIZE (PIMAGE_COFF_SYMBOLS_HEADER, 8) 2078 TEST_TYPE_ALIGN (PIMAGE_COFF_SYMBOLS_HEADER, 8) 2079 TEST_TARGET_SIZE (PIMAGE_COFF_SYMBOLS_HEADER, 32) 2080 TEST_TARGET_ALIGN(PIMAGE_COFF_SYMBOLS_HEADER, 4) 2081 } 2082 2083 static void test_pack_PIMAGE_DATA_DIRECTORY(void) 2084 { 2085 /* PIMAGE_DATA_DIRECTORY */ 2086 TEST_TYPE_SIZE (PIMAGE_DATA_DIRECTORY, 8) 2087 TEST_TYPE_ALIGN (PIMAGE_DATA_DIRECTORY, 8) 2088 TEST_TARGET_SIZE (PIMAGE_DATA_DIRECTORY, 8) 2089 TEST_TARGET_ALIGN(PIMAGE_DATA_DIRECTORY, 4) 2090 } 2091 2092 static void test_pack_PIMAGE_DEBUG_DIRECTORY(void) 2093 { 2094 /* PIMAGE_DEBUG_DIRECTORY */ 2095 TEST_TYPE_SIZE (PIMAGE_DEBUG_DIRECTORY, 8) 2096 TEST_TYPE_ALIGN (PIMAGE_DEBUG_DIRECTORY, 8) 2097 TEST_TARGET_SIZE (PIMAGE_DEBUG_DIRECTORY, 28) 2098 TEST_TARGET_ALIGN(PIMAGE_DEBUG_DIRECTORY, 4) 2099 } 2100 2101 static void test_pack_PIMAGE_DEBUG_MISC(void) 2102 { 2103 /* PIMAGE_DEBUG_MISC */ 2104 TEST_TYPE_SIZE (PIMAGE_DEBUG_MISC, 8) 2105 TEST_TYPE_ALIGN (PIMAGE_DEBUG_MISC, 8) 2106 TEST_TARGET_SIZE (PIMAGE_DEBUG_MISC, 16) 2107 TEST_TARGET_ALIGN(PIMAGE_DEBUG_MISC, 4) 2108 } 2109 2110 static void test_pack_PIMAGE_DOS_HEADER(void) 2111 { 2112 /* PIMAGE_DOS_HEADER */ 2113 TEST_TYPE_SIZE (PIMAGE_DOS_HEADER, 8) 2114 TEST_TYPE_ALIGN (PIMAGE_DOS_HEADER, 8) 2115 TEST_TARGET_SIZE (PIMAGE_DOS_HEADER, 64) 2116 TEST_TARGET_ALIGN(PIMAGE_DOS_HEADER, 2) 2117 } 2118 2119 static void test_pack_PIMAGE_EXPORT_DIRECTORY(void) 2120 { 2121 /* PIMAGE_EXPORT_DIRECTORY */ 2122 TEST_TYPE_SIZE (PIMAGE_EXPORT_DIRECTORY, 8) 2123 TEST_TYPE_ALIGN (PIMAGE_EXPORT_DIRECTORY, 8) 2124 TEST_TARGET_SIZE (PIMAGE_EXPORT_DIRECTORY, 40) 2125 TEST_TARGET_ALIGN(PIMAGE_EXPORT_DIRECTORY, 4) 2126 } 2127 2128 static void test_pack_PIMAGE_FILE_HEADER(void) 2129 { 2130 /* PIMAGE_FILE_HEADER */ 2131 TEST_TYPE_SIZE (PIMAGE_FILE_HEADER, 8) 2132 TEST_TYPE_ALIGN (PIMAGE_FILE_HEADER, 8) 2133 TEST_TARGET_SIZE (PIMAGE_FILE_HEADER, 20) 2134 TEST_TARGET_ALIGN(PIMAGE_FILE_HEADER, 4) 2135 } 2136 2137 static void test_pack_PIMAGE_FUNCTION_ENTRY(void) 2138 { 2139 /* PIMAGE_FUNCTION_ENTRY */ 2140 TEST_TYPE_SIZE (PIMAGE_FUNCTION_ENTRY, 8) 2141 TEST_TYPE_ALIGN (PIMAGE_FUNCTION_ENTRY, 8) 2142 TEST_TARGET_SIZE (PIMAGE_FUNCTION_ENTRY, 12) 2143 TEST_TARGET_ALIGN(PIMAGE_FUNCTION_ENTRY, 4) 2144 } 2145 2146 static void test_pack_PIMAGE_IMPORT_BY_NAME(void) 2147 { 2148 /* PIMAGE_IMPORT_BY_NAME */ 2149 TEST_TYPE_SIZE (PIMAGE_IMPORT_BY_NAME, 8) 2150 TEST_TYPE_ALIGN (PIMAGE_IMPORT_BY_NAME, 8) 2151 TEST_TARGET_SIZE (PIMAGE_IMPORT_BY_NAME, 4) 2152 TEST_TARGET_ALIGN(PIMAGE_IMPORT_BY_NAME, 2) 2153 } 2154 2155 static void test_pack_PIMAGE_IMPORT_DESCRIPTOR(void) 2156 { 2157 /* PIMAGE_IMPORT_DESCRIPTOR */ 2158 TEST_TYPE_SIZE (PIMAGE_IMPORT_DESCRIPTOR, 8) 2159 TEST_TYPE_ALIGN (PIMAGE_IMPORT_DESCRIPTOR, 8) 2160 } 2161 2162 static void test_pack_PIMAGE_LINENUMBER(void) 2163 { 2164 /* PIMAGE_LINENUMBER */ 2165 TEST_TYPE_SIZE (PIMAGE_LINENUMBER, 8) 2166 TEST_TYPE_ALIGN (PIMAGE_LINENUMBER, 8) 2167 } 2168 2169 static void test_pack_PIMAGE_LOAD_CONFIG_DIRECTORY(void) 2170 { 2171 /* PIMAGE_LOAD_CONFIG_DIRECTORY */ 2172 TEST_TYPE_SIZE (PIMAGE_LOAD_CONFIG_DIRECTORY, 8) 2173 TEST_TYPE_ALIGN (PIMAGE_LOAD_CONFIG_DIRECTORY, 8) 2174 } 2175 2176 static void test_pack_PIMAGE_NT_HEADERS(void) 2177 { 2178 /* PIMAGE_NT_HEADERS */ 2179 TEST_TYPE_SIZE (PIMAGE_NT_HEADERS, 8) 2180 TEST_TYPE_ALIGN (PIMAGE_NT_HEADERS, 8) 2181 } 2182 2183 static void test_pack_PIMAGE_NT_HEADERS32(void) 2184 { 2185 /* PIMAGE_NT_HEADERS32 */ 2186 TEST_TYPE_SIZE (PIMAGE_NT_HEADERS32, 8) 2187 TEST_TYPE_ALIGN (PIMAGE_NT_HEADERS32, 8) 2188 TEST_TARGET_SIZE (PIMAGE_NT_HEADERS32, 248) 2189 TEST_TARGET_ALIGN(PIMAGE_NT_HEADERS32, 4) 2190 } 2191 2192 static void test_pack_PIMAGE_NT_HEADERS64(void) 2193 { 2194 /* PIMAGE_NT_HEADERS64 */ 2195 TEST_TYPE_SIZE (PIMAGE_NT_HEADERS64, 8) 2196 TEST_TYPE_ALIGN (PIMAGE_NT_HEADERS64, 8) 2197 TEST_TARGET_SIZE (PIMAGE_NT_HEADERS64, 264) 2198 TEST_TARGET_ALIGN(PIMAGE_NT_HEADERS64, 8) 2199 } 2200 2201 static void test_pack_PIMAGE_OPTIONAL_HEADER(void) 2202 { 2203 /* PIMAGE_OPTIONAL_HEADER */ 2204 TEST_TYPE_SIZE (PIMAGE_OPTIONAL_HEADER, 8) 2205 TEST_TYPE_ALIGN (PIMAGE_OPTIONAL_HEADER, 8) 2206 } 2207 2208 static void test_pack_PIMAGE_OPTIONAL_HEADER32(void) 2209 { 2210 /* PIMAGE_OPTIONAL_HEADER32 */ 2211 TEST_TYPE_SIZE (PIMAGE_OPTIONAL_HEADER32, 8) 2212 TEST_TYPE_ALIGN (PIMAGE_OPTIONAL_HEADER32, 8) 2213 TEST_TARGET_SIZE (PIMAGE_OPTIONAL_HEADER32, 224) 2214 TEST_TARGET_ALIGN(PIMAGE_OPTIONAL_HEADER32, 4) 2215 } 2216 2217 static void test_pack_PIMAGE_OPTIONAL_HEADER64(void) 2218 { 2219 /* PIMAGE_OPTIONAL_HEADER64 */ 2220 TEST_TYPE_SIZE (PIMAGE_OPTIONAL_HEADER64, 8) 2221 TEST_TYPE_ALIGN (PIMAGE_OPTIONAL_HEADER64, 8) 2222 TEST_TARGET_SIZE (PIMAGE_OPTIONAL_HEADER64, 240) 2223 TEST_TARGET_ALIGN(PIMAGE_OPTIONAL_HEADER64, 8) 2224 } 2225 2226 static void test_pack_PIMAGE_OS2_HEADER(void) 2227 { 2228 /* PIMAGE_OS2_HEADER */ 2229 TEST_TYPE_SIZE (PIMAGE_OS2_HEADER, 8) 2230 TEST_TYPE_ALIGN (PIMAGE_OS2_HEADER, 8) 2231 TEST_TARGET_SIZE (PIMAGE_OS2_HEADER, 64) 2232 TEST_TARGET_ALIGN(PIMAGE_OS2_HEADER, 2) 2233 } 2234 2235 static void test_pack_PIMAGE_RELOCATION(void) 2236 { 2237 /* PIMAGE_RELOCATION */ 2238 TEST_TYPE_SIZE (PIMAGE_RELOCATION, 8) 2239 TEST_TYPE_ALIGN (PIMAGE_RELOCATION, 8) 2240 } 2241 2242 static void test_pack_PIMAGE_RESOURCE_DATA_ENTRY(void) 2243 { 2244 /* PIMAGE_RESOURCE_DATA_ENTRY */ 2245 TEST_TYPE_SIZE (PIMAGE_RESOURCE_DATA_ENTRY, 8) 2246 TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DATA_ENTRY, 8) 2247 TEST_TARGET_SIZE (PIMAGE_RESOURCE_DATA_ENTRY, 16) 2248 TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DATA_ENTRY, 4) 2249 } 2250 2251 static void test_pack_PIMAGE_RESOURCE_DIRECTORY(void) 2252 { 2253 /* PIMAGE_RESOURCE_DIRECTORY */ 2254 TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIRECTORY, 8) 2255 TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIRECTORY, 8) 2256 TEST_TARGET_SIZE (PIMAGE_RESOURCE_DIRECTORY, 16) 2257 TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DIRECTORY, 4) 2258 } 2259 2260 static void test_pack_PIMAGE_RESOURCE_DIRECTORY_ENTRY(void) 2261 { 2262 /* PIMAGE_RESOURCE_DIRECTORY_ENTRY */ 2263 TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIRECTORY_ENTRY, 8) 2264 TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIRECTORY_ENTRY, 8) 2265 } 2266 2267 static void test_pack_PIMAGE_RESOURCE_DIRECTORY_STRING(void) 2268 { 2269 /* PIMAGE_RESOURCE_DIRECTORY_STRING */ 2270 TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIRECTORY_STRING, 8) 2271 TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIRECTORY_STRING, 8) 2272 TEST_TARGET_SIZE (PIMAGE_RESOURCE_DIRECTORY_STRING, 4) 2273 TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DIRECTORY_STRING, 2) 2274 } 2275 2276 static void test_pack_PIMAGE_RESOURCE_DIR_STRING_U(void) 2277 { 2278 /* PIMAGE_RESOURCE_DIR_STRING_U */ 2279 TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIR_STRING_U, 8) 2280 TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIR_STRING_U, 8) 2281 TEST_TARGET_SIZE (PIMAGE_RESOURCE_DIR_STRING_U, 4) 2282 TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DIR_STRING_U, 2) 2283 } 2284 2285 static void test_pack_PIMAGE_SECTION_HEADER(void) 2286 { 2287 /* PIMAGE_SECTION_HEADER */ 2288 TEST_TYPE_SIZE (PIMAGE_SECTION_HEADER, 8) 2289 TEST_TYPE_ALIGN (PIMAGE_SECTION_HEADER, 8) 2290 } 2291 2292 static void test_pack_PIMAGE_SEPARATE_DEBUG_HEADER(void) 2293 { 2294 /* PIMAGE_SEPARATE_DEBUG_HEADER */ 2295 TEST_TYPE_SIZE (PIMAGE_SEPARATE_DEBUG_HEADER, 8) 2296 TEST_TYPE_ALIGN (PIMAGE_SEPARATE_DEBUG_HEADER, 8) 2297 TEST_TARGET_SIZE (PIMAGE_SEPARATE_DEBUG_HEADER, 48) 2298 TEST_TARGET_ALIGN(PIMAGE_SEPARATE_DEBUG_HEADER, 4) 2299 } 2300 2301 static void test_pack_PIMAGE_SYMBOL(void) 2302 { 2303 /* PIMAGE_SYMBOL */ 2304 TEST_TYPE_SIZE (PIMAGE_SYMBOL, 8) 2305 TEST_TYPE_ALIGN (PIMAGE_SYMBOL, 8) 2306 } 2307 2308 static void test_pack_PIMAGE_THUNK_DATA(void) 2309 { 2310 /* PIMAGE_THUNK_DATA */ 2311 TEST_TYPE_SIZE (PIMAGE_THUNK_DATA, 8) 2312 TEST_TYPE_ALIGN (PIMAGE_THUNK_DATA, 8) 2313 } 2314 2315 static void test_pack_PIMAGE_TLS_CALLBACK(void) 2316 { 2317 /* PIMAGE_TLS_CALLBACK */ 2318 TEST_TYPE_SIZE (PIMAGE_TLS_CALLBACK, 8) 2319 TEST_TYPE_ALIGN (PIMAGE_TLS_CALLBACK, 8) 2320 } 2321 2322 static void test_pack_PIMAGE_TLS_DIRECTORY(void) 2323 { 2324 /* PIMAGE_TLS_DIRECTORY */ 2325 TEST_TYPE_SIZE (PIMAGE_TLS_DIRECTORY, 8) 2326 TEST_TYPE_ALIGN (PIMAGE_TLS_DIRECTORY, 8) 2327 } 2328 2329 static void test_pack_PIMAGE_VXD_HEADER(void) 2330 { 2331 /* PIMAGE_VXD_HEADER */ 2332 TEST_TYPE_SIZE (PIMAGE_VXD_HEADER, 8) 2333 TEST_TYPE_ALIGN (PIMAGE_VXD_HEADER, 8) 2334 TEST_TARGET_SIZE (PIMAGE_VXD_HEADER, 196) 2335 TEST_TARGET_ALIGN(PIMAGE_VXD_HEADER, 2) 2336 } 2337 2338 static void test_pack_PIO_COUNTERS(void) 2339 { 2340 /* PIO_COUNTERS */ 2341 TEST_TYPE_SIZE (PIO_COUNTERS, 8) 2342 TEST_TYPE_ALIGN (PIO_COUNTERS, 8) 2343 TEST_TARGET_SIZE (PIO_COUNTERS, 48) 2344 TEST_TARGET_ALIGN(PIO_COUNTERS, 8) 2345 } 2346 2347 static void test_pack_PISECURITY_DESCRIPTOR(void) 2348 { 2349 /* PISECURITY_DESCRIPTOR */ 2350 TEST_TYPE_SIZE (PISECURITY_DESCRIPTOR, 8) 2351 TEST_TYPE_ALIGN (PISECURITY_DESCRIPTOR, 8) 2352 TEST_TARGET_SIZE (PISECURITY_DESCRIPTOR, 40) 2353 TEST_TARGET_ALIGN(PISECURITY_DESCRIPTOR, 8) 2354 } 2355 2356 static void test_pack_PISECURITY_DESCRIPTOR_RELATIVE(void) 2357 { 2358 /* PISECURITY_DESCRIPTOR_RELATIVE */ 2359 TEST_TYPE_SIZE (PISECURITY_DESCRIPTOR_RELATIVE, 8) 2360 TEST_TYPE_ALIGN (PISECURITY_DESCRIPTOR_RELATIVE, 8) 2361 TEST_TARGET_SIZE (PISECURITY_DESCRIPTOR_RELATIVE, 20) 2362 TEST_TARGET_ALIGN(PISECURITY_DESCRIPTOR_RELATIVE, 4) 2363 } 2364 2365 static void test_pack_PISID(void) 2366 { 2367 /* PISID */ 2368 TEST_TYPE_SIZE (PISID, 8) 2369 TEST_TYPE_ALIGN (PISID, 8) 2370 TEST_TARGET_SIZE (PISID, 12) 2371 TEST_TARGET_ALIGN(PISID, 4) 2372 } 2373 2374 static void test_pack_PLARGE_INTEGER(void) 2375 { 2376 /* PLARGE_INTEGER */ 2377 TEST_TYPE_SIZE (PLARGE_INTEGER, 8) 2378 TEST_TYPE_ALIGN (PLARGE_INTEGER, 8) 2379 } 2380 2381 static void test_pack_PLIST_ENTRY(void) 2382 { 2383 /* PLIST_ENTRY */ 2384 TEST_TYPE_SIZE (PLIST_ENTRY, 8) 2385 TEST_TYPE_ALIGN (PLIST_ENTRY, 8) 2386 TEST_TARGET_SIZE (PLIST_ENTRY, 16) 2387 TEST_TARGET_ALIGN(PLIST_ENTRY, 8) 2388 } 2389 2390 static void test_pack_PLUID(void) 2391 { 2392 /* PLUID */ 2393 TEST_TYPE_SIZE (PLUID, 8) 2394 TEST_TYPE_ALIGN (PLUID, 8) 2395 TEST_TARGET_SIZE (PLUID, 8) 2396 TEST_TARGET_ALIGN(PLUID, 4) 2397 } 2398 2399 static void test_pack_PLUID_AND_ATTRIBUTES(void) 2400 { 2401 /* PLUID_AND_ATTRIBUTES */ 2402 TEST_TYPE_SIZE (PLUID_AND_ATTRIBUTES, 8) 2403 TEST_TYPE_ALIGN (PLUID_AND_ATTRIBUTES, 8) 2404 TEST_TARGET_SIZE (PLUID_AND_ATTRIBUTES, 12) 2405 TEST_TARGET_ALIGN(PLUID_AND_ATTRIBUTES, 4) 2406 } 2407 2408 static void test_pack_PMEMORY_BASIC_INFORMATION(void) 2409 { 2410 /* PMEMORY_BASIC_INFORMATION */ 2411 TEST_TYPE_SIZE (PMEMORY_BASIC_INFORMATION, 8) 2412 TEST_TYPE_ALIGN (PMEMORY_BASIC_INFORMATION, 8) 2413 TEST_TARGET_SIZE (PMEMORY_BASIC_INFORMATION, 48) 2414 TEST_TARGET_ALIGN(PMEMORY_BASIC_INFORMATION, 8) 2415 } 2416 2417 static void test_pack_PMESSAGE_RESOURCE_BLOCK(void) 2418 { 2419 /* PMESSAGE_RESOURCE_BLOCK */ 2420 TEST_TYPE_SIZE (PMESSAGE_RESOURCE_BLOCK, 8) 2421 TEST_TYPE_ALIGN (PMESSAGE_RESOURCE_BLOCK, 8) 2422 TEST_TARGET_SIZE (PMESSAGE_RESOURCE_BLOCK, 12) 2423 TEST_TARGET_ALIGN(PMESSAGE_RESOURCE_BLOCK, 4) 2424 } 2425 2426 static void test_pack_PMESSAGE_RESOURCE_DATA(void) 2427 { 2428 /* PMESSAGE_RESOURCE_DATA */ 2429 TEST_TYPE_SIZE (PMESSAGE_RESOURCE_DATA, 8) 2430 TEST_TYPE_ALIGN (PMESSAGE_RESOURCE_DATA, 8) 2431 TEST_TARGET_SIZE (PMESSAGE_RESOURCE_DATA, 16) 2432 TEST_TARGET_ALIGN(PMESSAGE_RESOURCE_DATA, 4) 2433 } 2434 2435 static void test_pack_PMESSAGE_RESOURCE_ENTRY(void) 2436 { 2437 /* PMESSAGE_RESOURCE_ENTRY */ 2438 TEST_TYPE_SIZE (PMESSAGE_RESOURCE_ENTRY, 8) 2439 TEST_TYPE_ALIGN (PMESSAGE_RESOURCE_ENTRY, 8) 2440 TEST_TARGET_SIZE (PMESSAGE_RESOURCE_ENTRY, 6) 2441 TEST_TARGET_ALIGN(PMESSAGE_RESOURCE_ENTRY, 2) 2442 } 2443 2444 static void test_pack_PNT_TIB(void) 2445 { 2446 /* PNT_TIB */ 2447 TEST_TYPE_SIZE (PNT_TIB, 8) 2448 TEST_TYPE_ALIGN (PNT_TIB, 8) 2449 } 2450 2451 static void test_pack_POBJECT_TYPE_LIST(void) 2452 { 2453 /* POBJECT_TYPE_LIST */ 2454 TEST_TYPE_SIZE (POBJECT_TYPE_LIST, 8) 2455 TEST_TYPE_ALIGN (POBJECT_TYPE_LIST, 8) 2456 TEST_TARGET_SIZE (POBJECT_TYPE_LIST, 16) 2457 TEST_TARGET_ALIGN(POBJECT_TYPE_LIST, 8) 2458 } 2459 2460 static void test_pack_PPRIVILEGE_SET(void) 2461 { 2462 /* PPRIVILEGE_SET */ 2463 TEST_TYPE_SIZE (PPRIVILEGE_SET, 8) 2464 TEST_TYPE_ALIGN (PPRIVILEGE_SET, 8) 2465 TEST_TARGET_SIZE (PPRIVILEGE_SET, 20) 2466 TEST_TARGET_ALIGN(PPRIVILEGE_SET, 4) 2467 } 2468 2469 static void test_pack_PRIVILEGE_SET(void) 2470 { 2471 /* PRIVILEGE_SET */ 2472 TEST_TYPE_SIZE (PRIVILEGE_SET, 20) 2473 TEST_TYPE_ALIGN (PRIVILEGE_SET, 4) 2474 TEST_FIELD_SIZE (PRIVILEGE_SET, PrivilegeCount, 4) 2475 TEST_FIELD_ALIGN (PRIVILEGE_SET, PrivilegeCount, 4) 2476 TEST_FIELD_OFFSET(PRIVILEGE_SET, PrivilegeCount, 0) 2477 TEST_FIELD_SIZE (PRIVILEGE_SET, Control, 4) 2478 TEST_FIELD_ALIGN (PRIVILEGE_SET, Control, 4) 2479 TEST_FIELD_OFFSET(PRIVILEGE_SET, Control, 4) 2480 TEST_FIELD_SIZE (PRIVILEGE_SET, Privilege, 12) 2481 TEST_FIELD_ALIGN (PRIVILEGE_SET, Privilege, 4) 2482 TEST_FIELD_OFFSET(PRIVILEGE_SET, Privilege, 8) 2483 } 2484 2485 static void test_pack_PRLIST_ENTRY(void) 2486 { 2487 /* PRLIST_ENTRY */ 2488 TEST_TYPE_SIZE (PRLIST_ENTRY, 8) 2489 TEST_TYPE_ALIGN (PRLIST_ENTRY, 8) 2490 TEST_TARGET_SIZE (PRLIST_ENTRY, 16) 2491 TEST_TARGET_ALIGN(PRLIST_ENTRY, 8) 2492 } 2493 2494 static void test_pack_PRTL_CRITICAL_SECTION(void) 2495 { 2496 /* PRTL_CRITICAL_SECTION */ 2497 TEST_TYPE_SIZE (PRTL_CRITICAL_SECTION, 8) 2498 TEST_TYPE_ALIGN (PRTL_CRITICAL_SECTION, 8) 2499 TEST_TARGET_SIZE (PRTL_CRITICAL_SECTION, 40) 2500 TEST_TARGET_ALIGN(PRTL_CRITICAL_SECTION, 8) 2501 } 2502 2503 static void test_pack_PRTL_CRITICAL_SECTION_DEBUG(void) 2504 { 2505 /* PRTL_CRITICAL_SECTION_DEBUG */ 2506 TEST_TYPE_SIZE (PRTL_CRITICAL_SECTION_DEBUG, 8) 2507 TEST_TYPE_ALIGN (PRTL_CRITICAL_SECTION_DEBUG, 8) 2508 } 2509 2510 static void test_pack_PRTL_OSVERSIONINFOEXW(void) 2511 { 2512 /* PRTL_OSVERSIONINFOEXW */ 2513 TEST_TYPE_SIZE (PRTL_OSVERSIONINFOEXW, 8) 2514 TEST_TYPE_ALIGN (PRTL_OSVERSIONINFOEXW, 8) 2515 TEST_TARGET_SIZE (PRTL_OSVERSIONINFOEXW, 284) 2516 TEST_TARGET_ALIGN(PRTL_OSVERSIONINFOEXW, 4) 2517 } 2518 2519 static void test_pack_PRTL_OSVERSIONINFOW(void) 2520 { 2521 /* PRTL_OSVERSIONINFOW */ 2522 TEST_TYPE_SIZE (PRTL_OSVERSIONINFOW, 8) 2523 TEST_TYPE_ALIGN (PRTL_OSVERSIONINFOW, 8) 2524 TEST_TARGET_SIZE (PRTL_OSVERSIONINFOW, 276) 2525 TEST_TARGET_ALIGN(PRTL_OSVERSIONINFOW, 4) 2526 } 2527 2528 static void test_pack_PRTL_RESOURCE_DEBUG(void) 2529 { 2530 /* PRTL_RESOURCE_DEBUG */ 2531 TEST_TYPE_SIZE (PRTL_RESOURCE_DEBUG, 8) 2532 TEST_TYPE_ALIGN (PRTL_RESOURCE_DEBUG, 8) 2533 } 2534 2535 static void test_pack_PSECURITY_DESCRIPTOR(void) 2536 { 2537 /* PSECURITY_DESCRIPTOR */ 2538 TEST_TYPE_SIZE (PSECURITY_DESCRIPTOR, 8) 2539 TEST_TYPE_ALIGN (PSECURITY_DESCRIPTOR, 8) 2540 } 2541 2542 static void test_pack_PSECURITY_QUALITY_OF_SERVICE(void) 2543 { 2544 /* PSECURITY_QUALITY_OF_SERVICE */ 2545 TEST_TYPE_SIZE (PSECURITY_QUALITY_OF_SERVICE, 8) 2546 TEST_TYPE_ALIGN (PSECURITY_QUALITY_OF_SERVICE, 8) 2547 } 2548 2549 static void test_pack_PSID(void) 2550 { 2551 /* PSID */ 2552 TEST_TYPE_SIZE (PSID, 8) 2553 TEST_TYPE_ALIGN (PSID, 8) 2554 } 2555 2556 static void test_pack_PSID_IDENTIFIER_AUTHORITY(void) 2557 { 2558 /* PSID_IDENTIFIER_AUTHORITY */ 2559 TEST_TYPE_SIZE (PSID_IDENTIFIER_AUTHORITY, 8) 2560 TEST_TYPE_ALIGN (PSID_IDENTIFIER_AUTHORITY, 8) 2561 TEST_TARGET_SIZE (PSID_IDENTIFIER_AUTHORITY, 6) 2562 TEST_TARGET_ALIGN(PSID_IDENTIFIER_AUTHORITY, 1) 2563 } 2564 2565 static void test_pack_PSINGLE_LIST_ENTRY(void) 2566 { 2567 /* PSINGLE_LIST_ENTRY */ 2568 TEST_TYPE_SIZE (PSINGLE_LIST_ENTRY, 8) 2569 TEST_TYPE_ALIGN (PSINGLE_LIST_ENTRY, 8) 2570 TEST_TARGET_SIZE (PSINGLE_LIST_ENTRY, 8) 2571 TEST_TARGET_ALIGN(PSINGLE_LIST_ENTRY, 8) 2572 } 2573 2574 static void test_pack_PSTR(void) 2575 { 2576 /* PSTR */ 2577 TEST_TYPE_SIZE (PSTR, 8) 2578 TEST_TYPE_ALIGN (PSTR, 8) 2579 TEST_TARGET_SIZE (PSTR, 1) 2580 TEST_TARGET_ALIGN(PSTR, 1) 2581 } 2582 2583 static void test_pack_PSYSTEM_ALARM_ACE(void) 2584 { 2585 /* PSYSTEM_ALARM_ACE */ 2586 TEST_TYPE_SIZE (PSYSTEM_ALARM_ACE, 8) 2587 TEST_TYPE_ALIGN (PSYSTEM_ALARM_ACE, 8) 2588 TEST_TARGET_SIZE (PSYSTEM_ALARM_ACE, 12) 2589 TEST_TARGET_ALIGN(PSYSTEM_ALARM_ACE, 4) 2590 } 2591 2592 static void test_pack_PSYSTEM_AUDIT_ACE(void) 2593 { 2594 /* PSYSTEM_AUDIT_ACE */ 2595 TEST_TYPE_SIZE (PSYSTEM_AUDIT_ACE, 8) 2596 TEST_TYPE_ALIGN (PSYSTEM_AUDIT_ACE, 8) 2597 TEST_TARGET_SIZE (PSYSTEM_AUDIT_ACE, 12) 2598 TEST_TARGET_ALIGN(PSYSTEM_AUDIT_ACE, 4) 2599 } 2600 2601 static void test_pack_PTOKEN_GROUPS(void) 2602 { 2603 /* PTOKEN_GROUPS */ 2604 TEST_TYPE_SIZE (PTOKEN_GROUPS, 8) 2605 TEST_TYPE_ALIGN (PTOKEN_GROUPS, 8) 2606 TEST_TARGET_SIZE (PTOKEN_GROUPS, 24) 2607 TEST_TARGET_ALIGN(PTOKEN_GROUPS, 8) 2608 } 2609 2610 static void test_pack_PTOKEN_PRIVILEGES(void) 2611 { 2612 /* PTOKEN_PRIVILEGES */ 2613 TEST_TYPE_SIZE (PTOKEN_PRIVILEGES, 8) 2614 TEST_TYPE_ALIGN (PTOKEN_PRIVILEGES, 8) 2615 TEST_TARGET_SIZE (PTOKEN_PRIVILEGES, 16) 2616 TEST_TARGET_ALIGN(PTOKEN_PRIVILEGES, 4) 2617 } 2618 2619 static void test_pack_PTOKEN_USER(void) 2620 { 2621 /* PTOKEN_USER */ 2622 TEST_TYPE_SIZE (PTOKEN_USER, 8) 2623 TEST_TYPE_ALIGN (PTOKEN_USER, 8) 2624 TEST_TARGET_SIZE (PTOKEN_USER, 16) 2625 TEST_TARGET_ALIGN(PTOKEN_USER, 8) 2626 } 2627 2628 static void test_pack_PULARGE_INTEGER(void) 2629 { 2630 /* PULARGE_INTEGER */ 2631 TEST_TYPE_SIZE (PULARGE_INTEGER, 8) 2632 TEST_TYPE_ALIGN (PULARGE_INTEGER, 8) 2633 } 2634 2635 static void test_pack_PVECTORED_EXCEPTION_HANDLER(void) 2636 { 2637 /* PVECTORED_EXCEPTION_HANDLER */ 2638 TEST_TYPE_SIZE (PVECTORED_EXCEPTION_HANDLER, 8) 2639 TEST_TYPE_ALIGN (PVECTORED_EXCEPTION_HANDLER, 8) 2640 } 2641 2642 static void test_pack_PVOID(void) 2643 { 2644 /* PVOID */ 2645 TEST_TYPE_SIZE (PVOID, 8) 2646 TEST_TYPE_ALIGN (PVOID, 8) 2647 } 2648 2649 static void test_pack_PWCH(void) 2650 { 2651 /* PWCH */ 2652 TEST_TYPE_SIZE (PWCH, 8) 2653 TEST_TYPE_ALIGN (PWCH, 8) 2654 TEST_TARGET_SIZE (PWCH, 2) 2655 TEST_TARGET_ALIGN(PWCH, 2) 2656 } 2657 2658 static void test_pack_PWSTR(void) 2659 { 2660 /* PWSTR */ 2661 TEST_TYPE_SIZE (PWSTR, 8) 2662 TEST_TYPE_ALIGN (PWSTR, 8) 2663 TEST_TARGET_SIZE (PWSTR, 2) 2664 TEST_TARGET_ALIGN(PWSTR, 2) 2665 } 2666 2667 static void test_pack_RTL_CRITICAL_SECTION(void) 2668 { 2669 /* RTL_CRITICAL_SECTION */ 2670 TEST_TYPE_SIZE (RTL_CRITICAL_SECTION, 40) 2671 TEST_TYPE_ALIGN (RTL_CRITICAL_SECTION, 8) 2672 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, DebugInfo, 8) 2673 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, DebugInfo, 8) 2674 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, DebugInfo, 0) 2675 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, LockCount, 4) 2676 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, LockCount, 4) 2677 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, LockCount, 8) 2678 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, RecursionCount, 4) 2679 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, RecursionCount, 4) 2680 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, RecursionCount, 12) 2681 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, OwningThread, 8) 2682 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, OwningThread, 8) 2683 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, OwningThread, 16) 2684 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, LockSemaphore, 8) 2685 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, LockSemaphore, 8) 2686 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, LockSemaphore, 24) 2687 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, SpinCount, 8) 2688 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, SpinCount, 8) 2689 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, SpinCount, 32) 2690 } 2691 2692 static void test_pack_RTL_CRITICAL_SECTION_DEBUG(void) 2693 { 2694 /* RTL_CRITICAL_SECTION_DEBUG */ 2695 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, Type, 2) 2696 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, Type, 2) 2697 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, Type, 0) 2698 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, CreatorBackTraceIndex, 2) 2699 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, CreatorBackTraceIndex, 2) 2700 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, CreatorBackTraceIndex, 2) 2701 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, CriticalSection, 8) 2702 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, CriticalSection, 8) 2703 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, CriticalSection, 8) 2704 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, ProcessLocksList, 16) 2705 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, ProcessLocksList, 8) 2706 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, ProcessLocksList, 16) 2707 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, EntryCount, 4) 2708 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, EntryCount, 4) 2709 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, EntryCount, 32) 2710 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, ContentionCount, 4) 2711 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, ContentionCount, 4) 2712 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, ContentionCount, 36) 2713 } 2714 2715 static void test_pack_RTL_OSVERSIONINFOEXW(void) 2716 { 2717 /* RTL_OSVERSIONINFOEXW */ 2718 TEST_TYPE_SIZE (RTL_OSVERSIONINFOEXW, 284) 2719 TEST_TYPE_ALIGN (RTL_OSVERSIONINFOEXW, 4) 2720 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwOSVersionInfoSize, 4) 2721 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwOSVersionInfoSize, 4) 2722 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwOSVersionInfoSize, 0) 2723 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwMajorVersion, 4) 2724 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwMajorVersion, 4) 2725 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwMajorVersion, 4) 2726 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwMinorVersion, 4) 2727 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwMinorVersion, 4) 2728 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwMinorVersion, 8) 2729 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwBuildNumber, 4) 2730 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwBuildNumber, 4) 2731 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwBuildNumber, 12) 2732 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwPlatformId, 4) 2733 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwPlatformId, 4) 2734 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwPlatformId, 16) 2735 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, szCSDVersion, 256) 2736 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, szCSDVersion, 2) 2737 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, szCSDVersion, 20) 2738 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wServicePackMajor, 2) 2739 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wServicePackMajor, 2) 2740 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wServicePackMajor, 276) 2741 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wServicePackMinor, 2) 2742 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wServicePackMinor, 2) 2743 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wServicePackMinor, 278) 2744 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wSuiteMask, 2) 2745 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wSuiteMask, 2) 2746 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wSuiteMask, 280) 2747 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wProductType, 1) 2748 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wProductType, 1) 2749 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wProductType, 282) 2750 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wReserved, 1) 2751 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wReserved, 1) 2752 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wReserved, 283) 2753 } 2754 2755 static void test_pack_RTL_OSVERSIONINFOW(void) 2756 { 2757 /* RTL_OSVERSIONINFOW */ 2758 TEST_TYPE_SIZE (RTL_OSVERSIONINFOW, 276) 2759 TEST_TYPE_ALIGN (RTL_OSVERSIONINFOW, 4) 2760 TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwOSVersionInfoSize, 4) 2761 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwOSVersionInfoSize, 4) 2762 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwOSVersionInfoSize, 0) 2763 TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwMajorVersion, 4) 2764 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwMajorVersion, 4) 2765 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwMajorVersion, 4) 2766 TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwMinorVersion, 4) 2767 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwMinorVersion, 4) 2768 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwMinorVersion, 8) 2769 TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwBuildNumber, 4) 2770 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwBuildNumber, 4) 2771 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwBuildNumber, 12) 2772 TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwPlatformId, 4) 2773 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwPlatformId, 4) 2774 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwPlatformId, 16) 2775 TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, szCSDVersion, 256) 2776 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, szCSDVersion, 2) 2777 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, szCSDVersion, 20) 2778 } 2779 2780 static void test_pack_RTL_RESOURCE_DEBUG(void) 2781 { 2782 /* RTL_RESOURCE_DEBUG */ 2783 TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, Type, 2) 2784 TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, Type, 2) 2785 TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, Type, 0) 2786 TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, CreatorBackTraceIndex, 2) 2787 TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, CreatorBackTraceIndex, 2) 2788 TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, CreatorBackTraceIndex, 2) 2789 TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, CriticalSection, 8) 2790 TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, CriticalSection, 8) 2791 TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, CriticalSection, 8) 2792 TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, ProcessLocksList, 16) 2793 TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, ProcessLocksList, 8) 2794 TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, ProcessLocksList, 16) 2795 TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, EntryCount, 4) 2796 TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, EntryCount, 4) 2797 TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, EntryCount, 32) 2798 TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, ContentionCount, 4) 2799 TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, ContentionCount, 4) 2800 TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, ContentionCount, 36) 2801 } 2802 2803 static void test_pack_SECURITY_CONTEXT_TRACKING_MODE(void) 2804 { 2805 /* SECURITY_CONTEXT_TRACKING_MODE */ 2806 TEST_TYPE_SIZE (SECURITY_CONTEXT_TRACKING_MODE, 1) 2807 TEST_TYPE_ALIGN (SECURITY_CONTEXT_TRACKING_MODE, 1) 2808 } 2809 2810 static void test_pack_SECURITY_DESCRIPTOR(void) 2811 { 2812 /* SECURITY_DESCRIPTOR */ 2813 TEST_TYPE_SIZE (SECURITY_DESCRIPTOR, 40) 2814 TEST_TYPE_ALIGN (SECURITY_DESCRIPTOR, 8) 2815 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Revision, 1) 2816 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Revision, 1) 2817 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Revision, 0) 2818 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Sbz1, 1) 2819 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Sbz1, 1) 2820 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Sbz1, 1) 2821 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Control, 2) 2822 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Control, 2) 2823 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Control, 2) 2824 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Owner, 8) 2825 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Owner, 8) 2826 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Owner, 8) 2827 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Group, 8) 2828 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Group, 8) 2829 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Group, 16) 2830 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Sacl, 8) 2831 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Sacl, 8) 2832 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Sacl, 24) 2833 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Dacl, 8) 2834 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Dacl, 8) 2835 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Dacl, 32) 2836 } 2837 2838 static void test_pack_SECURITY_DESCRIPTOR_CONTROL(void) 2839 { 2840 /* SECURITY_DESCRIPTOR_CONTROL */ 2841 TEST_TYPE_SIZE (SECURITY_DESCRIPTOR_CONTROL, 2) 2842 TEST_TYPE_ALIGN (SECURITY_DESCRIPTOR_CONTROL, 2) 2843 TEST_TYPE_UNSIGNED(SECURITY_DESCRIPTOR_CONTROL) 2844 } 2845 2846 static void test_pack_SECURITY_DESCRIPTOR_RELATIVE(void) 2847 { 2848 /* SECURITY_DESCRIPTOR_RELATIVE */ 2849 TEST_TYPE_SIZE (SECURITY_DESCRIPTOR_RELATIVE, 20) 2850 TEST_TYPE_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, 4) 2851 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Revision, 1) 2852 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Revision, 1) 2853 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Revision, 0) 2854 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Sbz1, 1) 2855 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Sbz1, 1) 2856 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Sbz1, 1) 2857 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Control, 2) 2858 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Control, 2) 2859 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Control, 2) 2860 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Owner, 4) 2861 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Owner, 4) 2862 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Owner, 4) 2863 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Group, 4) 2864 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Group, 4) 2865 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Group, 8) 2866 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Sacl, 4) 2867 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Sacl, 4) 2868 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Sacl, 12) 2869 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Dacl, 4) 2870 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Dacl, 4) 2871 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Dacl, 16) 2872 } 2873 2874 static void test_pack_SECURITY_INFORMATION(void) 2875 { 2876 /* SECURITY_INFORMATION */ 2877 TEST_TYPE_SIZE (SECURITY_INFORMATION, 4) 2878 TEST_TYPE_ALIGN (SECURITY_INFORMATION, 4) 2879 TEST_TYPE_UNSIGNED(SECURITY_INFORMATION) 2880 } 2881 2882 static void test_pack_SECURITY_QUALITY_OF_SERVICE(void) 2883 { 2884 /* SECURITY_QUALITY_OF_SERVICE */ 2885 TEST_FIELD_SIZE (SECURITY_QUALITY_OF_SERVICE, Length, 4) 2886 TEST_FIELD_ALIGN (SECURITY_QUALITY_OF_SERVICE, Length, 4) 2887 TEST_FIELD_OFFSET(SECURITY_QUALITY_OF_SERVICE, Length, 0) 2888 } 2889 2890 static void test_pack_SHORT(void) 2891 { 2892 /* SHORT */ 2893 TEST_TYPE_SIZE (SHORT, 2) 2894 TEST_TYPE_ALIGN (SHORT, 2) 2895 TEST_TYPE_SIGNED(SHORT) 2896 } 2897 2898 static void test_pack_SID(void) 2899 { 2900 /* SID */ 2901 TEST_TYPE_SIZE (SID, 12) 2902 TEST_TYPE_ALIGN (SID, 4) 2903 TEST_FIELD_SIZE (SID, Revision, 1) 2904 TEST_FIELD_ALIGN (SID, Revision, 1) 2905 TEST_FIELD_OFFSET(SID, Revision, 0) 2906 TEST_FIELD_SIZE (SID, SubAuthorityCount, 1) 2907 TEST_FIELD_ALIGN (SID, SubAuthorityCount, 1) 2908 TEST_FIELD_OFFSET(SID, SubAuthorityCount, 1) 2909 TEST_FIELD_SIZE (SID, IdentifierAuthority, 6) 2910 TEST_FIELD_ALIGN (SID, IdentifierAuthority, 1) 2911 TEST_FIELD_OFFSET(SID, IdentifierAuthority, 2) 2912 TEST_FIELD_SIZE (SID, SubAuthority, 4) 2913 TEST_FIELD_ALIGN (SID, SubAuthority, 4) 2914 TEST_FIELD_OFFSET(SID, SubAuthority, 8) 2915 } 2916 2917 static void test_pack_SID_AND_ATTRIBUTES(void) 2918 { 2919 /* SID_AND_ATTRIBUTES */ 2920 TEST_TYPE_SIZE (SID_AND_ATTRIBUTES, 16) 2921 TEST_TYPE_ALIGN (SID_AND_ATTRIBUTES, 8) 2922 TEST_FIELD_SIZE (SID_AND_ATTRIBUTES, Sid, 8) 2923 TEST_FIELD_ALIGN (SID_AND_ATTRIBUTES, Sid, 8) 2924 TEST_FIELD_OFFSET(SID_AND_ATTRIBUTES, Sid, 0) 2925 TEST_FIELD_SIZE (SID_AND_ATTRIBUTES, Attributes, 4) 2926 TEST_FIELD_ALIGN (SID_AND_ATTRIBUTES, Attributes, 4) 2927 TEST_FIELD_OFFSET(SID_AND_ATTRIBUTES, Attributes, 8) 2928 } 2929 2930 static void test_pack_SID_IDENTIFIER_AUTHORITY(void) 2931 { 2932 /* SID_IDENTIFIER_AUTHORITY */ 2933 TEST_TYPE_SIZE (SID_IDENTIFIER_AUTHORITY, 6) 2934 TEST_TYPE_ALIGN (SID_IDENTIFIER_AUTHORITY, 1) 2935 TEST_FIELD_SIZE (SID_IDENTIFIER_AUTHORITY, Value, 6) 2936 TEST_FIELD_ALIGN (SID_IDENTIFIER_AUTHORITY, Value, 1) 2937 TEST_FIELD_OFFSET(SID_IDENTIFIER_AUTHORITY, Value, 0) 2938 } 2939 2940 static void test_pack_SINGLE_LIST_ENTRY(void) 2941 { 2942 /* SINGLE_LIST_ENTRY */ 2943 TEST_TYPE_SIZE (SINGLE_LIST_ENTRY, 8) 2944 TEST_TYPE_ALIGN (SINGLE_LIST_ENTRY, 8) 2945 TEST_FIELD_SIZE (SINGLE_LIST_ENTRY, Next, 8) 2946 TEST_FIELD_ALIGN (SINGLE_LIST_ENTRY, Next, 8) 2947 TEST_FIELD_OFFSET(SINGLE_LIST_ENTRY, Next, 0) 2948 } 2949 2950 static void test_pack_SYSTEM_ALARM_ACE(void) 2951 { 2952 /* SYSTEM_ALARM_ACE */ 2953 TEST_TYPE_SIZE (SYSTEM_ALARM_ACE, 12) 2954 TEST_TYPE_ALIGN (SYSTEM_ALARM_ACE, 4) 2955 TEST_FIELD_SIZE (SYSTEM_ALARM_ACE, Header, 4) 2956 TEST_FIELD_ALIGN (SYSTEM_ALARM_ACE, Header, 2) 2957 TEST_FIELD_OFFSET(SYSTEM_ALARM_ACE, Header, 0) 2958 TEST_FIELD_SIZE (SYSTEM_ALARM_ACE, Mask, 4) 2959 TEST_FIELD_ALIGN (SYSTEM_ALARM_ACE, Mask, 4) 2960 TEST_FIELD_OFFSET(SYSTEM_ALARM_ACE, Mask, 4) 2961 TEST_FIELD_SIZE (SYSTEM_ALARM_ACE, SidStart, 4) 2962 TEST_FIELD_ALIGN (SYSTEM_ALARM_ACE, SidStart, 4) 2963 TEST_FIELD_OFFSET(SYSTEM_ALARM_ACE, SidStart, 8) 2964 } 2965 2966 static void test_pack_SYSTEM_AUDIT_ACE(void) 2967 { 2968 /* SYSTEM_AUDIT_ACE */ 2969 TEST_TYPE_SIZE (SYSTEM_AUDIT_ACE, 12) 2970 TEST_TYPE_ALIGN (SYSTEM_AUDIT_ACE, 4) 2971 TEST_FIELD_SIZE (SYSTEM_AUDIT_ACE, Header, 4) 2972 TEST_FIELD_ALIGN (SYSTEM_AUDIT_ACE, Header, 2) 2973 TEST_FIELD_OFFSET(SYSTEM_AUDIT_ACE, Header, 0) 2974 TEST_FIELD_SIZE (SYSTEM_AUDIT_ACE, Mask, 4) 2975 TEST_FIELD_ALIGN (SYSTEM_AUDIT_ACE, Mask, 4) 2976 TEST_FIELD_OFFSET(SYSTEM_AUDIT_ACE, Mask, 4) 2977 TEST_FIELD_SIZE (SYSTEM_AUDIT_ACE, SidStart, 4) 2978 TEST_FIELD_ALIGN (SYSTEM_AUDIT_ACE, SidStart, 4) 2979 TEST_FIELD_OFFSET(SYSTEM_AUDIT_ACE, SidStart, 8) 2980 } 2981 2982 static void test_pack_TOKEN_DEFAULT_DACL(void) 2983 { 2984 /* TOKEN_DEFAULT_DACL */ 2985 TEST_TYPE_SIZE (TOKEN_DEFAULT_DACL, 8) 2986 TEST_TYPE_ALIGN (TOKEN_DEFAULT_DACL, 8) 2987 TEST_FIELD_SIZE (TOKEN_DEFAULT_DACL, DefaultDacl, 8) 2988 TEST_FIELD_ALIGN (TOKEN_DEFAULT_DACL, DefaultDacl, 8) 2989 TEST_FIELD_OFFSET(TOKEN_DEFAULT_DACL, DefaultDacl, 0) 2990 } 2991 2992 static void test_pack_TOKEN_GROUPS(void) 2993 { 2994 /* TOKEN_GROUPS */ 2995 TEST_TYPE_SIZE (TOKEN_GROUPS, 24) 2996 TEST_TYPE_ALIGN (TOKEN_GROUPS, 8) 2997 TEST_FIELD_SIZE (TOKEN_GROUPS, GroupCount, 4) 2998 TEST_FIELD_ALIGN (TOKEN_GROUPS, GroupCount, 4) 2999 TEST_FIELD_OFFSET(TOKEN_GROUPS, GroupCount, 0) 3000 TEST_FIELD_SIZE (TOKEN_GROUPS, Groups, 16) 3001 TEST_FIELD_ALIGN (TOKEN_GROUPS, Groups, 8) 3002 TEST_FIELD_OFFSET(TOKEN_GROUPS, Groups, 8) 3003 } 3004 3005 static void test_pack_TOKEN_OWNER(void) 3006 { 3007 /* TOKEN_OWNER */ 3008 TEST_TYPE_SIZE (TOKEN_OWNER, 8) 3009 TEST_TYPE_ALIGN (TOKEN_OWNER, 8) 3010 TEST_FIELD_SIZE (TOKEN_OWNER, Owner, 8) 3011 TEST_FIELD_ALIGN (TOKEN_OWNER, Owner, 8) 3012 TEST_FIELD_OFFSET(TOKEN_OWNER, Owner, 0) 3013 } 3014 3015 static void test_pack_TOKEN_PRIMARY_GROUP(void) 3016 { 3017 /* TOKEN_PRIMARY_GROUP */ 3018 TEST_TYPE_SIZE (TOKEN_PRIMARY_GROUP, 8) 3019 TEST_TYPE_ALIGN (TOKEN_PRIMARY_GROUP, 8) 3020 TEST_FIELD_SIZE (TOKEN_PRIMARY_GROUP, PrimaryGroup, 8) 3021 TEST_FIELD_ALIGN (TOKEN_PRIMARY_GROUP, PrimaryGroup, 8) 3022 TEST_FIELD_OFFSET(TOKEN_PRIMARY_GROUP, PrimaryGroup, 0) 3023 } 3024 3025 static void test_pack_TOKEN_PRIVILEGES(void) 3026 { 3027 /* TOKEN_PRIVILEGES */ 3028 TEST_TYPE_SIZE (TOKEN_PRIVILEGES, 16) 3029 TEST_TYPE_ALIGN (TOKEN_PRIVILEGES, 4) 3030 TEST_FIELD_SIZE (TOKEN_PRIVILEGES, PrivilegeCount, 4) 3031 TEST_FIELD_ALIGN (TOKEN_PRIVILEGES, PrivilegeCount, 4) 3032 TEST_FIELD_OFFSET(TOKEN_PRIVILEGES, PrivilegeCount, 0) 3033 TEST_FIELD_SIZE (TOKEN_PRIVILEGES, Privileges, 12) 3034 TEST_FIELD_ALIGN (TOKEN_PRIVILEGES, Privileges, 4) 3035 TEST_FIELD_OFFSET(TOKEN_PRIVILEGES, Privileges, 4) 3036 } 3037 3038 static void test_pack_TOKEN_SOURCE(void) 3039 { 3040 /* TOKEN_SOURCE */ 3041 TEST_TYPE_SIZE (TOKEN_SOURCE, 16) 3042 TEST_TYPE_ALIGN (TOKEN_SOURCE, 4) 3043 TEST_FIELD_SIZE (TOKEN_SOURCE, SourceName, 8) 3044 TEST_FIELD_ALIGN (TOKEN_SOURCE, SourceName, 1) 3045 TEST_FIELD_OFFSET(TOKEN_SOURCE, SourceName, 0) 3046 TEST_FIELD_SIZE (TOKEN_SOURCE, SourceIdentifier, 8) 3047 TEST_FIELD_ALIGN (TOKEN_SOURCE, SourceIdentifier, 4) 3048 TEST_FIELD_OFFSET(TOKEN_SOURCE, SourceIdentifier, 8) 3049 } 3050 3051 static void test_pack_TOKEN_STATISTICS(void) 3052 { 3053 /* TOKEN_STATISTICS (pack 4) */ 3054 TEST_FIELD_SIZE (TOKEN_STATISTICS, TokenId, 8) 3055 TEST_FIELD_ALIGN (TOKEN_STATISTICS, TokenId, 4) 3056 TEST_FIELD_OFFSET(TOKEN_STATISTICS, TokenId, 0) 3057 TEST_FIELD_SIZE (TOKEN_STATISTICS, AuthenticationId, 8) 3058 TEST_FIELD_ALIGN (TOKEN_STATISTICS, AuthenticationId, 4) 3059 TEST_FIELD_OFFSET(TOKEN_STATISTICS, AuthenticationId, 8) 3060 TEST_FIELD_SIZE (TOKEN_STATISTICS, ExpirationTime, 8) 3061 TEST_FIELD_ALIGN (TOKEN_STATISTICS, ExpirationTime, 4) 3062 TEST_FIELD_OFFSET(TOKEN_STATISTICS, ExpirationTime, 16) 3063 } 3064 3065 static void test_pack_TOKEN_USER(void) 3066 { 3067 /* TOKEN_USER */ 3068 TEST_TYPE_SIZE (TOKEN_USER, 16) 3069 TEST_TYPE_ALIGN (TOKEN_USER, 8) 3070 TEST_FIELD_SIZE (TOKEN_USER, User, 16) 3071 TEST_FIELD_ALIGN (TOKEN_USER, User, 8) 3072 TEST_FIELD_OFFSET(TOKEN_USER, User, 0) 3073 } 3074 3075 static void test_pack_ULARGE_INTEGER(void) 3076 { 3077 /* ULARGE_INTEGER */ 3078 } 3079 3080 static void test_pack_ULONGLONG(void) 3081 { 3082 /* ULONGLONG */ 3083 TEST_TYPE_SIZE (ULONGLONG, 8) 3084 TEST_TYPE_ALIGN (ULONGLONG, 8) 3085 TEST_TYPE_UNSIGNED(ULONGLONG) 3086 } 3087 3088 static void test_pack_WAITORTIMERCALLBACKFUNC(void) 3089 { 3090 /* WAITORTIMERCALLBACKFUNC */ 3091 TEST_TYPE_SIZE (WAITORTIMERCALLBACKFUNC, 8) 3092 TEST_TYPE_ALIGN (WAITORTIMERCALLBACKFUNC, 8) 3093 } 3094 3095 static void test_pack_WCHAR(void) 3096 { 3097 /* WCHAR */ 3098 TEST_TYPE_SIZE (WCHAR, 2) 3099 TEST_TYPE_ALIGN (WCHAR, 2) 3100 TEST_TYPE_UNSIGNED(WCHAR) 3101 } 3102 3103 static void test_pack_ATOM(void) 3104 { 3105 /* ATOM */ 3106 TEST_TYPE_SIZE (ATOM, 2) 3107 TEST_TYPE_ALIGN (ATOM, 2) 3108 TEST_TYPE_UNSIGNED(ATOM) 3109 } 3110 3111 static void test_pack_BOOL(void) 3112 { 3113 /* BOOL */ 3114 TEST_TYPE_SIZE (BOOL, 4) 3115 TEST_TYPE_ALIGN (BOOL, 4) 3116 TEST_TYPE_SIGNED(BOOL) 3117 } 3118 3119 static void test_pack_BYTE(void) 3120 { 3121 /* BYTE */ 3122 TEST_TYPE_SIZE (BYTE, 1) 3123 TEST_TYPE_ALIGN (BYTE, 1) 3124 TEST_TYPE_UNSIGNED(BYTE) 3125 } 3126 3127 static void test_pack_COLORREF(void) 3128 { 3129 /* COLORREF */ 3130 TEST_TYPE_SIZE (COLORREF, 4) 3131 TEST_TYPE_ALIGN (COLORREF, 4) 3132 TEST_TYPE_UNSIGNED(COLORREF) 3133 } 3134 3135 static void test_pack_DWORD(void) 3136 { 3137 /* DWORD */ 3138 TEST_TYPE_SIZE (DWORD, 4) 3139 TEST_TYPE_ALIGN (DWORD, 4) 3140 TEST_TYPE_UNSIGNED(DWORD) 3141 } 3142 3143 static void test_pack_FARPROC(void) 3144 { 3145 /* FARPROC */ 3146 TEST_TYPE_SIZE (FARPROC, 8) 3147 TEST_TYPE_ALIGN (FARPROC, 8) 3148 } 3149 3150 static void test_pack_FLOAT(void) 3151 { 3152 /* FLOAT */ 3153 TEST_TYPE_SIZE (FLOAT, 4) 3154 TEST_TYPE_ALIGN (FLOAT, 4) 3155 } 3156 3157 static void test_pack_GLOBALHANDLE(void) 3158 { 3159 /* GLOBALHANDLE */ 3160 TEST_TYPE_SIZE (GLOBALHANDLE, 8) 3161 TEST_TYPE_ALIGN (GLOBALHANDLE, 8) 3162 } 3163 3164 static void test_pack_HCURSOR(void) 3165 { 3166 /* HCURSOR */ 3167 TEST_TYPE_SIZE (HCURSOR, 8) 3168 TEST_TYPE_ALIGN (HCURSOR, 8) 3169 } 3170 3171 static void test_pack_HFILE(void) 3172 { 3173 /* HFILE */ 3174 TEST_TYPE_SIZE (HFILE, 4) 3175 TEST_TYPE_ALIGN (HFILE, 4) 3176 TEST_TYPE_SIGNED(HFILE) 3177 } 3178 3179 static void test_pack_HGDIOBJ(void) 3180 { 3181 /* HGDIOBJ */ 3182 TEST_TYPE_SIZE (HGDIOBJ, 8) 3183 TEST_TYPE_ALIGN (HGDIOBJ, 8) 3184 } 3185 3186 static void test_pack_HGLOBAL(void) 3187 { 3188 /* HGLOBAL */ 3189 TEST_TYPE_SIZE (HGLOBAL, 8) 3190 TEST_TYPE_ALIGN (HGLOBAL, 8) 3191 } 3192 3193 static void test_pack_HLOCAL(void) 3194 { 3195 /* HLOCAL */ 3196 TEST_TYPE_SIZE (HLOCAL, 8) 3197 TEST_TYPE_ALIGN (HLOCAL, 8) 3198 } 3199 3200 static void test_pack_HMODULE(void) 3201 { 3202 /* HMODULE */ 3203 TEST_TYPE_SIZE (HMODULE, 8) 3204 TEST_TYPE_ALIGN (HMODULE, 8) 3205 } 3206 3207 static void test_pack_INT(void) 3208 { 3209 /* INT */ 3210 TEST_TYPE_SIZE (INT, 4) 3211 TEST_TYPE_ALIGN (INT, 4) 3212 TEST_TYPE_SIGNED(INT) 3213 } 3214 3215 static void test_pack_LOCALHANDLE(void) 3216 { 3217 /* LOCALHANDLE */ 3218 TEST_TYPE_SIZE (LOCALHANDLE, 8) 3219 TEST_TYPE_ALIGN (LOCALHANDLE, 8) 3220 } 3221 3222 static void test_pack_LPARAM(void) 3223 { 3224 /* LPARAM */ 3225 TEST_TYPE_SIZE (LPARAM, 8) 3226 TEST_TYPE_ALIGN (LPARAM, 8) 3227 } 3228 3229 static void test_pack_LPCRECT(void) 3230 { 3231 /* LPCRECT */ 3232 TEST_TYPE_SIZE (LPCRECT, 8) 3233 TEST_TYPE_ALIGN (LPCRECT, 8) 3234 TEST_TARGET_SIZE (LPCRECT, 16) 3235 TEST_TARGET_ALIGN(LPCRECT, 4) 3236 } 3237 3238 static void test_pack_LPCRECTL(void) 3239 { 3240 /* LPCRECTL */ 3241 TEST_TYPE_SIZE (LPCRECTL, 8) 3242 TEST_TYPE_ALIGN (LPCRECTL, 8) 3243 TEST_TARGET_SIZE (LPCRECTL, 16) 3244 TEST_TARGET_ALIGN(LPCRECTL, 4) 3245 } 3246 3247 static void test_pack_LPCVOID(void) 3248 { 3249 /* LPCVOID */ 3250 TEST_TYPE_SIZE (LPCVOID, 8) 3251 TEST_TYPE_ALIGN (LPCVOID, 8) 3252 } 3253 3254 static void test_pack_LPPOINT(void) 3255 { 3256 /* LPPOINT */ 3257 TEST_TYPE_SIZE (LPPOINT, 8) 3258 TEST_TYPE_ALIGN (LPPOINT, 8) 3259 TEST_TARGET_SIZE (LPPOINT, 8) 3260 TEST_TARGET_ALIGN(LPPOINT, 4) 3261 } 3262 3263 static void test_pack_LPRECT(void) 3264 { 3265 /* LPRECT */ 3266 TEST_TYPE_SIZE (LPRECT, 8) 3267 TEST_TYPE_ALIGN (LPRECT, 8) 3268 TEST_TARGET_SIZE (LPRECT, 16) 3269 TEST_TARGET_ALIGN(LPRECT, 4) 3270 } 3271 3272 static void test_pack_LPRECTL(void) 3273 { 3274 /* LPRECTL */ 3275 TEST_TYPE_SIZE (LPRECTL, 8) 3276 TEST_TYPE_ALIGN (LPRECTL, 8) 3277 TEST_TARGET_SIZE (LPRECTL, 16) 3278 TEST_TARGET_ALIGN(LPRECTL, 4) 3279 } 3280 3281 static void test_pack_LPSIZE(void) 3282 { 3283 /* LPSIZE */ 3284 TEST_TYPE_SIZE (LPSIZE, 8) 3285 TEST_TYPE_ALIGN (LPSIZE, 8) 3286 TEST_TARGET_SIZE (LPSIZE, 8) 3287 TEST_TARGET_ALIGN(LPSIZE, 4) 3288 } 3289 3290 static void test_pack_LRESULT(void) 3291 { 3292 /* LRESULT */ 3293 TEST_TYPE_SIZE (LRESULT, 8) 3294 TEST_TYPE_ALIGN (LRESULT, 8) 3295 } 3296 3297 static void test_pack_POINT(void) 3298 { 3299 /* POINT */ 3300 TEST_TYPE_SIZE (POINT, 8) 3301 TEST_TYPE_ALIGN (POINT, 4) 3302 TEST_FIELD_SIZE (POINT, x, 4) 3303 TEST_FIELD_ALIGN (POINT, x, 4) 3304 TEST_FIELD_OFFSET(POINT, x, 0) 3305 TEST_FIELD_SIZE (POINT, y, 4) 3306 TEST_FIELD_ALIGN (POINT, y, 4) 3307 TEST_FIELD_OFFSET(POINT, y, 4) 3308 } 3309 3310 static void test_pack_POINTL(void) 3311 { 3312 /* POINTL */ 3313 TEST_TYPE_SIZE (POINTL, 8) 3314 TEST_TYPE_ALIGN (POINTL, 4) 3315 TEST_FIELD_SIZE (POINTL, x, 4) 3316 TEST_FIELD_ALIGN (POINTL, x, 4) 3317 TEST_FIELD_OFFSET(POINTL, x, 0) 3318 TEST_FIELD_SIZE (POINTL, y, 4) 3319 TEST_FIELD_ALIGN (POINTL, y, 4) 3320 TEST_FIELD_OFFSET(POINTL, y, 4) 3321 } 3322 3323 static void test_pack_PPOINT(void) 3324 { 3325 /* PPOINT */ 3326 TEST_TYPE_SIZE (PPOINT, 8) 3327 TEST_TYPE_ALIGN (PPOINT, 8) 3328 TEST_TARGET_SIZE (PPOINT, 8) 3329 TEST_TARGET_ALIGN(PPOINT, 4) 3330 } 3331 3332 static void test_pack_PPOINTL(void) 3333 { 3334 /* PPOINTL */ 3335 TEST_TYPE_SIZE (PPOINTL, 8) 3336 TEST_TYPE_ALIGN (PPOINTL, 8) 3337 TEST_TARGET_SIZE (PPOINTL, 8) 3338 TEST_TARGET_ALIGN(PPOINTL, 4) 3339 } 3340 3341 static void test_pack_PRECT(void) 3342 { 3343 /* PRECT */ 3344 TEST_TYPE_SIZE (PRECT, 8) 3345 TEST_TYPE_ALIGN (PRECT, 8) 3346 TEST_TARGET_SIZE (PRECT, 16) 3347 TEST_TARGET_ALIGN(PRECT, 4) 3348 } 3349 3350 static void test_pack_PRECTL(void) 3351 { 3352 /* PRECTL */ 3353 TEST_TYPE_SIZE (PRECTL, 8) 3354 TEST_TYPE_ALIGN (PRECTL, 8) 3355 TEST_TARGET_SIZE (PRECTL, 16) 3356 TEST_TARGET_ALIGN(PRECTL, 4) 3357 } 3358 3359 static void test_pack_PROC(void) 3360 { 3361 /* PROC */ 3362 TEST_TYPE_SIZE (PROC, 8) 3363 TEST_TYPE_ALIGN (PROC, 8) 3364 } 3365 3366 static void test_pack_PSIZE(void) 3367 { 3368 /* PSIZE */ 3369 TEST_TYPE_SIZE (PSIZE, 8) 3370 TEST_TYPE_ALIGN (PSIZE, 8) 3371 TEST_TARGET_SIZE (PSIZE, 8) 3372 TEST_TARGET_ALIGN(PSIZE, 4) 3373 } 3374 3375 static void test_pack_PSZ(void) 3376 { 3377 /* PSZ */ 3378 TEST_TYPE_SIZE (PSZ, 8) 3379 TEST_TYPE_ALIGN (PSZ, 8) 3380 } 3381 3382 static void test_pack_RECT(void) 3383 { 3384 /* RECT */ 3385 TEST_TYPE_SIZE (RECT, 16) 3386 TEST_TYPE_ALIGN (RECT, 4) 3387 TEST_FIELD_SIZE (RECT, left, 4) 3388 TEST_FIELD_ALIGN (RECT, left, 4) 3389 TEST_FIELD_OFFSET(RECT, left, 0) 3390 TEST_FIELD_SIZE (RECT, top, 4) 3391 TEST_FIELD_ALIGN (RECT, top, 4) 3392 TEST_FIELD_OFFSET(RECT, top, 4) 3393 TEST_FIELD_SIZE (RECT, right, 4) 3394 TEST_FIELD_ALIGN (RECT, right, 4) 3395 TEST_FIELD_OFFSET(RECT, right, 8) 3396 TEST_FIELD_SIZE (RECT, bottom, 4) 3397 TEST_FIELD_ALIGN (RECT, bottom, 4) 3398 TEST_FIELD_OFFSET(RECT, bottom, 12) 3399 } 3400 3401 static void test_pack_RECTL(void) 3402 { 3403 /* RECTL */ 3404 TEST_TYPE_SIZE (RECTL, 16) 3405 TEST_TYPE_ALIGN (RECTL, 4) 3406 TEST_FIELD_SIZE (RECTL, left, 4) 3407 TEST_FIELD_ALIGN (RECTL, left, 4) 3408 TEST_FIELD_OFFSET(RECTL, left, 0) 3409 TEST_FIELD_SIZE (RECTL, top, 4) 3410 TEST_FIELD_ALIGN (RECTL, top, 4) 3411 TEST_FIELD_OFFSET(RECTL, top, 4) 3412 TEST_FIELD_SIZE (RECTL, right, 4) 3413 TEST_FIELD_ALIGN (RECTL, right, 4) 3414 TEST_FIELD_OFFSET(RECTL, right, 8) 3415 TEST_FIELD_SIZE (RECTL, bottom, 4) 3416 TEST_FIELD_ALIGN (RECTL, bottom, 4) 3417 TEST_FIELD_OFFSET(RECTL, bottom, 12) 3418 } 3419 3420 static void test_pack_SIZE(void) 3421 { 3422 /* SIZE */ 3423 TEST_TYPE_SIZE (SIZE, 8) 3424 TEST_TYPE_ALIGN (SIZE, 4) 3425 TEST_FIELD_SIZE (SIZE, cx, 4) 3426 TEST_FIELD_ALIGN (SIZE, cx, 4) 3427 TEST_FIELD_OFFSET(SIZE, cx, 0) 3428 TEST_FIELD_SIZE (SIZE, cy, 4) 3429 TEST_FIELD_ALIGN (SIZE, cy, 4) 3430 TEST_FIELD_OFFSET(SIZE, cy, 4) 3431 } 3432 3433 static void test_pack_SIZEL(void) 3434 { 3435 /* SIZEL */ 3436 TEST_TYPE_SIZE (SIZEL, 8) 3437 TEST_TYPE_ALIGN (SIZEL, 4) 3438 } 3439 3440 static void test_pack_UCHAR(void) 3441 { 3442 /* UCHAR */ 3443 TEST_TYPE_SIZE (UCHAR, 1) 3444 TEST_TYPE_ALIGN (UCHAR, 1) 3445 TEST_TYPE_UNSIGNED(UCHAR) 3446 } 3447 3448 static void test_pack_UINT(void) 3449 { 3450 /* UINT */ 3451 TEST_TYPE_SIZE (UINT, 4) 3452 TEST_TYPE_ALIGN (UINT, 4) 3453 TEST_TYPE_UNSIGNED(UINT) 3454 } 3455 3456 static void test_pack_ULONG(void) 3457 { 3458 /* ULONG */ 3459 TEST_TYPE_SIZE (ULONG, 4) 3460 TEST_TYPE_ALIGN (ULONG, 4) 3461 TEST_TYPE_UNSIGNED(ULONG) 3462 } 3463 3464 static void test_pack_USHORT(void) 3465 { 3466 /* USHORT */ 3467 TEST_TYPE_SIZE (USHORT, 2) 3468 TEST_TYPE_ALIGN (USHORT, 2) 3469 TEST_TYPE_UNSIGNED(USHORT) 3470 } 3471 3472 static void test_pack_WORD(void) 3473 { 3474 /* WORD */ 3475 TEST_TYPE_SIZE (WORD, 2) 3476 TEST_TYPE_ALIGN (WORD, 2) 3477 TEST_TYPE_UNSIGNED(WORD) 3478 } 3479 3480 static void test_pack_WPARAM(void) 3481 { 3482 /* WPARAM */ 3483 TEST_TYPE_SIZE (WPARAM, 8) 3484 TEST_TYPE_ALIGN (WPARAM, 8) 3485 } 3486 3487 #else /* _WIN64 */ 3488 3489 static void test_pack_DWORD32(void) 3490 { 3491 /* DWORD32 */ 3492 TEST_TYPE_SIZE (DWORD32, 4) 3493 TEST_TYPE_ALIGN (DWORD32, 4) 3494 TEST_TYPE_UNSIGNED(DWORD32) 3495 } 3496 3497 static void test_pack_DWORD64(void) 3498 { 3499 /* DWORD64 */ 3500 TEST_TYPE_SIZE (DWORD64, 8) 3501 TEST_TYPE_ALIGN (DWORD64, 8) 3502 TEST_TYPE_UNSIGNED(DWORD64) 3503 } 3504 3505 static void test_pack_DWORD_PTR(void) 3506 { 3507 /* DWORD_PTR */ 3508 TEST_TYPE_SIZE (DWORD_PTR, 4) 3509 TEST_TYPE_ALIGN (DWORD_PTR, 4) 3510 } 3511 3512 static void test_pack_HALF_PTR(void) 3513 { 3514 /* HALF_PTR */ 3515 TEST_TYPE_SIZE (HALF_PTR, 2) 3516 TEST_TYPE_ALIGN (HALF_PTR, 2) 3517 TEST_TYPE_SIGNED(HALF_PTR) 3518 } 3519 3520 static void test_pack_INT16(void) 3521 { 3522 /* INT16 */ 3523 TEST_TYPE_SIZE (INT16, 2) 3524 TEST_TYPE_ALIGN (INT16, 2) 3525 TEST_TYPE_SIGNED(INT16) 3526 } 3527 3528 static void test_pack_INT32(void) 3529 { 3530 /* INT32 */ 3531 TEST_TYPE_SIZE (INT32, 4) 3532 TEST_TYPE_ALIGN (INT32, 4) 3533 TEST_TYPE_SIGNED(INT32) 3534 } 3535 3536 static void test_pack_INT64(void) 3537 { 3538 /* INT64 */ 3539 TEST_TYPE_SIZE (INT64, 8) 3540 TEST_TYPE_ALIGN (INT64, 8) 3541 TEST_TYPE_SIGNED(INT64) 3542 } 3543 3544 static void test_pack_INT8(void) 3545 { 3546 /* INT8 */ 3547 TEST_TYPE_SIZE (INT8, 1) 3548 TEST_TYPE_ALIGN (INT8, 1) 3549 TEST_TYPE_SIGNED(INT8) 3550 } 3551 3552 static void test_pack_INT_PTR(void) 3553 { 3554 /* INT_PTR */ 3555 TEST_TYPE_SIZE (INT_PTR, 4) 3556 TEST_TYPE_ALIGN (INT_PTR, 4) 3557 TEST_TYPE_SIGNED(INT_PTR) 3558 } 3559 3560 static void test_pack_LONG32(void) 3561 { 3562 /* LONG32 */ 3563 TEST_TYPE_SIZE (LONG32, 4) 3564 TEST_TYPE_ALIGN (LONG32, 4) 3565 TEST_TYPE_SIGNED(LONG32) 3566 } 3567 3568 static void test_pack_LONG64(void) 3569 { 3570 /* LONG64 */ 3571 TEST_TYPE_SIZE (LONG64, 8) 3572 TEST_TYPE_ALIGN (LONG64, 8) 3573 TEST_TYPE_SIGNED(LONG64) 3574 } 3575 3576 static void test_pack_LONG_PTR(void) 3577 { 3578 /* LONG_PTR */ 3579 TEST_TYPE_SIZE (LONG_PTR, 4) 3580 TEST_TYPE_ALIGN (LONG_PTR, 4) 3581 TEST_TYPE_SIGNED(LONG_PTR) 3582 } 3583 3584 static void test_pack_SIZE_T(void) 3585 { 3586 /* SIZE_T */ 3587 TEST_TYPE_SIZE (SIZE_T, 4) 3588 TEST_TYPE_ALIGN (SIZE_T, 4) 3589 } 3590 3591 static void test_pack_SSIZE_T(void) 3592 { 3593 /* SSIZE_T */ 3594 TEST_TYPE_SIZE (SSIZE_T, 4) 3595 TEST_TYPE_ALIGN (SSIZE_T, 4) 3596 } 3597 3598 static void test_pack_UHALF_PTR(void) 3599 { 3600 /* UHALF_PTR */ 3601 TEST_TYPE_SIZE (UHALF_PTR, 2) 3602 TEST_TYPE_ALIGN (UHALF_PTR, 2) 3603 TEST_TYPE_UNSIGNED(UHALF_PTR) 3604 } 3605 3606 static void test_pack_UINT16(void) 3607 { 3608 /* UINT16 */ 3609 TEST_TYPE_SIZE (UINT16, 2) 3610 TEST_TYPE_ALIGN (UINT16, 2) 3611 TEST_TYPE_UNSIGNED(UINT16) 3612 } 3613 3614 static void test_pack_UINT32(void) 3615 { 3616 /* UINT32 */ 3617 TEST_TYPE_SIZE (UINT32, 4) 3618 TEST_TYPE_ALIGN (UINT32, 4) 3619 TEST_TYPE_UNSIGNED(UINT32) 3620 } 3621 3622 static void test_pack_UINT64(void) 3623 { 3624 /* UINT64 */ 3625 TEST_TYPE_SIZE (UINT64, 8) 3626 TEST_TYPE_ALIGN (UINT64, 8) 3627 TEST_TYPE_UNSIGNED(UINT64) 3628 } 3629 3630 static void test_pack_UINT8(void) 3631 { 3632 /* UINT8 */ 3633 TEST_TYPE_SIZE (UINT8, 1) 3634 TEST_TYPE_ALIGN (UINT8, 1) 3635 TEST_TYPE_UNSIGNED(UINT8) 3636 } 3637 3638 static void test_pack_UINT_PTR(void) 3639 { 3640 /* UINT_PTR */ 3641 TEST_TYPE_SIZE (UINT_PTR, 4) 3642 TEST_TYPE_ALIGN (UINT_PTR, 4) 3643 TEST_TYPE_UNSIGNED(UINT_PTR) 3644 } 3645 3646 static void test_pack_ULONG32(void) 3647 { 3648 /* ULONG32 */ 3649 TEST_TYPE_SIZE (ULONG32, 4) 3650 TEST_TYPE_ALIGN (ULONG32, 4) 3651 TEST_TYPE_UNSIGNED(ULONG32) 3652 } 3653 3654 static void test_pack_ULONG64(void) 3655 { 3656 /* ULONG64 */ 3657 TEST_TYPE_SIZE (ULONG64, 8) 3658 TEST_TYPE_ALIGN (ULONG64, 8) 3659 TEST_TYPE_UNSIGNED(ULONG64) 3660 } 3661 3662 static void test_pack_ULONG_PTR(void) 3663 { 3664 /* ULONG_PTR */ 3665 TEST_TYPE_SIZE (ULONG_PTR, 4) 3666 TEST_TYPE_ALIGN (ULONG_PTR, 4) 3667 TEST_TYPE_UNSIGNED(ULONG_PTR) 3668 } 3669 3670 static void test_pack_ACCESS_ALLOWED_ACE(void) 3671 { 3672 /* ACCESS_ALLOWED_ACE */ 3673 TEST_TYPE_SIZE (ACCESS_ALLOWED_ACE, 12) 3674 TEST_TYPE_ALIGN (ACCESS_ALLOWED_ACE, 4) 3675 TEST_FIELD_SIZE (ACCESS_ALLOWED_ACE, Header, 4) 3676 TEST_FIELD_ALIGN (ACCESS_ALLOWED_ACE, Header, 2) 3677 TEST_FIELD_OFFSET(ACCESS_ALLOWED_ACE, Header, 0) 3678 TEST_FIELD_SIZE (ACCESS_ALLOWED_ACE, Mask, 4) 3679 TEST_FIELD_ALIGN (ACCESS_ALLOWED_ACE, Mask, 4) 3680 TEST_FIELD_OFFSET(ACCESS_ALLOWED_ACE, Mask, 4) 3681 TEST_FIELD_SIZE (ACCESS_ALLOWED_ACE, SidStart, 4) 3682 TEST_FIELD_ALIGN (ACCESS_ALLOWED_ACE, SidStart, 4) 3683 TEST_FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart, 8) 3684 } 3685 3686 static void test_pack_ACCESS_DENIED_ACE(void) 3687 { 3688 /* ACCESS_DENIED_ACE */ 3689 TEST_TYPE_SIZE (ACCESS_DENIED_ACE, 12) 3690 TEST_TYPE_ALIGN (ACCESS_DENIED_ACE, 4) 3691 TEST_FIELD_SIZE (ACCESS_DENIED_ACE, Header, 4) 3692 TEST_FIELD_ALIGN (ACCESS_DENIED_ACE, Header, 2) 3693 TEST_FIELD_OFFSET(ACCESS_DENIED_ACE, Header, 0) 3694 TEST_FIELD_SIZE (ACCESS_DENIED_ACE, Mask, 4) 3695 TEST_FIELD_ALIGN (ACCESS_DENIED_ACE, Mask, 4) 3696 TEST_FIELD_OFFSET(ACCESS_DENIED_ACE, Mask, 4) 3697 TEST_FIELD_SIZE (ACCESS_DENIED_ACE, SidStart, 4) 3698 TEST_FIELD_ALIGN (ACCESS_DENIED_ACE, SidStart, 4) 3699 TEST_FIELD_OFFSET(ACCESS_DENIED_ACE, SidStart, 8) 3700 } 3701 3702 static void test_pack_ACCESS_MASK(void) 3703 { 3704 /* ACCESS_MASK */ 3705 TEST_TYPE_SIZE (ACCESS_MASK, 4) 3706 TEST_TYPE_ALIGN (ACCESS_MASK, 4) 3707 TEST_TYPE_UNSIGNED(ACCESS_MASK) 3708 } 3709 3710 static void test_pack_ACE_HEADER(void) 3711 { 3712 /* ACE_HEADER */ 3713 TEST_TYPE_SIZE (ACE_HEADER, 4) 3714 TEST_TYPE_ALIGN (ACE_HEADER, 2) 3715 TEST_FIELD_SIZE (ACE_HEADER, AceType, 1) 3716 TEST_FIELD_ALIGN (ACE_HEADER, AceType, 1) 3717 TEST_FIELD_OFFSET(ACE_HEADER, AceType, 0) 3718 TEST_FIELD_SIZE (ACE_HEADER, AceFlags, 1) 3719 TEST_FIELD_ALIGN (ACE_HEADER, AceFlags, 1) 3720 TEST_FIELD_OFFSET(ACE_HEADER, AceFlags, 1) 3721 TEST_FIELD_SIZE (ACE_HEADER, AceSize, 2) 3722 TEST_FIELD_ALIGN (ACE_HEADER, AceSize, 2) 3723 TEST_FIELD_OFFSET(ACE_HEADER, AceSize, 2) 3724 } 3725 3726 static void test_pack_ACL(void) 3727 { 3728 /* ACL */ 3729 TEST_TYPE_SIZE (ACL, 8) 3730 TEST_TYPE_ALIGN (ACL, 2) 3731 TEST_FIELD_SIZE (ACL, AclRevision, 1) 3732 TEST_FIELD_ALIGN (ACL, AclRevision, 1) 3733 TEST_FIELD_OFFSET(ACL, AclRevision, 0) 3734 TEST_FIELD_SIZE (ACL, Sbz1, 1) 3735 TEST_FIELD_ALIGN (ACL, Sbz1, 1) 3736 TEST_FIELD_OFFSET(ACL, Sbz1, 1) 3737 TEST_FIELD_SIZE (ACL, AclSize, 2) 3738 TEST_FIELD_ALIGN (ACL, AclSize, 2) 3739 TEST_FIELD_OFFSET(ACL, AclSize, 2) 3740 TEST_FIELD_SIZE (ACL, AceCount, 2) 3741 TEST_FIELD_ALIGN (ACL, AceCount, 2) 3742 TEST_FIELD_OFFSET(ACL, AceCount, 4) 3743 TEST_FIELD_SIZE (ACL, Sbz2, 2) 3744 TEST_FIELD_ALIGN (ACL, Sbz2, 2) 3745 TEST_FIELD_OFFSET(ACL, Sbz2, 6) 3746 } 3747 3748 static void test_pack_ACL_REVISION_INFORMATION(void) 3749 { 3750 /* ACL_REVISION_INFORMATION */ 3751 TEST_TYPE_SIZE (ACL_REVISION_INFORMATION, 4) 3752 TEST_TYPE_ALIGN (ACL_REVISION_INFORMATION, 4) 3753 TEST_FIELD_SIZE (ACL_REVISION_INFORMATION, AclRevision, 4) 3754 TEST_FIELD_ALIGN (ACL_REVISION_INFORMATION, AclRevision, 4) 3755 TEST_FIELD_OFFSET(ACL_REVISION_INFORMATION, AclRevision, 0) 3756 } 3757 3758 static void test_pack_ACL_SIZE_INFORMATION(void) 3759 { 3760 /* ACL_SIZE_INFORMATION */ 3761 TEST_TYPE_SIZE (ACL_SIZE_INFORMATION, 12) 3762 TEST_TYPE_ALIGN (ACL_SIZE_INFORMATION, 4) 3763 TEST_FIELD_SIZE (ACL_SIZE_INFORMATION, AceCount, 4) 3764 TEST_FIELD_ALIGN (ACL_SIZE_INFORMATION, AceCount, 4) 3765 TEST_FIELD_OFFSET(ACL_SIZE_INFORMATION, AceCount, 0) 3766 TEST_FIELD_SIZE (ACL_SIZE_INFORMATION, AclBytesInUse, 4) 3767 TEST_FIELD_ALIGN (ACL_SIZE_INFORMATION, AclBytesInUse, 4) 3768 TEST_FIELD_OFFSET(ACL_SIZE_INFORMATION, AclBytesInUse, 4) 3769 TEST_FIELD_SIZE (ACL_SIZE_INFORMATION, AclBytesFree, 4) 3770 TEST_FIELD_ALIGN (ACL_SIZE_INFORMATION, AclBytesFree, 4) 3771 TEST_FIELD_OFFSET(ACL_SIZE_INFORMATION, AclBytesFree, 8) 3772 } 3773 3774 static void test_pack_BOOLEAN(void) 3775 { 3776 /* BOOLEAN */ 3777 TEST_TYPE_SIZE (BOOLEAN, 1) 3778 TEST_TYPE_ALIGN (BOOLEAN, 1) 3779 TEST_TYPE_UNSIGNED(BOOLEAN) 3780 } 3781 3782 static void test_pack_CCHAR(void) 3783 { 3784 /* CCHAR */ 3785 TEST_TYPE_SIZE (CCHAR, 1) 3786 TEST_TYPE_ALIGN (CCHAR, 1) 3787 } 3788 3789 static void test_pack_CHAR(void) 3790 { 3791 /* CHAR */ 3792 TEST_TYPE_SIZE (CHAR, 1) 3793 TEST_TYPE_ALIGN (CHAR, 1) 3794 } 3795 3796 static void test_pack_DWORDLONG(void) 3797 { 3798 /* DWORDLONG */ 3799 TEST_TYPE_SIZE (DWORDLONG, 8) 3800 TEST_TYPE_ALIGN (DWORDLONG, 8) 3801 TEST_TYPE_UNSIGNED(DWORDLONG) 3802 } 3803 3804 static void test_pack_EXCEPTION_POINTERS(void) 3805 { 3806 /* EXCEPTION_POINTERS */ 3807 TEST_TYPE_SIZE (EXCEPTION_POINTERS, 8) 3808 TEST_TYPE_ALIGN (EXCEPTION_POINTERS, 4) 3809 TEST_FIELD_SIZE (EXCEPTION_POINTERS, ExceptionRecord, 4) 3810 TEST_FIELD_ALIGN (EXCEPTION_POINTERS, ExceptionRecord, 4) 3811 TEST_FIELD_OFFSET(EXCEPTION_POINTERS, ExceptionRecord, 0) 3812 TEST_FIELD_SIZE (EXCEPTION_POINTERS, ContextRecord, 4) 3813 TEST_FIELD_ALIGN (EXCEPTION_POINTERS, ContextRecord, 4) 3814 TEST_FIELD_OFFSET(EXCEPTION_POINTERS, ContextRecord, 4) 3815 } 3816 3817 static void test_pack_EXCEPTION_RECORD(void) 3818 { 3819 /* EXCEPTION_RECORD */ 3820 TEST_TYPE_SIZE (EXCEPTION_RECORD, 80) 3821 TEST_TYPE_ALIGN (EXCEPTION_RECORD, 4) 3822 TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionCode, 4) 3823 TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionCode, 4) 3824 TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionCode, 0) 3825 TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionFlags, 4) 3826 TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionFlags, 4) 3827 TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionFlags, 4) 3828 TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionRecord, 4) 3829 TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionRecord, 4) 3830 TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionRecord, 8) 3831 TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionAddress, 4) 3832 TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionAddress, 4) 3833 TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionAddress, 12) 3834 TEST_FIELD_SIZE (EXCEPTION_RECORD, NumberParameters, 4) 3835 TEST_FIELD_ALIGN (EXCEPTION_RECORD, NumberParameters, 4) 3836 TEST_FIELD_OFFSET(EXCEPTION_RECORD, NumberParameters, 16) 3837 TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionInformation, 60) 3838 TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionInformation, 4) 3839 TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionInformation, 20) 3840 } 3841 3842 static void test_pack_EXECUTION_STATE(void) 3843 { 3844 /* EXECUTION_STATE */ 3845 TEST_TYPE_SIZE (EXECUTION_STATE, 4) 3846 TEST_TYPE_ALIGN (EXECUTION_STATE, 4) 3847 TEST_TYPE_UNSIGNED(EXECUTION_STATE) 3848 } 3849 3850 static void test_pack_FPO_DATA(void) 3851 { 3852 /* FPO_DATA */ 3853 TEST_TYPE_SIZE (FPO_DATA, 16) 3854 TEST_TYPE_ALIGN (FPO_DATA, 4) 3855 TEST_FIELD_SIZE (FPO_DATA, ulOffStart, 4) 3856 TEST_FIELD_ALIGN (FPO_DATA, ulOffStart, 4) 3857 TEST_FIELD_OFFSET(FPO_DATA, ulOffStart, 0) 3858 TEST_FIELD_SIZE (FPO_DATA, cbProcSize, 4) 3859 TEST_FIELD_ALIGN (FPO_DATA, cbProcSize, 4) 3860 TEST_FIELD_OFFSET(FPO_DATA, cbProcSize, 4) 3861 TEST_FIELD_SIZE (FPO_DATA, cdwLocals, 4) 3862 TEST_FIELD_ALIGN (FPO_DATA, cdwLocals, 4) 3863 TEST_FIELD_OFFSET(FPO_DATA, cdwLocals, 8) 3864 TEST_FIELD_SIZE (FPO_DATA, cdwParams, 2) 3865 TEST_FIELD_ALIGN (FPO_DATA, cdwParams, 2) 3866 TEST_FIELD_OFFSET(FPO_DATA, cdwParams, 12) 3867 } 3868 3869 static void test_pack_GENERIC_MAPPING(void) 3870 { 3871 /* GENERIC_MAPPING */ 3872 TEST_TYPE_SIZE (GENERIC_MAPPING, 16) 3873 TEST_TYPE_ALIGN (GENERIC_MAPPING, 4) 3874 TEST_FIELD_SIZE (GENERIC_MAPPING, GenericRead, 4) 3875 TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericRead, 4) 3876 TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericRead, 0) 3877 TEST_FIELD_SIZE (GENERIC_MAPPING, GenericWrite, 4) 3878 TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericWrite, 4) 3879 TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericWrite, 4) 3880 TEST_FIELD_SIZE (GENERIC_MAPPING, GenericExecute, 4) 3881 TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericExecute, 4) 3882 TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericExecute, 8) 3883 TEST_FIELD_SIZE (GENERIC_MAPPING, GenericAll, 4) 3884 TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericAll, 4) 3885 TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericAll, 12) 3886 } 3887 3888 static void test_pack_HANDLE(void) 3889 { 3890 /* HANDLE */ 3891 TEST_TYPE_SIZE (HANDLE, 4) 3892 TEST_TYPE_ALIGN (HANDLE, 4) 3893 } 3894 3895 static void test_pack_HRESULT(void) 3896 { 3897 /* HRESULT */ 3898 TEST_TYPE_SIZE (HRESULT, 4) 3899 TEST_TYPE_ALIGN (HRESULT, 4) 3900 } 3901 3902 static void test_pack_IMAGE_ARCHIVE_MEMBER_HEADER(void) 3903 { 3904 /* IMAGE_ARCHIVE_MEMBER_HEADER */ 3905 TEST_TYPE_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, 60) 3906 TEST_TYPE_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, 1) 3907 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Name, 16) 3908 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Name, 1) 3909 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Name, 0) 3910 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Date, 12) 3911 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Date, 1) 3912 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Date, 16) 3913 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, UserID, 6) 3914 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, UserID, 1) 3915 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, UserID, 28) 3916 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, GroupID, 6) 3917 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, GroupID, 1) 3918 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, GroupID, 34) 3919 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Mode, 8) 3920 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Mode, 1) 3921 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Mode, 40) 3922 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Size, 10) 3923 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Size, 1) 3924 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Size, 48) 3925 TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, EndHeader, 2) 3926 TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, EndHeader, 1) 3927 TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, EndHeader, 58) 3928 } 3929 3930 static void test_pack_IMAGE_AUX_SYMBOL(void) 3931 { 3932 /* IMAGE_AUX_SYMBOL (pack 2) */ 3933 } 3934 3935 static void test_pack_IMAGE_BASE_RELOCATION(void) 3936 { 3937 /* IMAGE_BASE_RELOCATION */ 3938 TEST_TYPE_SIZE (IMAGE_BASE_RELOCATION, 8) 3939 TEST_TYPE_ALIGN (IMAGE_BASE_RELOCATION, 4) 3940 TEST_FIELD_SIZE (IMAGE_BASE_RELOCATION, VirtualAddress, 4) 3941 TEST_FIELD_ALIGN (IMAGE_BASE_RELOCATION, VirtualAddress, 4) 3942 TEST_FIELD_OFFSET(IMAGE_BASE_RELOCATION, VirtualAddress, 0) 3943 TEST_FIELD_SIZE (IMAGE_BASE_RELOCATION, SizeOfBlock, 4) 3944 TEST_FIELD_ALIGN (IMAGE_BASE_RELOCATION, SizeOfBlock, 4) 3945 TEST_FIELD_OFFSET(IMAGE_BASE_RELOCATION, SizeOfBlock, 4) 3946 } 3947 3948 static void test_pack_IMAGE_BOUND_FORWARDER_REF(void) 3949 { 3950 /* IMAGE_BOUND_FORWARDER_REF */ 3951 TEST_TYPE_SIZE (IMAGE_BOUND_FORWARDER_REF, 8) 3952 TEST_TYPE_ALIGN (IMAGE_BOUND_FORWARDER_REF, 4) 3953 TEST_FIELD_SIZE (IMAGE_BOUND_FORWARDER_REF, TimeDateStamp, 4) 3954 TEST_FIELD_ALIGN (IMAGE_BOUND_FORWARDER_REF, TimeDateStamp, 4) 3955 TEST_FIELD_OFFSET(IMAGE_BOUND_FORWARDER_REF, TimeDateStamp, 0) 3956 TEST_FIELD_SIZE (IMAGE_BOUND_FORWARDER_REF, OffsetModuleName, 2) 3957 TEST_FIELD_ALIGN (IMAGE_BOUND_FORWARDER_REF, OffsetModuleName, 2) 3958 TEST_FIELD_OFFSET(IMAGE_BOUND_FORWARDER_REF, OffsetModuleName, 4) 3959 TEST_FIELD_SIZE (IMAGE_BOUND_FORWARDER_REF, Reserved, 2) 3960 TEST_FIELD_ALIGN (IMAGE_BOUND_FORWARDER_REF, Reserved, 2) 3961 TEST_FIELD_OFFSET(IMAGE_BOUND_FORWARDER_REF, Reserved, 6) 3962 } 3963 3964 static void test_pack_IMAGE_BOUND_IMPORT_DESCRIPTOR(void) 3965 { 3966 /* IMAGE_BOUND_IMPORT_DESCRIPTOR */ 3967 TEST_TYPE_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, 8) 3968 TEST_TYPE_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, 4) 3969 TEST_FIELD_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, TimeDateStamp, 4) 3970 TEST_FIELD_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, TimeDateStamp, 4) 3971 TEST_FIELD_OFFSET(IMAGE_BOUND_IMPORT_DESCRIPTOR, TimeDateStamp, 0) 3972 TEST_FIELD_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, OffsetModuleName, 2) 3973 TEST_FIELD_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, OffsetModuleName, 2) 3974 TEST_FIELD_OFFSET(IMAGE_BOUND_IMPORT_DESCRIPTOR, OffsetModuleName, 4) 3975 TEST_FIELD_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, NumberOfModuleForwarderRefs, 2) 3976 TEST_FIELD_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, NumberOfModuleForwarderRefs, 2) 3977 TEST_FIELD_OFFSET(IMAGE_BOUND_IMPORT_DESCRIPTOR, NumberOfModuleForwarderRefs, 6) 3978 } 3979 3980 static void test_pack_IMAGE_COFF_SYMBOLS_HEADER(void) 3981 { 3982 /* IMAGE_COFF_SYMBOLS_HEADER */ 3983 TEST_TYPE_SIZE (IMAGE_COFF_SYMBOLS_HEADER, 32) 3984 TEST_TYPE_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, 4) 3985 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, NumberOfSymbols, 4) 3986 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, NumberOfSymbols, 4) 3987 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, NumberOfSymbols, 0) 3988 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstSymbol, 4) 3989 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstSymbol, 4) 3990 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstSymbol, 4) 3991 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, NumberOfLinenumbers, 4) 3992 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, NumberOfLinenumbers, 4) 3993 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, NumberOfLinenumbers, 8) 3994 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstLinenumber, 4) 3995 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstLinenumber, 4) 3996 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstLinenumber, 12) 3997 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfCode, 4) 3998 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfCode, 4) 3999 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfCode, 16) 4000 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfCode, 4) 4001 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfCode, 4) 4002 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfCode, 20) 4003 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfData, 4) 4004 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfData, 4) 4005 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfData, 24) 4006 TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfData, 4) 4007 TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfData, 4) 4008 TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfData, 28) 4009 } 4010 4011 static void test_pack_IMAGE_DATA_DIRECTORY(void) 4012 { 4013 /* IMAGE_DATA_DIRECTORY */ 4014 TEST_TYPE_SIZE (IMAGE_DATA_DIRECTORY, 8) 4015 TEST_TYPE_ALIGN (IMAGE_DATA_DIRECTORY, 4) 4016 TEST_FIELD_SIZE (IMAGE_DATA_DIRECTORY, VirtualAddress, 4) 4017 TEST_FIELD_ALIGN (IMAGE_DATA_DIRECTORY, VirtualAddress, 4) 4018 TEST_FIELD_OFFSET(IMAGE_DATA_DIRECTORY, VirtualAddress, 0) 4019 TEST_FIELD_SIZE (IMAGE_DATA_DIRECTORY, Size, 4) 4020 TEST_FIELD_ALIGN (IMAGE_DATA_DIRECTORY, Size, 4) 4021 TEST_FIELD_OFFSET(IMAGE_DATA_DIRECTORY, Size, 4) 4022 } 4023 4024 static void test_pack_IMAGE_DEBUG_DIRECTORY(void) 4025 { 4026 /* IMAGE_DEBUG_DIRECTORY */ 4027 TEST_TYPE_SIZE (IMAGE_DEBUG_DIRECTORY, 28) 4028 TEST_TYPE_ALIGN (IMAGE_DEBUG_DIRECTORY, 4) 4029 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, Characteristics, 4) 4030 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, Characteristics, 4) 4031 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, Characteristics, 0) 4032 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, TimeDateStamp, 4) 4033 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, TimeDateStamp, 4) 4034 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, TimeDateStamp, 4) 4035 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, MajorVersion, 2) 4036 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, MajorVersion, 2) 4037 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, MajorVersion, 8) 4038 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, MinorVersion, 2) 4039 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, MinorVersion, 2) 4040 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, MinorVersion, 10) 4041 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, Type, 4) 4042 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, Type, 4) 4043 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, Type, 12) 4044 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, SizeOfData, 4) 4045 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, SizeOfData, 4) 4046 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, SizeOfData, 16) 4047 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, AddressOfRawData, 4) 4048 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, AddressOfRawData, 4) 4049 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, AddressOfRawData, 20) 4050 TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, PointerToRawData, 4) 4051 TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, PointerToRawData, 4) 4052 TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, PointerToRawData, 24) 4053 } 4054 4055 static void test_pack_IMAGE_DEBUG_MISC(void) 4056 { 4057 /* IMAGE_DEBUG_MISC */ 4058 TEST_TYPE_SIZE (IMAGE_DEBUG_MISC, 16) 4059 TEST_TYPE_ALIGN (IMAGE_DEBUG_MISC, 4) 4060 TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, DataType, 4) 4061 TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, DataType, 4) 4062 TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, DataType, 0) 4063 TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Length, 4) 4064 TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Length, 4) 4065 TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Length, 4) 4066 TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Unicode, 1) 4067 TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Unicode, 1) 4068 TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Unicode, 8) 4069 TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Reserved, 3) 4070 TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Reserved, 1) 4071 TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Reserved, 9) 4072 TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Data, 1) 4073 TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Data, 1) 4074 TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Data, 12) 4075 } 4076 4077 static void test_pack_IMAGE_DOS_HEADER(void) 4078 { 4079 /* IMAGE_DOS_HEADER (pack 2) */ 4080 TEST_TYPE_SIZE (IMAGE_DOS_HEADER, 64) 4081 TEST_TYPE_ALIGN (IMAGE_DOS_HEADER, 2) 4082 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_magic, 2) 4083 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_magic, 2) 4084 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_magic, 0) 4085 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cblp, 2) 4086 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cblp, 2) 4087 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cblp, 2) 4088 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cp, 2) 4089 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cp, 2) 4090 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cp, 4) 4091 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_crlc, 2) 4092 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_crlc, 2) 4093 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_crlc, 6) 4094 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cparhdr, 2) 4095 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cparhdr, 2) 4096 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cparhdr, 8) 4097 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_minalloc, 2) 4098 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_minalloc, 2) 4099 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_minalloc, 10) 4100 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_maxalloc, 2) 4101 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_maxalloc, 2) 4102 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_maxalloc, 12) 4103 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_ss, 2) 4104 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_ss, 2) 4105 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_ss, 14) 4106 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_sp, 2) 4107 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_sp, 2) 4108 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_sp, 16) 4109 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_csum, 2) 4110 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_csum, 2) 4111 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_csum, 18) 4112 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_ip, 2) 4113 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_ip, 2) 4114 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_ip, 20) 4115 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cs, 2) 4116 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cs, 2) 4117 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cs, 22) 4118 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_lfarlc, 2) 4119 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_lfarlc, 2) 4120 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_lfarlc, 24) 4121 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_ovno, 2) 4122 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_ovno, 2) 4123 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_ovno, 26) 4124 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_res, 8) 4125 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_res, 2) 4126 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_res, 28) 4127 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_oemid, 2) 4128 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_oemid, 2) 4129 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_oemid, 36) 4130 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_oeminfo, 2) 4131 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_oeminfo, 2) 4132 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_oeminfo, 38) 4133 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_res2, 20) 4134 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_res2, 2) 4135 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_res2, 40) 4136 TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_lfanew, 4) 4137 TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_lfanew, 2) 4138 TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_lfanew, 60) 4139 } 4140 4141 static void test_pack_IMAGE_EXPORT_DIRECTORY(void) 4142 { 4143 /* IMAGE_EXPORT_DIRECTORY */ 4144 TEST_TYPE_SIZE (IMAGE_EXPORT_DIRECTORY, 40) 4145 TEST_TYPE_ALIGN (IMAGE_EXPORT_DIRECTORY, 4) 4146 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, Characteristics, 4) 4147 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, Characteristics, 4) 4148 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, Characteristics, 0) 4149 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, TimeDateStamp, 4) 4150 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, TimeDateStamp, 4) 4151 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, TimeDateStamp, 4) 4152 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, MajorVersion, 2) 4153 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, MajorVersion, 2) 4154 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, MajorVersion, 8) 4155 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, MinorVersion, 2) 4156 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, MinorVersion, 2) 4157 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, MinorVersion, 10) 4158 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, Name, 4) 4159 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, Name, 4) 4160 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, Name, 12) 4161 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, Base, 4) 4162 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, Base, 4) 4163 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, Base, 16) 4164 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, NumberOfFunctions, 4) 4165 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, NumberOfFunctions, 4) 4166 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, NumberOfFunctions, 20) 4167 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, NumberOfNames, 4) 4168 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, NumberOfNames, 4) 4169 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, NumberOfNames, 24) 4170 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, AddressOfFunctions, 4) 4171 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, AddressOfFunctions, 4) 4172 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, AddressOfFunctions, 28) 4173 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, AddressOfNames, 4) 4174 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, AddressOfNames, 4) 4175 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, AddressOfNames, 32) 4176 TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, AddressOfNameOrdinals, 4) 4177 TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, AddressOfNameOrdinals, 4) 4178 TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, AddressOfNameOrdinals, 36) 4179 } 4180 4181 static void test_pack_IMAGE_FILE_HEADER(void) 4182 { 4183 /* IMAGE_FILE_HEADER */ 4184 TEST_TYPE_SIZE (IMAGE_FILE_HEADER, 20) 4185 TEST_TYPE_ALIGN (IMAGE_FILE_HEADER, 4) 4186 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, Machine, 2) 4187 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, Machine, 2) 4188 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, Machine, 0) 4189 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, NumberOfSections, 2) 4190 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, NumberOfSections, 2) 4191 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, NumberOfSections, 2) 4192 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, TimeDateStamp, 4) 4193 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, TimeDateStamp, 4) 4194 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, TimeDateStamp, 4) 4195 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, PointerToSymbolTable, 4) 4196 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, PointerToSymbolTable, 4) 4197 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, PointerToSymbolTable, 8) 4198 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, NumberOfSymbols, 4) 4199 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, NumberOfSymbols, 4) 4200 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, NumberOfSymbols, 12) 4201 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, SizeOfOptionalHeader, 2) 4202 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, SizeOfOptionalHeader, 2) 4203 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, SizeOfOptionalHeader, 16) 4204 TEST_FIELD_SIZE (IMAGE_FILE_HEADER, Characteristics, 2) 4205 TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, Characteristics, 2) 4206 TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, Characteristics, 18) 4207 } 4208 4209 static void test_pack_IMAGE_FUNCTION_ENTRY(void) 4210 { 4211 /* IMAGE_FUNCTION_ENTRY */ 4212 TEST_TYPE_SIZE (IMAGE_FUNCTION_ENTRY, 12) 4213 TEST_TYPE_ALIGN (IMAGE_FUNCTION_ENTRY, 4) 4214 TEST_FIELD_SIZE (IMAGE_FUNCTION_ENTRY, StartingAddress, 4) 4215 TEST_FIELD_ALIGN (IMAGE_FUNCTION_ENTRY, StartingAddress, 4) 4216 TEST_FIELD_OFFSET(IMAGE_FUNCTION_ENTRY, StartingAddress, 0) 4217 TEST_FIELD_SIZE (IMAGE_FUNCTION_ENTRY, EndingAddress, 4) 4218 TEST_FIELD_ALIGN (IMAGE_FUNCTION_ENTRY, EndingAddress, 4) 4219 TEST_FIELD_OFFSET(IMAGE_FUNCTION_ENTRY, EndingAddress, 4) 4220 TEST_FIELD_SIZE (IMAGE_FUNCTION_ENTRY, EndOfPrologue, 4) 4221 TEST_FIELD_ALIGN (IMAGE_FUNCTION_ENTRY, EndOfPrologue, 4) 4222 TEST_FIELD_OFFSET(IMAGE_FUNCTION_ENTRY, EndOfPrologue, 8) 4223 } 4224 4225 static void test_pack_IMAGE_IMPORT_BY_NAME(void) 4226 { 4227 /* IMAGE_IMPORT_BY_NAME */ 4228 TEST_TYPE_SIZE (IMAGE_IMPORT_BY_NAME, 4) 4229 TEST_TYPE_ALIGN (IMAGE_IMPORT_BY_NAME, 2) 4230 TEST_FIELD_SIZE (IMAGE_IMPORT_BY_NAME, Hint, 2) 4231 TEST_FIELD_ALIGN (IMAGE_IMPORT_BY_NAME, Hint, 2) 4232 TEST_FIELD_OFFSET(IMAGE_IMPORT_BY_NAME, Hint, 0) 4233 TEST_FIELD_SIZE (IMAGE_IMPORT_BY_NAME, Name, 1) 4234 TEST_FIELD_ALIGN (IMAGE_IMPORT_BY_NAME, Name, 1) 4235 TEST_FIELD_OFFSET(IMAGE_IMPORT_BY_NAME, Name, 2) 4236 } 4237 4238 static void test_pack_IMAGE_IMPORT_DESCRIPTOR(void) 4239 { 4240 /* IMAGE_IMPORT_DESCRIPTOR */ 4241 } 4242 4243 static void test_pack_IMAGE_LINENUMBER(void) 4244 { 4245 /* IMAGE_LINENUMBER (pack 2) */ 4246 } 4247 4248 static void test_pack_IMAGE_LOAD_CONFIG_DIRECTORY(void) 4249 { 4250 /* IMAGE_LOAD_CONFIG_DIRECTORY */ 4251 TEST_TYPE_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, 72) 4252 TEST_TYPE_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, 4) 4253 } 4254 4255 static void test_pack_IMAGE_LOAD_CONFIG_DIRECTORY32(void) 4256 { 4257 /* IMAGE_LOAD_CONFIG_DIRECTORY32 */ 4258 TEST_TYPE_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, 72) 4259 TEST_TYPE_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, 4) 4260 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, Size, 4) 4261 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, Size, 4) 4262 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, Size, 0) 4263 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, TimeDateStamp, 4) 4264 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, TimeDateStamp, 4) 4265 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, TimeDateStamp, 4) 4266 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, MajorVersion, 2) 4267 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, MajorVersion, 2) 4268 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, MajorVersion, 8) 4269 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, MinorVersion, 2) 4270 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, MinorVersion, 2) 4271 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, MinorVersion, 10) 4272 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, GlobalFlagsClear, 4) 4273 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, GlobalFlagsClear, 4) 4274 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, GlobalFlagsClear, 12) 4275 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, GlobalFlagsSet, 4) 4276 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, GlobalFlagsSet, 4) 4277 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, GlobalFlagsSet, 16) 4278 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, CriticalSectionDefaultTimeout, 4) 4279 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, CriticalSectionDefaultTimeout, 4) 4280 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, CriticalSectionDefaultTimeout, 20) 4281 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, DeCommitFreeBlockThreshold, 4) 4282 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, DeCommitFreeBlockThreshold, 4) 4283 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, DeCommitFreeBlockThreshold, 24) 4284 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, DeCommitTotalFreeThreshold, 4) 4285 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, DeCommitTotalFreeThreshold, 4) 4286 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, DeCommitTotalFreeThreshold, 28) 4287 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, LockPrefixTable, 4) 4288 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, LockPrefixTable, 4) 4289 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, LockPrefixTable, 32) 4290 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, MaximumAllocationSize, 4) 4291 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, MaximumAllocationSize, 4) 4292 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, MaximumAllocationSize, 36) 4293 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, VirtualMemoryThreshold, 4) 4294 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, VirtualMemoryThreshold, 4) 4295 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, VirtualMemoryThreshold, 40) 4296 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, ProcessHeapFlags, 4) 4297 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, ProcessHeapFlags, 4) 4298 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, ProcessHeapFlags, 44) 4299 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, ProcessAffinityMask, 4) 4300 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, ProcessAffinityMask, 4) 4301 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, ProcessAffinityMask, 48) 4302 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, CSDVersion, 2) 4303 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, CSDVersion, 2) 4304 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, CSDVersion, 52) 4305 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, Reserved1, 2) 4306 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, Reserved1, 2) 4307 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, Reserved1, 54) 4308 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, EditList, 4) 4309 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, EditList, 4) 4310 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, EditList, 56) 4311 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, SecurityCookie, 4) 4312 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, SecurityCookie, 4) 4313 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, SecurityCookie, 60) 4314 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, SEHandlerTable, 4) 4315 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, SEHandlerTable, 4) 4316 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, SEHandlerTable, 64) 4317 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY32, SEHandlerCount, 4) 4318 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY32, SEHandlerCount, 4) 4319 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY32, SEHandlerCount, 68) 4320 } 4321 4322 static void test_pack_IMAGE_LOAD_CONFIG_DIRECTORY64(void) 4323 { 4324 /* IMAGE_LOAD_CONFIG_DIRECTORY64 */ 4325 TEST_TYPE_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, 112) 4326 TEST_TYPE_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, 8) 4327 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, Size, 4) 4328 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, Size, 4) 4329 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, Size, 0) 4330 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, TimeDateStamp, 4) 4331 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, TimeDateStamp, 4) 4332 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, TimeDateStamp, 4) 4333 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, MajorVersion, 2) 4334 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, MajorVersion, 2) 4335 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, MajorVersion, 8) 4336 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, MinorVersion, 2) 4337 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, MinorVersion, 2) 4338 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, MinorVersion, 10) 4339 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, GlobalFlagsClear, 4) 4340 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, GlobalFlagsClear, 4) 4341 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, GlobalFlagsClear, 12) 4342 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, GlobalFlagsSet, 4) 4343 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, GlobalFlagsSet, 4) 4344 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, GlobalFlagsSet, 16) 4345 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, CriticalSectionDefaultTimeout, 4) 4346 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, CriticalSectionDefaultTimeout, 4) 4347 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, CriticalSectionDefaultTimeout, 20) 4348 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, DeCommitFreeBlockThreshold, 8) 4349 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, DeCommitFreeBlockThreshold, 8) 4350 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, DeCommitFreeBlockThreshold, 24) 4351 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, DeCommitTotalFreeThreshold, 8) 4352 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, DeCommitTotalFreeThreshold, 8) 4353 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, DeCommitTotalFreeThreshold, 32) 4354 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, LockPrefixTable, 8) 4355 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, LockPrefixTable, 8) 4356 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, LockPrefixTable, 40) 4357 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, MaximumAllocationSize, 8) 4358 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, MaximumAllocationSize, 8) 4359 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, MaximumAllocationSize, 48) 4360 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, VirtualMemoryThreshold, 8) 4361 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, VirtualMemoryThreshold, 8) 4362 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, VirtualMemoryThreshold, 56) 4363 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, ProcessAffinityMask, 8) 4364 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, ProcessAffinityMask, 8) 4365 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, ProcessAffinityMask, 64) 4366 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, ProcessHeapFlags, 4) 4367 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, ProcessHeapFlags, 4) 4368 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, ProcessHeapFlags, 72) 4369 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, CSDVersion, 2) 4370 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, CSDVersion, 2) 4371 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, CSDVersion, 76) 4372 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, Reserved1, 2) 4373 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, Reserved1, 2) 4374 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, Reserved1, 78) 4375 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, EditList, 8) 4376 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, EditList, 8) 4377 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, EditList, 80) 4378 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, SecurityCookie, 8) 4379 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, SecurityCookie, 8) 4380 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, SecurityCookie, 88) 4381 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, SEHandlerTable, 8) 4382 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, SEHandlerTable, 8) 4383 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, SEHandlerTable, 96) 4384 TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY64, SEHandlerCount, 8) 4385 TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY64, SEHandlerCount, 8) 4386 TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY64, SEHandlerCount, 104) 4387 } 4388 4389 static void test_pack_IMAGE_NT_HEADERS(void) 4390 { 4391 /* IMAGE_NT_HEADERS */ 4392 TEST_TYPE_SIZE (IMAGE_NT_HEADERS, 248) 4393 TEST_TYPE_ALIGN (IMAGE_NT_HEADERS, 4) 4394 } 4395 4396 static void test_pack_IMAGE_NT_HEADERS32(void) 4397 { 4398 /* IMAGE_NT_HEADERS32 */ 4399 TEST_TYPE_SIZE (IMAGE_NT_HEADERS32, 248) 4400 TEST_TYPE_ALIGN (IMAGE_NT_HEADERS32, 4) 4401 TEST_FIELD_SIZE (IMAGE_NT_HEADERS32, Signature, 4) 4402 TEST_FIELD_ALIGN (IMAGE_NT_HEADERS32, Signature, 4) 4403 TEST_FIELD_OFFSET(IMAGE_NT_HEADERS32, Signature, 0) 4404 TEST_FIELD_SIZE (IMAGE_NT_HEADERS32, FileHeader, 20) 4405 TEST_FIELD_ALIGN (IMAGE_NT_HEADERS32, FileHeader, 4) 4406 TEST_FIELD_OFFSET(IMAGE_NT_HEADERS32, FileHeader, 4) 4407 TEST_FIELD_SIZE (IMAGE_NT_HEADERS32, OptionalHeader, 224) 4408 TEST_FIELD_ALIGN (IMAGE_NT_HEADERS32, OptionalHeader, 4) 4409 TEST_FIELD_OFFSET(IMAGE_NT_HEADERS32, OptionalHeader, 24) 4410 } 4411 4412 static void test_pack_IMAGE_NT_HEADERS64(void) 4413 { 4414 /* IMAGE_NT_HEADERS64 */ 4415 TEST_TYPE_SIZE (IMAGE_NT_HEADERS64, 264) 4416 TEST_TYPE_ALIGN (IMAGE_NT_HEADERS64, 8) 4417 TEST_FIELD_SIZE (IMAGE_NT_HEADERS64, Signature, 4) 4418 TEST_FIELD_ALIGN (IMAGE_NT_HEADERS64, Signature, 4) 4419 TEST_FIELD_OFFSET(IMAGE_NT_HEADERS64, Signature, 0) 4420 TEST_FIELD_SIZE (IMAGE_NT_HEADERS64, FileHeader, 20) 4421 TEST_FIELD_ALIGN (IMAGE_NT_HEADERS64, FileHeader, 4) 4422 TEST_FIELD_OFFSET(IMAGE_NT_HEADERS64, FileHeader, 4) 4423 TEST_FIELD_SIZE (IMAGE_NT_HEADERS64, OptionalHeader, 240) 4424 TEST_FIELD_ALIGN (IMAGE_NT_HEADERS64, OptionalHeader, 8) 4425 TEST_FIELD_OFFSET(IMAGE_NT_HEADERS64, OptionalHeader, 24) 4426 } 4427 4428 static void test_pack_IMAGE_OPTIONAL_HEADER(void) 4429 { 4430 /* IMAGE_OPTIONAL_HEADER */ 4431 TEST_TYPE_SIZE (IMAGE_OPTIONAL_HEADER, 224) 4432 TEST_TYPE_ALIGN (IMAGE_OPTIONAL_HEADER, 4) 4433 } 4434 4435 static void test_pack_IMAGE_OPTIONAL_HEADER32(void) 4436 { 4437 /* IMAGE_OPTIONAL_HEADER32 */ 4438 TEST_TYPE_SIZE (IMAGE_OPTIONAL_HEADER32, 224) 4439 TEST_TYPE_ALIGN (IMAGE_OPTIONAL_HEADER32, 4) 4440 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, Magic, 2) 4441 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, Magic, 2) 4442 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, Magic, 0) 4443 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MajorLinkerVersion, 1) 4444 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MajorLinkerVersion, 1) 4445 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MajorLinkerVersion, 2) 4446 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MinorLinkerVersion, 1) 4447 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MinorLinkerVersion, 1) 4448 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MinorLinkerVersion, 3) 4449 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfCode, 4) 4450 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfCode, 4) 4451 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfCode, 4) 4452 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfInitializedData, 4) 4453 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfInitializedData, 4) 4454 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfInitializedData, 8) 4455 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfUninitializedData, 4) 4456 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfUninitializedData, 4) 4457 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfUninitializedData, 12) 4458 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, AddressOfEntryPoint, 4) 4459 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, AddressOfEntryPoint, 4) 4460 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, AddressOfEntryPoint, 16) 4461 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, BaseOfCode, 4) 4462 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, BaseOfCode, 4) 4463 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, BaseOfCode, 20) 4464 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, BaseOfData, 4) 4465 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, BaseOfData, 4) 4466 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, BaseOfData, 24) 4467 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, ImageBase, 4) 4468 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, ImageBase, 4) 4469 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, ImageBase, 28) 4470 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SectionAlignment, 4) 4471 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SectionAlignment, 4) 4472 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SectionAlignment, 32) 4473 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, FileAlignment, 4) 4474 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, FileAlignment, 4) 4475 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, FileAlignment, 36) 4476 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MajorOperatingSystemVersion, 2) 4477 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MajorOperatingSystemVersion, 2) 4478 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MajorOperatingSystemVersion, 40) 4479 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MinorOperatingSystemVersion, 2) 4480 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MinorOperatingSystemVersion, 2) 4481 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MinorOperatingSystemVersion, 42) 4482 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MajorImageVersion, 2) 4483 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MajorImageVersion, 2) 4484 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MajorImageVersion, 44) 4485 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MinorImageVersion, 2) 4486 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MinorImageVersion, 2) 4487 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MinorImageVersion, 46) 4488 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MajorSubsystemVersion, 2) 4489 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MajorSubsystemVersion, 2) 4490 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MajorSubsystemVersion, 48) 4491 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MinorSubsystemVersion, 2) 4492 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MinorSubsystemVersion, 2) 4493 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MinorSubsystemVersion, 50) 4494 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, Win32VersionValue, 4) 4495 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, Win32VersionValue, 4) 4496 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, Win32VersionValue, 52) 4497 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfImage, 4) 4498 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfImage, 4) 4499 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfImage, 56) 4500 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfHeaders, 4) 4501 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfHeaders, 4) 4502 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfHeaders, 60) 4503 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, CheckSum, 4) 4504 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, CheckSum, 4) 4505 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, CheckSum, 64) 4506 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, Subsystem, 2) 4507 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, Subsystem, 2) 4508 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, Subsystem, 68) 4509 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, DllCharacteristics, 2) 4510 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, DllCharacteristics, 2) 4511 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, DllCharacteristics, 70) 4512 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfStackReserve, 4) 4513 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfStackReserve, 4) 4514 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfStackReserve, 72) 4515 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfStackCommit, 4) 4516 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfStackCommit, 4) 4517 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfStackCommit, 76) 4518 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfHeapReserve, 4) 4519 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfHeapReserve, 4) 4520 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfHeapReserve, 80) 4521 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfHeapCommit, 4) 4522 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfHeapCommit, 4) 4523 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfHeapCommit, 84) 4524 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, LoaderFlags, 4) 4525 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, LoaderFlags, 4) 4526 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, LoaderFlags, 88) 4527 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, NumberOfRvaAndSizes, 4) 4528 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, NumberOfRvaAndSizes, 4) 4529 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, NumberOfRvaAndSizes, 92) 4530 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, DataDirectory, 128) 4531 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, DataDirectory, 4) 4532 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, DataDirectory, 96) 4533 } 4534 4535 static void test_pack_IMAGE_OPTIONAL_HEADER64(void) 4536 { 4537 /* IMAGE_OPTIONAL_HEADER64 */ 4538 TEST_TYPE_SIZE (IMAGE_OPTIONAL_HEADER64, 240) 4539 TEST_TYPE_ALIGN (IMAGE_OPTIONAL_HEADER64, 8) 4540 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, Magic, 2) 4541 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, Magic, 2) 4542 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, Magic, 0) 4543 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MajorLinkerVersion, 1) 4544 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MajorLinkerVersion, 1) 4545 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MajorLinkerVersion, 2) 4546 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MinorLinkerVersion, 1) 4547 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MinorLinkerVersion, 1) 4548 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MinorLinkerVersion, 3) 4549 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfCode, 4) 4550 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfCode, 4) 4551 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfCode, 4) 4552 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfInitializedData, 4) 4553 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfInitializedData, 4) 4554 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfInitializedData, 8) 4555 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfUninitializedData, 4) 4556 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfUninitializedData, 4) 4557 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfUninitializedData, 12) 4558 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, AddressOfEntryPoint, 4) 4559 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, AddressOfEntryPoint, 4) 4560 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, AddressOfEntryPoint, 16) 4561 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, BaseOfCode, 4) 4562 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, BaseOfCode, 4) 4563 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, BaseOfCode, 20) 4564 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, ImageBase, 8) 4565 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, ImageBase, 8) 4566 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, ImageBase, 24) 4567 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SectionAlignment, 4) 4568 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SectionAlignment, 4) 4569 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SectionAlignment, 32) 4570 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, FileAlignment, 4) 4571 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, FileAlignment, 4) 4572 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, FileAlignment, 36) 4573 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MajorOperatingSystemVersion, 2) 4574 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MajorOperatingSystemVersion, 2) 4575 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MajorOperatingSystemVersion, 40) 4576 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MinorOperatingSystemVersion, 2) 4577 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MinorOperatingSystemVersion, 2) 4578 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MinorOperatingSystemVersion, 42) 4579 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MajorImageVersion, 2) 4580 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MajorImageVersion, 2) 4581 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MajorImageVersion, 44) 4582 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MinorImageVersion, 2) 4583 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MinorImageVersion, 2) 4584 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MinorImageVersion, 46) 4585 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MajorSubsystemVersion, 2) 4586 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MajorSubsystemVersion, 2) 4587 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MajorSubsystemVersion, 48) 4588 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MinorSubsystemVersion, 2) 4589 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MinorSubsystemVersion, 2) 4590 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MinorSubsystemVersion, 50) 4591 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, Win32VersionValue, 4) 4592 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, Win32VersionValue, 4) 4593 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, Win32VersionValue, 52) 4594 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfImage, 4) 4595 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfImage, 4) 4596 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfImage, 56) 4597 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfHeaders, 4) 4598 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfHeaders, 4) 4599 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfHeaders, 60) 4600 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, CheckSum, 4) 4601 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, CheckSum, 4) 4602 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, CheckSum, 64) 4603 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, Subsystem, 2) 4604 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, Subsystem, 2) 4605 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, Subsystem, 68) 4606 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, DllCharacteristics, 2) 4607 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, DllCharacteristics, 2) 4608 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, DllCharacteristics, 70) 4609 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfStackReserve, 8) 4610 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfStackReserve, 8) 4611 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfStackReserve, 72) 4612 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfStackCommit, 8) 4613 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfStackCommit, 8) 4614 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfStackCommit, 80) 4615 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfHeapReserve, 8) 4616 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfHeapReserve, 8) 4617 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfHeapReserve, 88) 4618 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfHeapCommit, 8) 4619 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfHeapCommit, 8) 4620 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfHeapCommit, 96) 4621 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, LoaderFlags, 4) 4622 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, LoaderFlags, 4) 4623 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, LoaderFlags, 104) 4624 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, NumberOfRvaAndSizes, 4) 4625 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, NumberOfRvaAndSizes, 4) 4626 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, NumberOfRvaAndSizes, 108) 4627 TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, DataDirectory, 128) 4628 TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, DataDirectory, 4) 4629 TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, DataDirectory, 112) 4630 } 4631 4632 static void test_pack_IMAGE_OS2_HEADER(void) 4633 { 4634 /* IMAGE_OS2_HEADER (pack 2) */ 4635 TEST_TYPE_SIZE (IMAGE_OS2_HEADER, 64) 4636 TEST_TYPE_ALIGN (IMAGE_OS2_HEADER, 2) 4637 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_magic, 2) 4638 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_magic, 2) 4639 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_magic, 0) 4640 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_ver, 1) 4641 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_ver, 1) 4642 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_ver, 2) 4643 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_rev, 1) 4644 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_rev, 1) 4645 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_rev, 3) 4646 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_enttab, 2) 4647 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_enttab, 2) 4648 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_enttab, 4) 4649 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cbenttab, 2) 4650 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cbenttab, 2) 4651 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cbenttab, 6) 4652 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_crc, 4) 4653 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_crc, 2) 4654 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_crc, 8) 4655 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_flags, 2) 4656 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_flags, 2) 4657 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_flags, 12) 4658 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_autodata, 2) 4659 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_autodata, 2) 4660 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_autodata, 14) 4661 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_heap, 2) 4662 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_heap, 2) 4663 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_heap, 16) 4664 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_stack, 2) 4665 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_stack, 2) 4666 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_stack, 18) 4667 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_csip, 4) 4668 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_csip, 2) 4669 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_csip, 20) 4670 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_sssp, 4) 4671 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_sssp, 2) 4672 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_sssp, 24) 4673 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cseg, 2) 4674 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cseg, 2) 4675 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cseg, 28) 4676 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cmod, 2) 4677 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cmod, 2) 4678 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cmod, 30) 4679 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cbnrestab, 2) 4680 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cbnrestab, 2) 4681 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cbnrestab, 32) 4682 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_segtab, 2) 4683 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_segtab, 2) 4684 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_segtab, 34) 4685 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_rsrctab, 2) 4686 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_rsrctab, 2) 4687 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_rsrctab, 36) 4688 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_restab, 2) 4689 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_restab, 2) 4690 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_restab, 38) 4691 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_modtab, 2) 4692 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_modtab, 2) 4693 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_modtab, 40) 4694 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_imptab, 2) 4695 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_imptab, 2) 4696 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_imptab, 42) 4697 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_nrestab, 4) 4698 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_nrestab, 2) 4699 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_nrestab, 44) 4700 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cmovent, 2) 4701 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cmovent, 2) 4702 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cmovent, 48) 4703 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_align, 2) 4704 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_align, 2) 4705 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_align, 50) 4706 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cres, 2) 4707 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cres, 2) 4708 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cres, 52) 4709 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_exetyp, 1) 4710 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_exetyp, 1) 4711 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_exetyp, 54) 4712 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_flagsothers, 1) 4713 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_flagsothers, 1) 4714 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_flagsothers, 55) 4715 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_pretthunks, 2) 4716 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_pretthunks, 2) 4717 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_pretthunks, 56) 4718 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_psegrefbytes, 2) 4719 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_psegrefbytes, 2) 4720 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_psegrefbytes, 58) 4721 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_swaparea, 2) 4722 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_swaparea, 2) 4723 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_swaparea, 60) 4724 TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_expver, 2) 4725 TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_expver, 2) 4726 TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_expver, 62) 4727 } 4728 4729 static void test_pack_IMAGE_RELOCATION(void) 4730 { 4731 /* IMAGE_RELOCATION (pack 2) */ 4732 } 4733 4734 static void test_pack_IMAGE_RESOURCE_DATA_ENTRY(void) 4735 { 4736 /* IMAGE_RESOURCE_DATA_ENTRY */ 4737 TEST_TYPE_SIZE (IMAGE_RESOURCE_DATA_ENTRY, 16) 4738 TEST_TYPE_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, 4) 4739 TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, OffsetToData, 4) 4740 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, OffsetToData, 4) 4741 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, OffsetToData, 0) 4742 TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, Size, 4) 4743 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, Size, 4) 4744 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, Size, 4) 4745 TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, CodePage, 4) 4746 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, CodePage, 4) 4747 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, CodePage, 8) 4748 TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, Reserved, 4) 4749 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, Reserved, 4) 4750 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, Reserved, 12) 4751 } 4752 4753 static void test_pack_IMAGE_RESOURCE_DIRECTORY(void) 4754 { 4755 /* IMAGE_RESOURCE_DIRECTORY */ 4756 TEST_TYPE_SIZE (IMAGE_RESOURCE_DIRECTORY, 16) 4757 TEST_TYPE_ALIGN (IMAGE_RESOURCE_DIRECTORY, 4) 4758 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, Characteristics, 4) 4759 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, Characteristics, 4) 4760 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, Characteristics, 0) 4761 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, TimeDateStamp, 4) 4762 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, TimeDateStamp, 4) 4763 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, TimeDateStamp, 4) 4764 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, MajorVersion, 2) 4765 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, MajorVersion, 2) 4766 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, MajorVersion, 8) 4767 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, MinorVersion, 2) 4768 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, MinorVersion, 2) 4769 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, MinorVersion, 10) 4770 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, NumberOfNamedEntries, 2) 4771 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, NumberOfNamedEntries, 2) 4772 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, NumberOfNamedEntries, 12) 4773 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, NumberOfIdEntries, 2) 4774 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, NumberOfIdEntries, 2) 4775 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, NumberOfIdEntries, 14) 4776 } 4777 4778 static void test_pack_IMAGE_RESOURCE_DIRECTORY_ENTRY(void) 4779 { 4780 /* IMAGE_RESOURCE_DIRECTORY_ENTRY */ 4781 } 4782 4783 static void test_pack_IMAGE_RESOURCE_DIRECTORY_STRING(void) 4784 { 4785 /* IMAGE_RESOURCE_DIRECTORY_STRING */ 4786 TEST_TYPE_SIZE (IMAGE_RESOURCE_DIRECTORY_STRING, 4) 4787 TEST_TYPE_ALIGN (IMAGE_RESOURCE_DIRECTORY_STRING, 2) 4788 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY_STRING, Length, 2) 4789 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY_STRING, Length, 2) 4790 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY_STRING, Length, 0) 4791 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY_STRING, NameString, 1) 4792 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY_STRING, NameString, 1) 4793 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY_STRING, NameString, 2) 4794 } 4795 4796 static void test_pack_IMAGE_RESOURCE_DIR_STRING_U(void) 4797 { 4798 /* IMAGE_RESOURCE_DIR_STRING_U */ 4799 TEST_TYPE_SIZE (IMAGE_RESOURCE_DIR_STRING_U, 4) 4800 TEST_TYPE_ALIGN (IMAGE_RESOURCE_DIR_STRING_U, 2) 4801 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIR_STRING_U, Length, 2) 4802 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIR_STRING_U, Length, 2) 4803 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIR_STRING_U, Length, 0) 4804 TEST_FIELD_SIZE (IMAGE_RESOURCE_DIR_STRING_U, NameString, 2) 4805 TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIR_STRING_U, NameString, 2) 4806 TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIR_STRING_U, NameString, 2) 4807 } 4808 4809 static void test_pack_IMAGE_SECTION_HEADER(void) 4810 { 4811 /* IMAGE_SECTION_HEADER */ 4812 TEST_FIELD_SIZE (IMAGE_SECTION_HEADER, Name, 8) 4813 TEST_FIELD_ALIGN (IMAGE_SECTION_HEADER, Name, 1) 4814 TEST_FIELD_OFFSET(IMAGE_SECTION_HEADER, Name, 0) 4815 } 4816 4817 static void test_pack_IMAGE_SEPARATE_DEBUG_HEADER(void) 4818 { 4819 /* IMAGE_SEPARATE_DEBUG_HEADER */ 4820 TEST_TYPE_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, 48) 4821 TEST_TYPE_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, 4) 4822 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Signature, 2) 4823 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Signature, 2) 4824 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Signature, 0) 4825 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Flags, 2) 4826 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Flags, 2) 4827 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Flags, 2) 4828 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Machine, 2) 4829 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Machine, 2) 4830 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Machine, 4) 4831 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Characteristics, 2) 4832 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Characteristics, 2) 4833 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Characteristics, 6) 4834 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, TimeDateStamp, 4) 4835 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, TimeDateStamp, 4) 4836 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, TimeDateStamp, 8) 4837 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, CheckSum, 4) 4838 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, CheckSum, 4) 4839 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, CheckSum, 12) 4840 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, ImageBase, 4) 4841 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, ImageBase, 4) 4842 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, ImageBase, 16) 4843 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, SizeOfImage, 4) 4844 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, SizeOfImage, 4) 4845 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, SizeOfImage, 20) 4846 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, NumberOfSections, 4) 4847 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, NumberOfSections, 4) 4848 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, NumberOfSections, 24) 4849 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, ExportedNamesSize, 4) 4850 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, ExportedNamesSize, 4) 4851 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, ExportedNamesSize, 28) 4852 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, DebugDirectorySize, 4) 4853 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, DebugDirectorySize, 4) 4854 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, DebugDirectorySize, 32) 4855 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, SectionAlignment, 4) 4856 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, SectionAlignment, 4) 4857 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, SectionAlignment, 36) 4858 TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Reserved, 8) 4859 TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Reserved, 4) 4860 TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Reserved, 40) 4861 } 4862 4863 static void test_pack_IMAGE_SYMBOL(void) 4864 { 4865 /* IMAGE_SYMBOL (pack 2) */ 4866 } 4867 4868 static void test_pack_IMAGE_THUNK_DATA(void) 4869 { 4870 /* IMAGE_THUNK_DATA */ 4871 } 4872 4873 static void test_pack_IMAGE_TLS_DIRECTORY(void) 4874 { 4875 /* IMAGE_TLS_DIRECTORY */ 4876 TEST_TYPE_SIZE (IMAGE_TLS_DIRECTORY, 24) 4877 TEST_TYPE_ALIGN (IMAGE_TLS_DIRECTORY, 4) 4878 } 4879 4880 static void test_pack_IMAGE_TLS_DIRECTORY32(void) 4881 { 4882 /* IMAGE_TLS_DIRECTORY32 */ 4883 TEST_TYPE_SIZE (IMAGE_TLS_DIRECTORY32, 24) 4884 TEST_TYPE_ALIGN (IMAGE_TLS_DIRECTORY32, 4) 4885 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, StartAddressOfRawData, 4) 4886 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, StartAddressOfRawData, 4) 4887 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, StartAddressOfRawData, 0) 4888 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, EndAddressOfRawData, 4) 4889 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, EndAddressOfRawData, 4) 4890 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, EndAddressOfRawData, 4) 4891 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, AddressOfIndex, 4) 4892 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, AddressOfIndex, 4) 4893 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, AddressOfIndex, 8) 4894 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, AddressOfCallBacks, 4) 4895 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, AddressOfCallBacks, 4) 4896 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, AddressOfCallBacks, 12) 4897 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, SizeOfZeroFill, 4) 4898 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, SizeOfZeroFill, 4) 4899 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, SizeOfZeroFill, 16) 4900 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, Characteristics, 4) 4901 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, Characteristics, 4) 4902 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, Characteristics, 20) 4903 } 4904 4905 static void test_pack_IMAGE_TLS_DIRECTORY64(void) 4906 { 4907 /* IMAGE_TLS_DIRECTORY64 */ 4908 TEST_TYPE_SIZE (IMAGE_TLS_DIRECTORY64, 40) 4909 TEST_TYPE_ALIGN (IMAGE_TLS_DIRECTORY64, 8) 4910 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, StartAddressOfRawData, 8) 4911 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, StartAddressOfRawData, 8) 4912 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, StartAddressOfRawData, 0) 4913 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, EndAddressOfRawData, 8) 4914 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, EndAddressOfRawData, 8) 4915 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, EndAddressOfRawData, 8) 4916 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, AddressOfIndex, 8) 4917 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, AddressOfIndex, 8) 4918 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, AddressOfIndex, 16) 4919 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, AddressOfCallBacks, 8) 4920 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, AddressOfCallBacks, 8) 4921 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, AddressOfCallBacks, 24) 4922 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, SizeOfZeroFill, 4) 4923 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, SizeOfZeroFill, 4) 4924 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, SizeOfZeroFill, 32) 4925 TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, Characteristics, 4) 4926 TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, Characteristics, 4) 4927 TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, Characteristics, 36) 4928 } 4929 4930 static void test_pack_IMAGE_VXD_HEADER(void) 4931 { 4932 /* IMAGE_VXD_HEADER (pack 2) */ 4933 TEST_TYPE_SIZE (IMAGE_VXD_HEADER, 196) 4934 TEST_TYPE_ALIGN (IMAGE_VXD_HEADER, 2) 4935 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_magic, 2) 4936 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_magic, 2) 4937 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_magic, 0) 4938 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_border, 1) 4939 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_border, 1) 4940 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_border, 2) 4941 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_worder, 1) 4942 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_worder, 1) 4943 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_worder, 3) 4944 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_level, 4) 4945 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_level, 2) 4946 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_level, 4) 4947 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_cpu, 2) 4948 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_cpu, 2) 4949 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_cpu, 8) 4950 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_os, 2) 4951 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_os, 2) 4952 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_os, 10) 4953 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ver, 4) 4954 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ver, 2) 4955 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ver, 12) 4956 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_mflags, 4) 4957 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_mflags, 2) 4958 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_mflags, 16) 4959 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_mpages, 4) 4960 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_mpages, 2) 4961 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_mpages, 20) 4962 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_startobj, 4) 4963 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_startobj, 2) 4964 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_startobj, 24) 4965 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_eip, 4) 4966 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_eip, 2) 4967 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_eip, 28) 4968 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_stackobj, 4) 4969 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_stackobj, 2) 4970 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_stackobj, 32) 4971 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_esp, 4) 4972 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_esp, 2) 4973 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_esp, 36) 4974 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_pagesize, 4) 4975 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_pagesize, 2) 4976 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_pagesize, 40) 4977 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_lastpagesize, 4) 4978 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_lastpagesize, 2) 4979 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_lastpagesize, 44) 4980 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_fixupsize, 4) 4981 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_fixupsize, 2) 4982 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_fixupsize, 48) 4983 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_fixupsum, 4) 4984 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_fixupsum, 2) 4985 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_fixupsum, 52) 4986 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ldrsize, 4) 4987 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ldrsize, 2) 4988 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ldrsize, 56) 4989 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ldrsum, 4) 4990 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ldrsum, 2) 4991 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ldrsum, 60) 4992 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_objtab, 4) 4993 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_objtab, 2) 4994 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_objtab, 64) 4995 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_objcnt, 4) 4996 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_objcnt, 2) 4997 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_objcnt, 68) 4998 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_objmap, 4) 4999 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_objmap, 2) 5000 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_objmap, 72) 5001 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_itermap, 4) 5002 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_itermap, 2) 5003 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_itermap, 76) 5004 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_rsrctab, 4) 5005 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_rsrctab, 2) 5006 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_rsrctab, 80) 5007 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_rsrccnt, 4) 5008 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_rsrccnt, 2) 5009 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_rsrccnt, 84) 5010 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_restab, 4) 5011 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_restab, 2) 5012 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_restab, 88) 5013 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_enttab, 4) 5014 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_enttab, 2) 5015 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_enttab, 92) 5016 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_dirtab, 4) 5017 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_dirtab, 2) 5018 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_dirtab, 96) 5019 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_dircnt, 4) 5020 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_dircnt, 2) 5021 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_dircnt, 100) 5022 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_fpagetab, 4) 5023 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_fpagetab, 2) 5024 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_fpagetab, 104) 5025 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_frectab, 4) 5026 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_frectab, 2) 5027 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_frectab, 108) 5028 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_impmod, 4) 5029 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_impmod, 2) 5030 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_impmod, 112) 5031 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_impmodcnt, 4) 5032 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_impmodcnt, 2) 5033 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_impmodcnt, 116) 5034 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_impproc, 4) 5035 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_impproc, 2) 5036 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_impproc, 120) 5037 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_pagesum, 4) 5038 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_pagesum, 2) 5039 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_pagesum, 124) 5040 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_datapage, 4) 5041 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_datapage, 2) 5042 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_datapage, 128) 5043 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_preload, 4) 5044 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_preload, 2) 5045 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_preload, 132) 5046 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_nrestab, 4) 5047 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_nrestab, 2) 5048 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_nrestab, 136) 5049 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_cbnrestab, 4) 5050 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_cbnrestab, 2) 5051 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_cbnrestab, 140) 5052 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_nressum, 4) 5053 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_nressum, 2) 5054 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_nressum, 144) 5055 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_autodata, 4) 5056 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_autodata, 2) 5057 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_autodata, 148) 5058 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_debuginfo, 4) 5059 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_debuginfo, 2) 5060 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_debuginfo, 152) 5061 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_debuglen, 4) 5062 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_debuglen, 2) 5063 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_debuglen, 156) 5064 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_instpreload, 4) 5065 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_instpreload, 2) 5066 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_instpreload, 160) 5067 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_instdemand, 4) 5068 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_instdemand, 2) 5069 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_instdemand, 164) 5070 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_heapsize, 4) 5071 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_heapsize, 2) 5072 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_heapsize, 168) 5073 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_res3, 12) 5074 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_res3, 1) 5075 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_res3, 172) 5076 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_winresoff, 4) 5077 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_winresoff, 2) 5078 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_winresoff, 184) 5079 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_winreslen, 4) 5080 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_winreslen, 2) 5081 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_winreslen, 188) 5082 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_devid, 2) 5083 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_devid, 2) 5084 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_devid, 192) 5085 TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ddkver, 2) 5086 TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ddkver, 2) 5087 TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ddkver, 194) 5088 } 5089 5090 static void test_pack_IO_COUNTERS(void) 5091 { 5092 /* IO_COUNTERS (pack 8) */ 5093 TEST_TYPE_SIZE (IO_COUNTERS, 48) 5094 TEST_TYPE_ALIGN (IO_COUNTERS, 8) 5095 TEST_FIELD_SIZE (IO_COUNTERS, ReadOperationCount, 8) 5096 TEST_FIELD_ALIGN (IO_COUNTERS, ReadOperationCount, 8) 5097 TEST_FIELD_OFFSET(IO_COUNTERS, ReadOperationCount, 0) 5098 TEST_FIELD_SIZE (IO_COUNTERS, WriteOperationCount, 8) 5099 TEST_FIELD_ALIGN (IO_COUNTERS, WriteOperationCount, 8) 5100 TEST_FIELD_OFFSET(IO_COUNTERS, WriteOperationCount, 8) 5101 TEST_FIELD_SIZE (IO_COUNTERS, OtherOperationCount, 8) 5102 TEST_FIELD_ALIGN (IO_COUNTERS, OtherOperationCount, 8) 5103 TEST_FIELD_OFFSET(IO_COUNTERS, OtherOperationCount, 16) 5104 TEST_FIELD_SIZE (IO_COUNTERS, ReadTransferCount, 8) 5105 TEST_FIELD_ALIGN (IO_COUNTERS, ReadTransferCount, 8) 5106 TEST_FIELD_OFFSET(IO_COUNTERS, ReadTransferCount, 24) 5107 TEST_FIELD_SIZE (IO_COUNTERS, WriteTransferCount, 8) 5108 TEST_FIELD_ALIGN (IO_COUNTERS, WriteTransferCount, 8) 5109 TEST_FIELD_OFFSET(IO_COUNTERS, WriteTransferCount, 32) 5110 TEST_FIELD_SIZE (IO_COUNTERS, OtherTransferCount, 8) 5111 TEST_FIELD_ALIGN (IO_COUNTERS, OtherTransferCount, 8) 5112 TEST_FIELD_OFFSET(IO_COUNTERS, OtherTransferCount, 40) 5113 } 5114 5115 static void test_pack_LANGID(void) 5116 { 5117 /* LANGID */ 5118 TEST_TYPE_SIZE (LANGID, 2) 5119 TEST_TYPE_ALIGN (LANGID, 2) 5120 TEST_TYPE_UNSIGNED(LANGID) 5121 } 5122 5123 static void test_pack_LARGE_INTEGER(void) 5124 { 5125 /* LARGE_INTEGER */ 5126 } 5127 5128 static void test_pack_LCID(void) 5129 { 5130 /* LCID */ 5131 TEST_TYPE_SIZE (LCID, 4) 5132 TEST_TYPE_ALIGN (LCID, 4) 5133 TEST_TYPE_UNSIGNED(LCID) 5134 } 5135 5136 static void test_pack_LIST_ENTRY(void) 5137 { 5138 /* LIST_ENTRY */ 5139 TEST_TYPE_SIZE (LIST_ENTRY, 8) 5140 TEST_TYPE_ALIGN (LIST_ENTRY, 4) 5141 TEST_FIELD_SIZE (LIST_ENTRY, Flink, 4) 5142 TEST_FIELD_ALIGN (LIST_ENTRY, Flink, 4) 5143 TEST_FIELD_OFFSET(LIST_ENTRY, Flink, 0) 5144 TEST_FIELD_SIZE (LIST_ENTRY, Blink, 4) 5145 TEST_FIELD_ALIGN (LIST_ENTRY, Blink, 4) 5146 TEST_FIELD_OFFSET(LIST_ENTRY, Blink, 4) 5147 } 5148 5149 static void test_pack_LONG(void) 5150 { 5151 /* LONG */ 5152 TEST_TYPE_SIZE (LONG, 4) 5153 TEST_TYPE_ALIGN (LONG, 4) 5154 TEST_TYPE_SIGNED(LONG) 5155 } 5156 5157 static void test_pack_LONGLONG(void) 5158 { 5159 /* LONGLONG */ 5160 TEST_TYPE_SIZE (LONGLONG, 8) 5161 TEST_TYPE_ALIGN (LONGLONG, 8) 5162 TEST_TYPE_SIGNED(LONGLONG) 5163 } 5164 5165 static void test_pack_LUID(void) 5166 { 5167 /* LUID */ 5168 TEST_TYPE_SIZE (LUID, 8) 5169 TEST_TYPE_ALIGN (LUID, 4) 5170 TEST_FIELD_SIZE (LUID, LowPart, 4) 5171 TEST_FIELD_ALIGN (LUID, LowPart, 4) 5172 TEST_FIELD_OFFSET(LUID, LowPart, 0) 5173 TEST_FIELD_SIZE (LUID, HighPart, 4) 5174 TEST_FIELD_ALIGN (LUID, HighPart, 4) 5175 TEST_FIELD_OFFSET(LUID, HighPart, 4) 5176 } 5177 5178 static void test_pack_LUID_AND_ATTRIBUTES(void) 5179 { 5180 /* LUID_AND_ATTRIBUTES (pack 4) */ 5181 TEST_TYPE_SIZE (LUID_AND_ATTRIBUTES, 12) 5182 TEST_TYPE_ALIGN (LUID_AND_ATTRIBUTES, 4) 5183 TEST_FIELD_SIZE (LUID_AND_ATTRIBUTES, Luid, 8) 5184 TEST_FIELD_ALIGN (LUID_AND_ATTRIBUTES, Luid, 4) 5185 TEST_FIELD_OFFSET(LUID_AND_ATTRIBUTES, Luid, 0) 5186 TEST_FIELD_SIZE (LUID_AND_ATTRIBUTES, Attributes, 4) 5187 TEST_FIELD_ALIGN (LUID_AND_ATTRIBUTES, Attributes, 4) 5188 TEST_FIELD_OFFSET(LUID_AND_ATTRIBUTES, Attributes, 8) 5189 } 5190 5191 static void test_pack_MEMORY_BASIC_INFORMATION(void) 5192 { 5193 /* MEMORY_BASIC_INFORMATION */ 5194 TEST_TYPE_SIZE (MEMORY_BASIC_INFORMATION, 28) 5195 TEST_TYPE_ALIGN (MEMORY_BASIC_INFORMATION, 4) 5196 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, BaseAddress, 4) 5197 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, BaseAddress, 4) 5198 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, BaseAddress, 0) 5199 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, AllocationBase, 4) 5200 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, AllocationBase, 4) 5201 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, AllocationBase, 4) 5202 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, AllocationProtect, 4) 5203 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, AllocationProtect, 4) 5204 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, AllocationProtect, 8) 5205 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, RegionSize, 4) 5206 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, RegionSize, 4) 5207 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, RegionSize, 12) 5208 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, State, 4) 5209 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, State, 4) 5210 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, State, 16) 5211 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, Protect, 4) 5212 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, Protect, 4) 5213 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, Protect, 20) 5214 TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, Type, 4) 5215 TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, Type, 4) 5216 TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, Type, 24) 5217 } 5218 5219 static void test_pack_MESSAGE_RESOURCE_BLOCK(void) 5220 { 5221 /* MESSAGE_RESOURCE_BLOCK */ 5222 TEST_TYPE_SIZE (MESSAGE_RESOURCE_BLOCK, 12) 5223 TEST_TYPE_ALIGN (MESSAGE_RESOURCE_BLOCK, 4) 5224 TEST_FIELD_SIZE (MESSAGE_RESOURCE_BLOCK, LowId, 4) 5225 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_BLOCK, LowId, 4) 5226 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_BLOCK, LowId, 0) 5227 TEST_FIELD_SIZE (MESSAGE_RESOURCE_BLOCK, HighId, 4) 5228 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_BLOCK, HighId, 4) 5229 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_BLOCK, HighId, 4) 5230 TEST_FIELD_SIZE (MESSAGE_RESOURCE_BLOCK, OffsetToEntries, 4) 5231 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_BLOCK, OffsetToEntries, 4) 5232 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_BLOCK, OffsetToEntries, 8) 5233 } 5234 5235 static void test_pack_MESSAGE_RESOURCE_DATA(void) 5236 { 5237 /* MESSAGE_RESOURCE_DATA */ 5238 TEST_TYPE_SIZE (MESSAGE_RESOURCE_DATA, 16) 5239 TEST_TYPE_ALIGN (MESSAGE_RESOURCE_DATA, 4) 5240 TEST_FIELD_SIZE (MESSAGE_RESOURCE_DATA, NumberOfBlocks, 4) 5241 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_DATA, NumberOfBlocks, 4) 5242 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_DATA, NumberOfBlocks, 0) 5243 TEST_FIELD_SIZE (MESSAGE_RESOURCE_DATA, Blocks, 12) 5244 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_DATA, Blocks, 4) 5245 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_DATA, Blocks, 4) 5246 } 5247 5248 static void test_pack_MESSAGE_RESOURCE_ENTRY(void) 5249 { 5250 /* MESSAGE_RESOURCE_ENTRY */ 5251 TEST_TYPE_SIZE (MESSAGE_RESOURCE_ENTRY, 6) 5252 TEST_TYPE_ALIGN (MESSAGE_RESOURCE_ENTRY, 2) 5253 TEST_FIELD_SIZE (MESSAGE_RESOURCE_ENTRY, Length, 2) 5254 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_ENTRY, Length, 2) 5255 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_ENTRY, Length, 0) 5256 TEST_FIELD_SIZE (MESSAGE_RESOURCE_ENTRY, Flags, 2) 5257 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_ENTRY, Flags, 2) 5258 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_ENTRY, Flags, 2) 5259 TEST_FIELD_SIZE (MESSAGE_RESOURCE_ENTRY, Text, 1) 5260 TEST_FIELD_ALIGN (MESSAGE_RESOURCE_ENTRY, Text, 1) 5261 TEST_FIELD_OFFSET(MESSAGE_RESOURCE_ENTRY, Text, 4) 5262 } 5263 5264 static void test_pack_NT_TIB(void) 5265 { 5266 /* NT_TIB */ 5267 TEST_FIELD_SIZE (NT_TIB, ExceptionList, 4) 5268 TEST_FIELD_ALIGN (NT_TIB, ExceptionList, 4) 5269 TEST_FIELD_OFFSET(NT_TIB, ExceptionList, 0) 5270 TEST_FIELD_SIZE (NT_TIB, StackBase, 4) 5271 TEST_FIELD_ALIGN (NT_TIB, StackBase, 4) 5272 TEST_FIELD_OFFSET(NT_TIB, StackBase, 4) 5273 TEST_FIELD_SIZE (NT_TIB, StackLimit, 4) 5274 TEST_FIELD_ALIGN (NT_TIB, StackLimit, 4) 5275 TEST_FIELD_OFFSET(NT_TIB, StackLimit, 8) 5276 TEST_FIELD_SIZE (NT_TIB, SubSystemTib, 4) 5277 TEST_FIELD_ALIGN (NT_TIB, SubSystemTib, 4) 5278 TEST_FIELD_OFFSET(NT_TIB, SubSystemTib, 12) 5279 } 5280 5281 static void test_pack_OBJECT_TYPE_LIST(void) 5282 { 5283 /* OBJECT_TYPE_LIST */ 5284 TEST_TYPE_SIZE (OBJECT_TYPE_LIST, 8) 5285 TEST_TYPE_ALIGN (OBJECT_TYPE_LIST, 4) 5286 TEST_FIELD_SIZE (OBJECT_TYPE_LIST, Level, 2) 5287 TEST_FIELD_ALIGN (OBJECT_TYPE_LIST, Level, 2) 5288 TEST_FIELD_OFFSET(OBJECT_TYPE_LIST, Level, 0) 5289 TEST_FIELD_SIZE (OBJECT_TYPE_LIST, Sbz, 2) 5290 TEST_FIELD_ALIGN (OBJECT_TYPE_LIST, Sbz, 2) 5291 TEST_FIELD_OFFSET(OBJECT_TYPE_LIST, Sbz, 2) 5292 TEST_FIELD_SIZE (OBJECT_TYPE_LIST, ObjectType, 4) 5293 TEST_FIELD_ALIGN (OBJECT_TYPE_LIST, ObjectType, 4) 5294 TEST_FIELD_OFFSET(OBJECT_TYPE_LIST, ObjectType, 4) 5295 } 5296 5297 static void test_pack_PACCESS_ALLOWED_ACE(void) 5298 { 5299 /* PACCESS_ALLOWED_ACE */ 5300 TEST_TYPE_SIZE (PACCESS_ALLOWED_ACE, 4) 5301 TEST_TYPE_ALIGN (PACCESS_ALLOWED_ACE, 4) 5302 TEST_TARGET_SIZE (PACCESS_ALLOWED_ACE, 12) 5303 TEST_TARGET_ALIGN(PACCESS_ALLOWED_ACE, 4) 5304 } 5305 5306 static void test_pack_PACCESS_DENIED_ACE(void) 5307 { 5308 /* PACCESS_DENIED_ACE */ 5309 TEST_TYPE_SIZE (PACCESS_DENIED_ACE, 4) 5310 TEST_TYPE_ALIGN (PACCESS_DENIED_ACE, 4) 5311 TEST_TARGET_SIZE (PACCESS_DENIED_ACE, 12) 5312 TEST_TARGET_ALIGN(PACCESS_DENIED_ACE, 4) 5313 } 5314 5315 static void test_pack_PACCESS_TOKEN(void) 5316 { 5317 /* PACCESS_TOKEN */ 5318 TEST_TYPE_SIZE (PACCESS_TOKEN, 4) 5319 TEST_TYPE_ALIGN (PACCESS_TOKEN, 4) 5320 } 5321 5322 static void test_pack_PACE_HEADER(void) 5323 { 5324 /* PACE_HEADER */ 5325 TEST_TYPE_SIZE (PACE_HEADER, 4) 5326 TEST_TYPE_ALIGN (PACE_HEADER, 4) 5327 TEST_TARGET_SIZE (PACE_HEADER, 4) 5328 TEST_TARGET_ALIGN(PACE_HEADER, 2) 5329 } 5330 5331 static void test_pack_PACL(void) 5332 { 5333 /* PACL */ 5334 TEST_TYPE_SIZE (PACL, 4) 5335 TEST_TYPE_ALIGN (PACL, 4) 5336 TEST_TARGET_SIZE (PACL, 8) 5337 TEST_TARGET_ALIGN(PACL, 2) 5338 } 5339 5340 static void test_pack_PACL_REVISION_INFORMATION(void) 5341 { 5342 /* PACL_REVISION_INFORMATION */ 5343 TEST_TYPE_SIZE (PACL_REVISION_INFORMATION, 4) 5344 TEST_TYPE_ALIGN (PACL_REVISION_INFORMATION, 4) 5345 TEST_TARGET_SIZE (PACL_REVISION_INFORMATION, 4) 5346 TEST_TARGET_ALIGN(PACL_REVISION_INFORMATION, 4) 5347 } 5348 5349 static void test_pack_PACL_SIZE_INFORMATION(void) 5350 { 5351 /* PACL_SIZE_INFORMATION */ 5352 TEST_TYPE_SIZE (PACL_SIZE_INFORMATION, 4) 5353 TEST_TYPE_ALIGN (PACL_SIZE_INFORMATION, 4) 5354 TEST_TARGET_SIZE (PACL_SIZE_INFORMATION, 12) 5355 TEST_TARGET_ALIGN(PACL_SIZE_INFORMATION, 4) 5356 } 5357 5358 static void test_pack_PCCH(void) 5359 { 5360 /* PCCH */ 5361 TEST_TYPE_SIZE (PCCH, 4) 5362 TEST_TYPE_ALIGN (PCCH, 4) 5363 TEST_TARGET_SIZE (PCCH, 1) 5364 TEST_TARGET_ALIGN(PCCH, 1) 5365 } 5366 5367 static void test_pack_PCH(void) 5368 { 5369 /* PCH */ 5370 TEST_TYPE_SIZE (PCH, 4) 5371 TEST_TYPE_ALIGN (PCH, 4) 5372 TEST_TARGET_SIZE (PCH, 1) 5373 TEST_TARGET_ALIGN(PCH, 1) 5374 } 5375 5376 static void test_pack_PCSTR(void) 5377 { 5378 /* PCSTR */ 5379 TEST_TYPE_SIZE (PCSTR, 4) 5380 TEST_TYPE_ALIGN (PCSTR, 4) 5381 TEST_TARGET_SIZE (PCSTR, 1) 5382 TEST_TARGET_ALIGN(PCSTR, 1) 5383 } 5384 5385 static void test_pack_PCWCH(void) 5386 { 5387 /* PCWCH */ 5388 TEST_TYPE_SIZE (PCWCH, 4) 5389 TEST_TYPE_ALIGN (PCWCH, 4) 5390 TEST_TARGET_SIZE (PCWCH, 2) 5391 TEST_TARGET_ALIGN(PCWCH, 2) 5392 } 5393 5394 static void test_pack_PCWSTR(void) 5395 { 5396 /* PCWSTR */ 5397 TEST_TYPE_SIZE (PCWSTR, 4) 5398 TEST_TYPE_ALIGN (PCWSTR, 4) 5399 TEST_TARGET_SIZE (PCWSTR, 2) 5400 TEST_TARGET_ALIGN(PCWSTR, 2) 5401 } 5402 5403 static void test_pack_PEXCEPTION_POINTERS(void) 5404 { 5405 /* PEXCEPTION_POINTERS */ 5406 TEST_TYPE_SIZE (PEXCEPTION_POINTERS, 4) 5407 TEST_TYPE_ALIGN (PEXCEPTION_POINTERS, 4) 5408 TEST_TARGET_SIZE (PEXCEPTION_POINTERS, 8) 5409 TEST_TARGET_ALIGN(PEXCEPTION_POINTERS, 4) 5410 } 5411 5412 static void test_pack_PEXCEPTION_RECORD(void) 5413 { 5414 /* PEXCEPTION_RECORD */ 5415 TEST_TYPE_SIZE (PEXCEPTION_RECORD, 4) 5416 TEST_TYPE_ALIGN (PEXCEPTION_RECORD, 4) 5417 TEST_TARGET_SIZE (PEXCEPTION_RECORD, 80) 5418 TEST_TARGET_ALIGN(PEXCEPTION_RECORD, 4) 5419 } 5420 5421 static void test_pack_PFPO_DATA(void) 5422 { 5423 /* PFPO_DATA */ 5424 TEST_TYPE_SIZE (PFPO_DATA, 4) 5425 TEST_TYPE_ALIGN (PFPO_DATA, 4) 5426 TEST_TARGET_SIZE (PFPO_DATA, 16) 5427 TEST_TARGET_ALIGN(PFPO_DATA, 4) 5428 } 5429 5430 static void test_pack_PGENERIC_MAPPING(void) 5431 { 5432 /* PGENERIC_MAPPING */ 5433 TEST_TYPE_SIZE (PGENERIC_MAPPING, 4) 5434 TEST_TYPE_ALIGN (PGENERIC_MAPPING, 4) 5435 TEST_TARGET_SIZE (PGENERIC_MAPPING, 16) 5436 TEST_TARGET_ALIGN(PGENERIC_MAPPING, 4) 5437 } 5438 5439 static void test_pack_PHANDLE(void) 5440 { 5441 /* PHANDLE */ 5442 TEST_TYPE_SIZE (PHANDLE, 4) 5443 TEST_TYPE_ALIGN (PHANDLE, 4) 5444 TEST_TARGET_SIZE (PHANDLE, 4) 5445 TEST_TARGET_ALIGN(PHANDLE, 4) 5446 } 5447 5448 static void test_pack_PIMAGE_ARCHIVE_MEMBER_HEADER(void) 5449 { 5450 /* PIMAGE_ARCHIVE_MEMBER_HEADER */ 5451 TEST_TYPE_SIZE (PIMAGE_ARCHIVE_MEMBER_HEADER, 4) 5452 TEST_TYPE_ALIGN (PIMAGE_ARCHIVE_MEMBER_HEADER, 4) 5453 TEST_TARGET_SIZE (PIMAGE_ARCHIVE_MEMBER_HEADER, 60) 5454 TEST_TARGET_ALIGN(PIMAGE_ARCHIVE_MEMBER_HEADER, 1) 5455 } 5456 5457 static void test_pack_PIMAGE_AUX_SYMBOL(void) 5458 { 5459 /* PIMAGE_AUX_SYMBOL */ 5460 TEST_TYPE_SIZE (PIMAGE_AUX_SYMBOL, 4) 5461 TEST_TYPE_ALIGN (PIMAGE_AUX_SYMBOL, 4) 5462 } 5463 5464 static void test_pack_PIMAGE_BASE_RELOCATION(void) 5465 { 5466 /* PIMAGE_BASE_RELOCATION */ 5467 TEST_TYPE_SIZE (PIMAGE_BASE_RELOCATION, 4) 5468 TEST_TYPE_ALIGN (PIMAGE_BASE_RELOCATION, 4) 5469 TEST_TARGET_SIZE (PIMAGE_BASE_RELOCATION, 8) 5470 TEST_TARGET_ALIGN(PIMAGE_BASE_RELOCATION, 4) 5471 } 5472 5473 static void test_pack_PIMAGE_BOUND_FORWARDER_REF(void) 5474 { 5475 /* PIMAGE_BOUND_FORWARDER_REF */ 5476 TEST_TYPE_SIZE (PIMAGE_BOUND_FORWARDER_REF, 4) 5477 TEST_TYPE_ALIGN (PIMAGE_BOUND_FORWARDER_REF, 4) 5478 TEST_TARGET_SIZE (PIMAGE_BOUND_FORWARDER_REF, 8) 5479 TEST_TARGET_ALIGN(PIMAGE_BOUND_FORWARDER_REF, 4) 5480 } 5481 5482 static void test_pack_PIMAGE_BOUND_IMPORT_DESCRIPTOR(void) 5483 { 5484 /* PIMAGE_BOUND_IMPORT_DESCRIPTOR */ 5485 TEST_TYPE_SIZE (PIMAGE_BOUND_IMPORT_DESCRIPTOR, 4) 5486 TEST_TYPE_ALIGN (PIMAGE_BOUND_IMPORT_DESCRIPTOR, 4) 5487 TEST_TARGET_SIZE (PIMAGE_BOUND_IMPORT_DESCRIPTOR, 8) 5488 TEST_TARGET_ALIGN(PIMAGE_BOUND_IMPORT_DESCRIPTOR, 4) 5489 } 5490 5491 static void test_pack_PIMAGE_COFF_SYMBOLS_HEADER(void) 5492 { 5493 /* PIMAGE_COFF_SYMBOLS_HEADER */ 5494 TEST_TYPE_SIZE (PIMAGE_COFF_SYMBOLS_HEADER, 4) 5495 TEST_TYPE_ALIGN (PIMAGE_COFF_SYMBOLS_HEADER, 4) 5496 TEST_TARGET_SIZE (PIMAGE_COFF_SYMBOLS_HEADER, 32) 5497 TEST_TARGET_ALIGN(PIMAGE_COFF_SYMBOLS_HEADER, 4) 5498 } 5499 5500 static void test_pack_PIMAGE_DATA_DIRECTORY(void) 5501 { 5502 /* PIMAGE_DATA_DIRECTORY */ 5503 TEST_TYPE_SIZE (PIMAGE_DATA_DIRECTORY, 4) 5504 TEST_TYPE_ALIGN (PIMAGE_DATA_DIRECTORY, 4) 5505 TEST_TARGET_SIZE (PIMAGE_DATA_DIRECTORY, 8) 5506 TEST_TARGET_ALIGN(PIMAGE_DATA_DIRECTORY, 4) 5507 } 5508 5509 static void test_pack_PIMAGE_DEBUG_DIRECTORY(void) 5510 { 5511 /* PIMAGE_DEBUG_DIRECTORY */ 5512 TEST_TYPE_SIZE (PIMAGE_DEBUG_DIRECTORY, 4) 5513 TEST_TYPE_ALIGN (PIMAGE_DEBUG_DIRECTORY, 4) 5514 TEST_TARGET_SIZE (PIMAGE_DEBUG_DIRECTORY, 28) 5515 TEST_TARGET_ALIGN(PIMAGE_DEBUG_DIRECTORY, 4) 5516 } 5517 5518 static void test_pack_PIMAGE_DEBUG_MISC(void) 5519 { 5520 /* PIMAGE_DEBUG_MISC */ 5521 TEST_TYPE_SIZE (PIMAGE_DEBUG_MISC, 4) 5522 TEST_TYPE_ALIGN (PIMAGE_DEBUG_MISC, 4) 5523 TEST_TARGET_SIZE (PIMAGE_DEBUG_MISC, 16) 5524 TEST_TARGET_ALIGN(PIMAGE_DEBUG_MISC, 4) 5525 } 5526 5527 static void test_pack_PIMAGE_DOS_HEADER(void) 5528 { 5529 /* PIMAGE_DOS_HEADER */ 5530 TEST_TYPE_SIZE (PIMAGE_DOS_HEADER, 4) 5531 TEST_TYPE_ALIGN (PIMAGE_DOS_HEADER, 4) 5532 TEST_TARGET_SIZE (PIMAGE_DOS_HEADER, 64) 5533 TEST_TARGET_ALIGN(PIMAGE_DOS_HEADER, 2) 5534 } 5535 5536 static void test_pack_PIMAGE_EXPORT_DIRECTORY(void) 5537 { 5538 /* PIMAGE_EXPORT_DIRECTORY */ 5539 TEST_TYPE_SIZE (PIMAGE_EXPORT_DIRECTORY, 4) 5540 TEST_TYPE_ALIGN (PIMAGE_EXPORT_DIRECTORY, 4) 5541 TEST_TARGET_SIZE (PIMAGE_EXPORT_DIRECTORY, 40) 5542 TEST_TARGET_ALIGN(PIMAGE_EXPORT_DIRECTORY, 4) 5543 } 5544 5545 static void test_pack_PIMAGE_FILE_HEADER(void) 5546 { 5547 /* PIMAGE_FILE_HEADER */ 5548 TEST_TYPE_SIZE (PIMAGE_FILE_HEADER, 4) 5549 TEST_TYPE_ALIGN (PIMAGE_FILE_HEADER, 4) 5550 TEST_TARGET_SIZE (PIMAGE_FILE_HEADER, 20) 5551 TEST_TARGET_ALIGN(PIMAGE_FILE_HEADER, 4) 5552 } 5553 5554 static void test_pack_PIMAGE_FUNCTION_ENTRY(void) 5555 { 5556 /* PIMAGE_FUNCTION_ENTRY */ 5557 TEST_TYPE_SIZE (PIMAGE_FUNCTION_ENTRY, 4) 5558 TEST_TYPE_ALIGN (PIMAGE_FUNCTION_ENTRY, 4) 5559 TEST_TARGET_SIZE (PIMAGE_FUNCTION_ENTRY, 12) 5560 TEST_TARGET_ALIGN(PIMAGE_FUNCTION_ENTRY, 4) 5561 } 5562 5563 static void test_pack_PIMAGE_IMPORT_BY_NAME(void) 5564 { 5565 /* PIMAGE_IMPORT_BY_NAME */ 5566 TEST_TYPE_SIZE (PIMAGE_IMPORT_BY_NAME, 4) 5567 TEST_TYPE_ALIGN (PIMAGE_IMPORT_BY_NAME, 4) 5568 TEST_TARGET_SIZE (PIMAGE_IMPORT_BY_NAME, 4) 5569 TEST_TARGET_ALIGN(PIMAGE_IMPORT_BY_NAME, 2) 5570 } 5571 5572 static void test_pack_PIMAGE_IMPORT_DESCRIPTOR(void) 5573 { 5574 /* PIMAGE_IMPORT_DESCRIPTOR */ 5575 TEST_TYPE_SIZE (PIMAGE_IMPORT_DESCRIPTOR, 4) 5576 TEST_TYPE_ALIGN (PIMAGE_IMPORT_DESCRIPTOR, 4) 5577 } 5578 5579 static void test_pack_PIMAGE_LINENUMBER(void) 5580 { 5581 /* PIMAGE_LINENUMBER */ 5582 TEST_TYPE_SIZE (PIMAGE_LINENUMBER, 4) 5583 TEST_TYPE_ALIGN (PIMAGE_LINENUMBER, 4) 5584 } 5585 5586 static void test_pack_PIMAGE_LOAD_CONFIG_DIRECTORY(void) 5587 { 5588 /* PIMAGE_LOAD_CONFIG_DIRECTORY */ 5589 TEST_TYPE_SIZE (PIMAGE_LOAD_CONFIG_DIRECTORY, 4) 5590 TEST_TYPE_ALIGN (PIMAGE_LOAD_CONFIG_DIRECTORY, 4) 5591 } 5592 5593 static void test_pack_PIMAGE_NT_HEADERS(void) 5594 { 5595 /* PIMAGE_NT_HEADERS */ 5596 TEST_TYPE_SIZE (PIMAGE_NT_HEADERS, 4) 5597 TEST_TYPE_ALIGN (PIMAGE_NT_HEADERS, 4) 5598 } 5599 5600 static void test_pack_PIMAGE_NT_HEADERS32(void) 5601 { 5602 /* PIMAGE_NT_HEADERS32 */ 5603 TEST_TYPE_SIZE (PIMAGE_NT_HEADERS32, 4) 5604 TEST_TYPE_ALIGN (PIMAGE_NT_HEADERS32, 4) 5605 TEST_TARGET_SIZE (PIMAGE_NT_HEADERS32, 248) 5606 TEST_TARGET_ALIGN(PIMAGE_NT_HEADERS32, 4) 5607 } 5608 5609 static void test_pack_PIMAGE_NT_HEADERS64(void) 5610 { 5611 /* PIMAGE_NT_HEADERS64 */ 5612 TEST_TYPE_SIZE (PIMAGE_NT_HEADERS64, 4) 5613 TEST_TYPE_ALIGN (PIMAGE_NT_HEADERS64, 4) 5614 TEST_TARGET_SIZE (PIMAGE_NT_HEADERS64, 264) 5615 TEST_TARGET_ALIGN(PIMAGE_NT_HEADERS64, 8) 5616 } 5617 5618 static void test_pack_PIMAGE_OPTIONAL_HEADER(void) 5619 { 5620 /* PIMAGE_OPTIONAL_HEADER */ 5621 TEST_TYPE_SIZE (PIMAGE_OPTIONAL_HEADER, 4) 5622 TEST_TYPE_ALIGN (PIMAGE_OPTIONAL_HEADER, 4) 5623 } 5624 5625 static void test_pack_PIMAGE_OPTIONAL_HEADER32(void) 5626 { 5627 /* PIMAGE_OPTIONAL_HEADER32 */ 5628 TEST_TYPE_SIZE (PIMAGE_OPTIONAL_HEADER32, 4) 5629 TEST_TYPE_ALIGN (PIMAGE_OPTIONAL_HEADER32, 4) 5630 TEST_TARGET_SIZE (PIMAGE_OPTIONAL_HEADER32, 224) 5631 TEST_TARGET_ALIGN(PIMAGE_OPTIONAL_HEADER32, 4) 5632 } 5633 5634 static void test_pack_PIMAGE_OPTIONAL_HEADER64(void) 5635 { 5636 /* PIMAGE_OPTIONAL_HEADER64 */ 5637 TEST_TYPE_SIZE (PIMAGE_OPTIONAL_HEADER64, 4) 5638 TEST_TYPE_ALIGN (PIMAGE_OPTIONAL_HEADER64, 4) 5639 TEST_TARGET_SIZE (PIMAGE_OPTIONAL_HEADER64, 240) 5640 TEST_TARGET_ALIGN(PIMAGE_OPTIONAL_HEADER64, 8) 5641 } 5642 5643 static void test_pack_PIMAGE_OS2_HEADER(void) 5644 { 5645 /* PIMAGE_OS2_HEADER */ 5646 TEST_TYPE_SIZE (PIMAGE_OS2_HEADER, 4) 5647 TEST_TYPE_ALIGN (PIMAGE_OS2_HEADER, 4) 5648 TEST_TARGET_SIZE (PIMAGE_OS2_HEADER, 64) 5649 TEST_TARGET_ALIGN(PIMAGE_OS2_HEADER, 2) 5650 } 5651 5652 static void test_pack_PIMAGE_RELOCATION(void) 5653 { 5654 /* PIMAGE_RELOCATION */ 5655 TEST_TYPE_SIZE (PIMAGE_RELOCATION, 4) 5656 TEST_TYPE_ALIGN (PIMAGE_RELOCATION, 4) 5657 } 5658 5659 static void test_pack_PIMAGE_RESOURCE_DATA_ENTRY(void) 5660 { 5661 /* PIMAGE_RESOURCE_DATA_ENTRY */ 5662 TEST_TYPE_SIZE (PIMAGE_RESOURCE_DATA_ENTRY, 4) 5663 TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DATA_ENTRY, 4) 5664 TEST_TARGET_SIZE (PIMAGE_RESOURCE_DATA_ENTRY, 16) 5665 TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DATA_ENTRY, 4) 5666 } 5667 5668 static void test_pack_PIMAGE_RESOURCE_DIRECTORY(void) 5669 { 5670 /* PIMAGE_RESOURCE_DIRECTORY */ 5671 TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIRECTORY, 4) 5672 TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIRECTORY, 4) 5673 TEST_TARGET_SIZE (PIMAGE_RESOURCE_DIRECTORY, 16) 5674 TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DIRECTORY, 4) 5675 } 5676 5677 static void test_pack_PIMAGE_RESOURCE_DIRECTORY_ENTRY(void) 5678 { 5679 /* PIMAGE_RESOURCE_DIRECTORY_ENTRY */ 5680 TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIRECTORY_ENTRY, 4) 5681 TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIRECTORY_ENTRY, 4) 5682 } 5683 5684 static void test_pack_PIMAGE_RESOURCE_DIRECTORY_STRING(void) 5685 { 5686 /* PIMAGE_RESOURCE_DIRECTORY_STRING */ 5687 TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIRECTORY_STRING, 4) 5688 TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIRECTORY_STRING, 4) 5689 TEST_TARGET_SIZE (PIMAGE_RESOURCE_DIRECTORY_STRING, 4) 5690 TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DIRECTORY_STRING, 2) 5691 } 5692 5693 static void test_pack_PIMAGE_RESOURCE_DIR_STRING_U(void) 5694 { 5695 /* PIMAGE_RESOURCE_DIR_STRING_U */ 5696 TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIR_STRING_U, 4) 5697 TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIR_STRING_U, 4) 5698 TEST_TARGET_SIZE (PIMAGE_RESOURCE_DIR_STRING_U, 4) 5699 TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DIR_STRING_U, 2) 5700 } 5701 5702 static void test_pack_PIMAGE_SECTION_HEADER(void) 5703 { 5704 /* PIMAGE_SECTION_HEADER */ 5705 TEST_TYPE_SIZE (PIMAGE_SECTION_HEADER, 4) 5706 TEST_TYPE_ALIGN (PIMAGE_SECTION_HEADER, 4) 5707 } 5708 5709 static void test_pack_PIMAGE_SEPARATE_DEBUG_HEADER(void) 5710 { 5711 /* PIMAGE_SEPARATE_DEBUG_HEADER */ 5712 TEST_TYPE_SIZE (PIMAGE_SEPARATE_DEBUG_HEADER, 4) 5713 TEST_TYPE_ALIGN (PIMAGE_SEPARATE_DEBUG_HEADER, 4) 5714 TEST_TARGET_SIZE (PIMAGE_SEPARATE_DEBUG_HEADER, 48) 5715 TEST_TARGET_ALIGN(PIMAGE_SEPARATE_DEBUG_HEADER, 4) 5716 } 5717 5718 static void test_pack_PIMAGE_SYMBOL(void) 5719 { 5720 /* PIMAGE_SYMBOL */ 5721 TEST_TYPE_SIZE (PIMAGE_SYMBOL, 4) 5722 TEST_TYPE_ALIGN (PIMAGE_SYMBOL, 4) 5723 } 5724 5725 static void test_pack_PIMAGE_THUNK_DATA(void) 5726 { 5727 /* PIMAGE_THUNK_DATA */ 5728 TEST_TYPE_SIZE (PIMAGE_THUNK_DATA, 4) 5729 TEST_TYPE_ALIGN (PIMAGE_THUNK_DATA, 4) 5730 } 5731 5732 static void test_pack_PIMAGE_TLS_CALLBACK(void) 5733 { 5734 /* PIMAGE_TLS_CALLBACK */ 5735 TEST_TYPE_SIZE (PIMAGE_TLS_CALLBACK, 4) 5736 TEST_TYPE_ALIGN (PIMAGE_TLS_CALLBACK, 4) 5737 } 5738 5739 static void test_pack_PIMAGE_TLS_DIRECTORY(void) 5740 { 5741 /* PIMAGE_TLS_DIRECTORY */ 5742 TEST_TYPE_SIZE (PIMAGE_TLS_DIRECTORY, 4) 5743 TEST_TYPE_ALIGN (PIMAGE_TLS_DIRECTORY, 4) 5744 } 5745 5746 static void test_pack_PIMAGE_VXD_HEADER(void) 5747 { 5748 /* PIMAGE_VXD_HEADER */ 5749 TEST_TYPE_SIZE (PIMAGE_VXD_HEADER, 4) 5750 TEST_TYPE_ALIGN (PIMAGE_VXD_HEADER, 4) 5751 TEST_TARGET_SIZE (PIMAGE_VXD_HEADER, 196) 5752 TEST_TARGET_ALIGN(PIMAGE_VXD_HEADER, 2) 5753 } 5754 5755 static void test_pack_PIO_COUNTERS(void) 5756 { 5757 /* PIO_COUNTERS */ 5758 TEST_TYPE_SIZE (PIO_COUNTERS, 4) 5759 TEST_TYPE_ALIGN (PIO_COUNTERS, 4) 5760 TEST_TARGET_SIZE (PIO_COUNTERS, 48) 5761 TEST_TARGET_ALIGN(PIO_COUNTERS, 8) 5762 } 5763 5764 static void test_pack_PISECURITY_DESCRIPTOR(void) 5765 { 5766 /* PISECURITY_DESCRIPTOR */ 5767 TEST_TYPE_SIZE (PISECURITY_DESCRIPTOR, 4) 5768 TEST_TYPE_ALIGN (PISECURITY_DESCRIPTOR, 4) 5769 TEST_TARGET_SIZE (PISECURITY_DESCRIPTOR, 20) 5770 TEST_TARGET_ALIGN(PISECURITY_DESCRIPTOR, 4) 5771 } 5772 5773 static void test_pack_PISECURITY_DESCRIPTOR_RELATIVE(void) 5774 { 5775 /* PISECURITY_DESCRIPTOR_RELATIVE */ 5776 TEST_TYPE_SIZE (PISECURITY_DESCRIPTOR_RELATIVE, 4) 5777 TEST_TYPE_ALIGN (PISECURITY_DESCRIPTOR_RELATIVE, 4) 5778 TEST_TARGET_SIZE (PISECURITY_DESCRIPTOR_RELATIVE, 20) 5779 TEST_TARGET_ALIGN(PISECURITY_DESCRIPTOR_RELATIVE, 4) 5780 } 5781 5782 static void test_pack_PISID(void) 5783 { 5784 /* PISID */ 5785 TEST_TYPE_SIZE (PISID, 4) 5786 TEST_TYPE_ALIGN (PISID, 4) 5787 TEST_TARGET_SIZE (PISID, 12) 5788 TEST_TARGET_ALIGN(PISID, 4) 5789 } 5790 5791 static void test_pack_PLARGE_INTEGER(void) 5792 { 5793 /* PLARGE_INTEGER */ 5794 TEST_TYPE_SIZE (PLARGE_INTEGER, 4) 5795 TEST_TYPE_ALIGN (PLARGE_INTEGER, 4) 5796 } 5797 5798 static void test_pack_PLIST_ENTRY(void) 5799 { 5800 /* PLIST_ENTRY */ 5801 TEST_TYPE_SIZE (PLIST_ENTRY, 4) 5802 TEST_TYPE_ALIGN (PLIST_ENTRY, 4) 5803 TEST_TARGET_SIZE (PLIST_ENTRY, 8) 5804 TEST_TARGET_ALIGN(PLIST_ENTRY, 4) 5805 } 5806 5807 static void test_pack_PLUID(void) 5808 { 5809 /* PLUID */ 5810 TEST_TYPE_SIZE (PLUID, 4) 5811 TEST_TYPE_ALIGN (PLUID, 4) 5812 TEST_TARGET_SIZE (PLUID, 8) 5813 TEST_TARGET_ALIGN(PLUID, 4) 5814 } 5815 5816 static void test_pack_PLUID_AND_ATTRIBUTES(void) 5817 { 5818 /* PLUID_AND_ATTRIBUTES */ 5819 TEST_TYPE_SIZE (PLUID_AND_ATTRIBUTES, 4) 5820 TEST_TYPE_ALIGN (PLUID_AND_ATTRIBUTES, 4) 5821 TEST_TARGET_SIZE (PLUID_AND_ATTRIBUTES, 12) 5822 TEST_TARGET_ALIGN(PLUID_AND_ATTRIBUTES, 4) 5823 } 5824 5825 static void test_pack_PMEMORY_BASIC_INFORMATION(void) 5826 { 5827 /* PMEMORY_BASIC_INFORMATION */ 5828 TEST_TYPE_SIZE (PMEMORY_BASIC_INFORMATION, 4) 5829 TEST_TYPE_ALIGN (PMEMORY_BASIC_INFORMATION, 4) 5830 TEST_TARGET_SIZE (PMEMORY_BASIC_INFORMATION, 28) 5831 TEST_TARGET_ALIGN(PMEMORY_BASIC_INFORMATION, 4) 5832 } 5833 5834 static void test_pack_PMESSAGE_RESOURCE_BLOCK(void) 5835 { 5836 /* PMESSAGE_RESOURCE_BLOCK */ 5837 TEST_TYPE_SIZE (PMESSAGE_RESOURCE_BLOCK, 4) 5838 TEST_TYPE_ALIGN (PMESSAGE_RESOURCE_BLOCK, 4) 5839 TEST_TARGET_SIZE (PMESSAGE_RESOURCE_BLOCK, 12) 5840 TEST_TARGET_ALIGN(PMESSAGE_RESOURCE_BLOCK, 4) 5841 } 5842 5843 static void test_pack_PMESSAGE_RESOURCE_DATA(void) 5844 { 5845 /* PMESSAGE_RESOURCE_DATA */ 5846 TEST_TYPE_SIZE (PMESSAGE_RESOURCE_DATA, 4) 5847 TEST_TYPE_ALIGN (PMESSAGE_RESOURCE_DATA, 4) 5848 TEST_TARGET_SIZE (PMESSAGE_RESOURCE_DATA, 16) 5849 TEST_TARGET_ALIGN(PMESSAGE_RESOURCE_DATA, 4) 5850 } 5851 5852 static void test_pack_PMESSAGE_RESOURCE_ENTRY(void) 5853 { 5854 /* PMESSAGE_RESOURCE_ENTRY */ 5855 TEST_TYPE_SIZE (PMESSAGE_RESOURCE_ENTRY, 4) 5856 TEST_TYPE_ALIGN (PMESSAGE_RESOURCE_ENTRY, 4) 5857 TEST_TARGET_SIZE (PMESSAGE_RESOURCE_ENTRY, 6) 5858 TEST_TARGET_ALIGN(PMESSAGE_RESOURCE_ENTRY, 2) 5859 } 5860 5861 static void test_pack_PNT_TIB(void) 5862 { 5863 /* PNT_TIB */ 5864 TEST_TYPE_SIZE (PNT_TIB, 4) 5865 TEST_TYPE_ALIGN (PNT_TIB, 4) 5866 } 5867 5868 static void test_pack_POBJECT_TYPE_LIST(void) 5869 { 5870 /* POBJECT_TYPE_LIST */ 5871 TEST_TYPE_SIZE (POBJECT_TYPE_LIST, 4) 5872 TEST_TYPE_ALIGN (POBJECT_TYPE_LIST, 4) 5873 TEST_TARGET_SIZE (POBJECT_TYPE_LIST, 8) 5874 TEST_TARGET_ALIGN(POBJECT_TYPE_LIST, 4) 5875 } 5876 5877 static void test_pack_PPRIVILEGE_SET(void) 5878 { 5879 /* PPRIVILEGE_SET */ 5880 TEST_TYPE_SIZE (PPRIVILEGE_SET, 4) 5881 TEST_TYPE_ALIGN (PPRIVILEGE_SET, 4) 5882 TEST_TARGET_SIZE (PPRIVILEGE_SET, 20) 5883 TEST_TARGET_ALIGN(PPRIVILEGE_SET, 4) 5884 } 5885 5886 static void test_pack_PRIVILEGE_SET(void) 5887 { 5888 /* PRIVILEGE_SET */ 5889 TEST_TYPE_SIZE (PRIVILEGE_SET, 20) 5890 TEST_TYPE_ALIGN (PRIVILEGE_SET, 4) 5891 TEST_FIELD_SIZE (PRIVILEGE_SET, PrivilegeCount, 4) 5892 TEST_FIELD_ALIGN (PRIVILEGE_SET, PrivilegeCount, 4) 5893 TEST_FIELD_OFFSET(PRIVILEGE_SET, PrivilegeCount, 0) 5894 TEST_FIELD_SIZE (PRIVILEGE_SET, Control, 4) 5895 TEST_FIELD_ALIGN (PRIVILEGE_SET, Control, 4) 5896 TEST_FIELD_OFFSET(PRIVILEGE_SET, Control, 4) 5897 TEST_FIELD_SIZE (PRIVILEGE_SET, Privilege, 12) 5898 TEST_FIELD_ALIGN (PRIVILEGE_SET, Privilege, 4) 5899 TEST_FIELD_OFFSET(PRIVILEGE_SET, Privilege, 8) 5900 } 5901 5902 static void test_pack_PRLIST_ENTRY(void) 5903 { 5904 /* PRLIST_ENTRY */ 5905 TEST_TYPE_SIZE (PRLIST_ENTRY, 4) 5906 TEST_TYPE_ALIGN (PRLIST_ENTRY, 4) 5907 TEST_TARGET_SIZE (PRLIST_ENTRY, 8) 5908 TEST_TARGET_ALIGN(PRLIST_ENTRY, 4) 5909 } 5910 5911 static void test_pack_PRTL_CRITICAL_SECTION(void) 5912 { 5913 /* PRTL_CRITICAL_SECTION */ 5914 TEST_TYPE_SIZE (PRTL_CRITICAL_SECTION, 4) 5915 TEST_TYPE_ALIGN (PRTL_CRITICAL_SECTION, 4) 5916 TEST_TARGET_SIZE (PRTL_CRITICAL_SECTION, 24) 5917 TEST_TARGET_ALIGN(PRTL_CRITICAL_SECTION, 4) 5918 } 5919 5920 static void test_pack_PRTL_CRITICAL_SECTION_DEBUG(void) 5921 { 5922 /* PRTL_CRITICAL_SECTION_DEBUG */ 5923 TEST_TYPE_SIZE (PRTL_CRITICAL_SECTION_DEBUG, 4) 5924 TEST_TYPE_ALIGN (PRTL_CRITICAL_SECTION_DEBUG, 4) 5925 } 5926 5927 static void test_pack_PRTL_OSVERSIONINFOEXW(void) 5928 { 5929 /* PRTL_OSVERSIONINFOEXW */ 5930 TEST_TYPE_SIZE (PRTL_OSVERSIONINFOEXW, 4) 5931 TEST_TYPE_ALIGN (PRTL_OSVERSIONINFOEXW, 4) 5932 TEST_TARGET_SIZE (PRTL_OSVERSIONINFOEXW, 284) 5933 TEST_TARGET_ALIGN(PRTL_OSVERSIONINFOEXW, 4) 5934 } 5935 5936 static void test_pack_PRTL_OSVERSIONINFOW(void) 5937 { 5938 /* PRTL_OSVERSIONINFOW */ 5939 TEST_TYPE_SIZE (PRTL_OSVERSIONINFOW, 4) 5940 TEST_TYPE_ALIGN (PRTL_OSVERSIONINFOW, 4) 5941 TEST_TARGET_SIZE (PRTL_OSVERSIONINFOW, 276) 5942 TEST_TARGET_ALIGN(PRTL_OSVERSIONINFOW, 4) 5943 } 5944 5945 static void test_pack_PRTL_RESOURCE_DEBUG(void) 5946 { 5947 /* PRTL_RESOURCE_DEBUG */ 5948 TEST_TYPE_SIZE (PRTL_RESOURCE_DEBUG, 4) 5949 TEST_TYPE_ALIGN (PRTL_RESOURCE_DEBUG, 4) 5950 } 5951 5952 static void test_pack_PSECURITY_DESCRIPTOR(void) 5953 { 5954 /* PSECURITY_DESCRIPTOR */ 5955 TEST_TYPE_SIZE (PSECURITY_DESCRIPTOR, 4) 5956 TEST_TYPE_ALIGN (PSECURITY_DESCRIPTOR, 4) 5957 } 5958 5959 static void test_pack_PSECURITY_QUALITY_OF_SERVICE(void) 5960 { 5961 /* PSECURITY_QUALITY_OF_SERVICE */ 5962 TEST_TYPE_SIZE (PSECURITY_QUALITY_OF_SERVICE, 4) 5963 TEST_TYPE_ALIGN (PSECURITY_QUALITY_OF_SERVICE, 4) 5964 } 5965 5966 static void test_pack_PSID(void) 5967 { 5968 /* PSID */ 5969 TEST_TYPE_SIZE (PSID, 4) 5970 TEST_TYPE_ALIGN (PSID, 4) 5971 } 5972 5973 static void test_pack_PSID_IDENTIFIER_AUTHORITY(void) 5974 { 5975 /* PSID_IDENTIFIER_AUTHORITY */ 5976 TEST_TYPE_SIZE (PSID_IDENTIFIER_AUTHORITY, 4) 5977 TEST_TYPE_ALIGN (PSID_IDENTIFIER_AUTHORITY, 4) 5978 TEST_TARGET_SIZE (PSID_IDENTIFIER_AUTHORITY, 6) 5979 TEST_TARGET_ALIGN(PSID_IDENTIFIER_AUTHORITY, 1) 5980 } 5981 5982 static void test_pack_PSINGLE_LIST_ENTRY(void) 5983 { 5984 /* PSINGLE_LIST_ENTRY */ 5985 TEST_TYPE_SIZE (PSINGLE_LIST_ENTRY, 4) 5986 TEST_TYPE_ALIGN (PSINGLE_LIST_ENTRY, 4) 5987 TEST_TARGET_SIZE (PSINGLE_LIST_ENTRY, 4) 5988 TEST_TARGET_ALIGN(PSINGLE_LIST_ENTRY, 4) 5989 } 5990 5991 static void test_pack_PSTR(void) 5992 { 5993 /* PSTR */ 5994 TEST_TYPE_SIZE (PSTR, 4) 5995 TEST_TYPE_ALIGN (PSTR, 4) 5996 TEST_TARGET_SIZE (PSTR, 1) 5997 TEST_TARGET_ALIGN(PSTR, 1) 5998 } 5999 6000 static void test_pack_PSYSTEM_ALARM_ACE(void) 6001 { 6002 /* PSYSTEM_ALARM_ACE */ 6003 TEST_TYPE_SIZE (PSYSTEM_ALARM_ACE, 4) 6004 TEST_TYPE_ALIGN (PSYSTEM_ALARM_ACE, 4) 6005 TEST_TARGET_SIZE (PSYSTEM_ALARM_ACE, 12) 6006 TEST_TARGET_ALIGN(PSYSTEM_ALARM_ACE, 4) 6007 } 6008 6009 static void test_pack_PSYSTEM_AUDIT_ACE(void) 6010 { 6011 /* PSYSTEM_AUDIT_ACE */ 6012 TEST_TYPE_SIZE (PSYSTEM_AUDIT_ACE, 4) 6013 TEST_TYPE_ALIGN (PSYSTEM_AUDIT_ACE, 4) 6014 TEST_TARGET_SIZE (PSYSTEM_AUDIT_ACE, 12) 6015 TEST_TARGET_ALIGN(PSYSTEM_AUDIT_ACE, 4) 6016 } 6017 6018 static void test_pack_PTOKEN_GROUPS(void) 6019 { 6020 /* PTOKEN_GROUPS */ 6021 TEST_TYPE_SIZE (PTOKEN_GROUPS, 4) 6022 TEST_TYPE_ALIGN (PTOKEN_GROUPS, 4) 6023 TEST_TARGET_SIZE (PTOKEN_GROUPS, 12) 6024 TEST_TARGET_ALIGN(PTOKEN_GROUPS, 4) 6025 } 6026 6027 static void test_pack_PTOKEN_PRIVILEGES(void) 6028 { 6029 /* PTOKEN_PRIVILEGES */ 6030 TEST_TYPE_SIZE (PTOKEN_PRIVILEGES, 4) 6031 TEST_TYPE_ALIGN (PTOKEN_PRIVILEGES, 4) 6032 TEST_TARGET_SIZE (PTOKEN_PRIVILEGES, 16) 6033 TEST_TARGET_ALIGN(PTOKEN_PRIVILEGES, 4) 6034 } 6035 6036 static void test_pack_PTOKEN_USER(void) 6037 { 6038 /* PTOKEN_USER */ 6039 TEST_TYPE_SIZE (PTOKEN_USER, 4) 6040 TEST_TYPE_ALIGN (PTOKEN_USER, 4) 6041 TEST_TARGET_SIZE (PTOKEN_USER, 8) 6042 TEST_TARGET_ALIGN(PTOKEN_USER, 4) 6043 } 6044 6045 static void test_pack_PULARGE_INTEGER(void) 6046 { 6047 /* PULARGE_INTEGER */ 6048 TEST_TYPE_SIZE (PULARGE_INTEGER, 4) 6049 TEST_TYPE_ALIGN (PULARGE_INTEGER, 4) 6050 } 6051 6052 static void test_pack_PVECTORED_EXCEPTION_HANDLER(void) 6053 { 6054 /* PVECTORED_EXCEPTION_HANDLER */ 6055 TEST_TYPE_SIZE (PVECTORED_EXCEPTION_HANDLER, 4) 6056 TEST_TYPE_ALIGN (PVECTORED_EXCEPTION_HANDLER, 4) 6057 } 6058 6059 static void test_pack_PVOID(void) 6060 { 6061 /* PVOID */ 6062 TEST_TYPE_SIZE (PVOID, 4) 6063 TEST_TYPE_ALIGN (PVOID, 4) 6064 } 6065 6066 static void test_pack_PWCH(void) 6067 { 6068 /* PWCH */ 6069 TEST_TYPE_SIZE (PWCH, 4) 6070 TEST_TYPE_ALIGN (PWCH, 4) 6071 TEST_TARGET_SIZE (PWCH, 2) 6072 TEST_TARGET_ALIGN(PWCH, 2) 6073 } 6074 6075 static void test_pack_PWSTR(void) 6076 { 6077 /* PWSTR */ 6078 TEST_TYPE_SIZE (PWSTR, 4) 6079 TEST_TYPE_ALIGN (PWSTR, 4) 6080 TEST_TARGET_SIZE (PWSTR, 2) 6081 TEST_TARGET_ALIGN(PWSTR, 2) 6082 } 6083 6084 static void test_pack_RTL_CRITICAL_SECTION(void) 6085 { 6086 /* RTL_CRITICAL_SECTION */ 6087 TEST_TYPE_SIZE (RTL_CRITICAL_SECTION, 24) 6088 TEST_TYPE_ALIGN (RTL_CRITICAL_SECTION, 4) 6089 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, DebugInfo, 4) 6090 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, DebugInfo, 4) 6091 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, DebugInfo, 0) 6092 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, LockCount, 4) 6093 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, LockCount, 4) 6094 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, LockCount, 4) 6095 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, RecursionCount, 4) 6096 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, RecursionCount, 4) 6097 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, RecursionCount, 8) 6098 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, OwningThread, 4) 6099 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, OwningThread, 4) 6100 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, OwningThread, 12) 6101 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, LockSemaphore, 4) 6102 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, LockSemaphore, 4) 6103 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, LockSemaphore, 16) 6104 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, SpinCount, 4) 6105 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, SpinCount, 4) 6106 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, SpinCount, 20) 6107 } 6108 6109 static void test_pack_RTL_CRITICAL_SECTION_DEBUG(void) 6110 { 6111 /* RTL_CRITICAL_SECTION_DEBUG */ 6112 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, Type, 2) 6113 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, Type, 2) 6114 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, Type, 0) 6115 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, CreatorBackTraceIndex, 2) 6116 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, CreatorBackTraceIndex, 2) 6117 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, CreatorBackTraceIndex, 2) 6118 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, CriticalSection, 4) 6119 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, CriticalSection, 4) 6120 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, CriticalSection, 4) 6121 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, ProcessLocksList, 8) 6122 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, ProcessLocksList, 4) 6123 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, ProcessLocksList, 8) 6124 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, EntryCount, 4) 6125 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, EntryCount, 4) 6126 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, EntryCount, 16) 6127 TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, ContentionCount, 4) 6128 TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, ContentionCount, 4) 6129 TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, ContentionCount, 20) 6130 } 6131 6132 static void test_pack_RTL_OSVERSIONINFOEXW(void) 6133 { 6134 /* RTL_OSVERSIONINFOEXW */ 6135 TEST_TYPE_SIZE (RTL_OSVERSIONINFOEXW, 284) 6136 TEST_TYPE_ALIGN (RTL_OSVERSIONINFOEXW, 4) 6137 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwOSVersionInfoSize, 4) 6138 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwOSVersionInfoSize, 4) 6139 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwOSVersionInfoSize, 0) 6140 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwMajorVersion, 4) 6141 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwMajorVersion, 4) 6142 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwMajorVersion, 4) 6143 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwMinorVersion, 4) 6144 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwMinorVersion, 4) 6145 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwMinorVersion, 8) 6146 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwBuildNumber, 4) 6147 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwBuildNumber, 4) 6148 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwBuildNumber, 12) 6149 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwPlatformId, 4) 6150 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwPlatformId, 4) 6151 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwPlatformId, 16) 6152 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, szCSDVersion, 256) 6153 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, szCSDVersion, 2) 6154 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, szCSDVersion, 20) 6155 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wServicePackMajor, 2) 6156 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wServicePackMajor, 2) 6157 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wServicePackMajor, 276) 6158 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wServicePackMinor, 2) 6159 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wServicePackMinor, 2) 6160 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wServicePackMinor, 278) 6161 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wSuiteMask, 2) 6162 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wSuiteMask, 2) 6163 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wSuiteMask, 280) 6164 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wProductType, 1) 6165 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wProductType, 1) 6166 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wProductType, 282) 6167 TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wReserved, 1) 6168 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wReserved, 1) 6169 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wReserved, 283) 6170 } 6171 6172 static void test_pack_RTL_OSVERSIONINFOW(void) 6173 { 6174 /* RTL_OSVERSIONINFOW */ 6175 TEST_TYPE_SIZE (RTL_OSVERSIONINFOW, 276) 6176 TEST_TYPE_ALIGN (RTL_OSVERSIONINFOW, 4) 6177 TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwOSVersionInfoSize, 4) 6178 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwOSVersionInfoSize, 4) 6179 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwOSVersionInfoSize, 0) 6180 TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwMajorVersion, 4) 6181 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwMajorVersion, 4) 6182 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwMajorVersion, 4) 6183 TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwMinorVersion, 4) 6184 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwMinorVersion, 4) 6185 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwMinorVersion, 8) 6186 TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwBuildNumber, 4) 6187 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwBuildNumber, 4) 6188 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwBuildNumber, 12) 6189 TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwPlatformId, 4) 6190 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwPlatformId, 4) 6191 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwPlatformId, 16) 6192 TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, szCSDVersion, 256) 6193 TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, szCSDVersion, 2) 6194 TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, szCSDVersion, 20) 6195 } 6196 6197 static void test_pack_RTL_RESOURCE_DEBUG(void) 6198 { 6199 /* RTL_RESOURCE_DEBUG */ 6200 TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, Type, 2) 6201 TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, Type, 2) 6202 TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, Type, 0) 6203 TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, CreatorBackTraceIndex, 2) 6204 TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, CreatorBackTraceIndex, 2) 6205 TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, CreatorBackTraceIndex, 2) 6206 TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, CriticalSection, 4) 6207 TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, CriticalSection, 4) 6208 TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, CriticalSection, 4) 6209 TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, ProcessLocksList, 8) 6210 TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, ProcessLocksList, 4) 6211 TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, ProcessLocksList, 8) 6212 TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, EntryCount, 4) 6213 TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, EntryCount, 4) 6214 TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, EntryCount, 16) 6215 TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, ContentionCount, 4) 6216 TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, ContentionCount, 4) 6217 TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, ContentionCount, 20) 6218 } 6219 6220 static void test_pack_SECURITY_CONTEXT_TRACKING_MODE(void) 6221 { 6222 /* SECURITY_CONTEXT_TRACKING_MODE */ 6223 TEST_TYPE_SIZE (SECURITY_CONTEXT_TRACKING_MODE, 1) 6224 TEST_TYPE_ALIGN (SECURITY_CONTEXT_TRACKING_MODE, 1) 6225 } 6226 6227 static void test_pack_SECURITY_DESCRIPTOR(void) 6228 { 6229 /* SECURITY_DESCRIPTOR */ 6230 TEST_TYPE_SIZE (SECURITY_DESCRIPTOR, 20) 6231 TEST_TYPE_ALIGN (SECURITY_DESCRIPTOR, 4) 6232 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Revision, 1) 6233 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Revision, 1) 6234 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Revision, 0) 6235 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Sbz1, 1) 6236 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Sbz1, 1) 6237 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Sbz1, 1) 6238 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Control, 2) 6239 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Control, 2) 6240 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Control, 2) 6241 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Owner, 4) 6242 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Owner, 4) 6243 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Owner, 4) 6244 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Group, 4) 6245 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Group, 4) 6246 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Group, 8) 6247 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Sacl, 4) 6248 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Sacl, 4) 6249 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Sacl, 12) 6250 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Dacl, 4) 6251 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Dacl, 4) 6252 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Dacl, 16) 6253 } 6254 6255 static void test_pack_SECURITY_DESCRIPTOR_CONTROL(void) 6256 { 6257 /* SECURITY_DESCRIPTOR_CONTROL */ 6258 TEST_TYPE_SIZE (SECURITY_DESCRIPTOR_CONTROL, 2) 6259 TEST_TYPE_ALIGN (SECURITY_DESCRIPTOR_CONTROL, 2) 6260 TEST_TYPE_UNSIGNED(SECURITY_DESCRIPTOR_CONTROL) 6261 } 6262 6263 static void test_pack_SECURITY_DESCRIPTOR_RELATIVE(void) 6264 { 6265 /* SECURITY_DESCRIPTOR_RELATIVE */ 6266 TEST_TYPE_SIZE (SECURITY_DESCRIPTOR_RELATIVE, 20) 6267 TEST_TYPE_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, 4) 6268 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Revision, 1) 6269 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Revision, 1) 6270 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Revision, 0) 6271 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Sbz1, 1) 6272 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Sbz1, 1) 6273 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Sbz1, 1) 6274 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Control, 2) 6275 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Control, 2) 6276 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Control, 2) 6277 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Owner, 4) 6278 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Owner, 4) 6279 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Owner, 4) 6280 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Group, 4) 6281 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Group, 4) 6282 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Group, 8) 6283 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Sacl, 4) 6284 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Sacl, 4) 6285 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Sacl, 12) 6286 TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Dacl, 4) 6287 TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Dacl, 4) 6288 TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Dacl, 16) 6289 } 6290 6291 static void test_pack_SECURITY_INFORMATION(void) 6292 { 6293 /* SECURITY_INFORMATION */ 6294 TEST_TYPE_SIZE (SECURITY_INFORMATION, 4) 6295 TEST_TYPE_ALIGN (SECURITY_INFORMATION, 4) 6296 TEST_TYPE_UNSIGNED(SECURITY_INFORMATION) 6297 } 6298 6299 static void test_pack_SECURITY_QUALITY_OF_SERVICE(void) 6300 { 6301 /* SECURITY_QUALITY_OF_SERVICE */ 6302 TEST_FIELD_SIZE (SECURITY_QUALITY_OF_SERVICE, Length, 4) 6303 TEST_FIELD_ALIGN (SECURITY_QUALITY_OF_SERVICE, Length, 4) 6304 TEST_FIELD_OFFSET(SECURITY_QUALITY_OF_SERVICE, Length, 0) 6305 } 6306 6307 static void test_pack_SHORT(void) 6308 { 6309 /* SHORT */ 6310 TEST_TYPE_SIZE (SHORT, 2) 6311 TEST_TYPE_ALIGN (SHORT, 2) 6312 TEST_TYPE_SIGNED(SHORT) 6313 } 6314 6315 static void test_pack_SID(void) 6316 { 6317 /* SID */ 6318 TEST_TYPE_SIZE (SID, 12) 6319 TEST_TYPE_ALIGN (SID, 4) 6320 TEST_FIELD_SIZE (SID, Revision, 1) 6321 TEST_FIELD_ALIGN (SID, Revision, 1) 6322 TEST_FIELD_OFFSET(SID, Revision, 0) 6323 TEST_FIELD_SIZE (SID, SubAuthorityCount, 1) 6324 TEST_FIELD_ALIGN (SID, SubAuthorityCount, 1) 6325 TEST_FIELD_OFFSET(SID, SubAuthorityCount, 1) 6326 TEST_FIELD_SIZE (SID, IdentifierAuthority, 6) 6327 TEST_FIELD_ALIGN (SID, IdentifierAuthority, 1) 6328 TEST_FIELD_OFFSET(SID, IdentifierAuthority, 2) 6329 TEST_FIELD_SIZE (SID, SubAuthority, 4) 6330 TEST_FIELD_ALIGN (SID, SubAuthority, 4) 6331 TEST_FIELD_OFFSET(SID, SubAuthority, 8) 6332 } 6333 6334 static void test_pack_SID_AND_ATTRIBUTES(void) 6335 { 6336 /* SID_AND_ATTRIBUTES */ 6337 TEST_TYPE_SIZE (SID_AND_ATTRIBUTES, 8) 6338 TEST_TYPE_ALIGN (SID_AND_ATTRIBUTES, 4) 6339 TEST_FIELD_SIZE (SID_AND_ATTRIBUTES, Sid, 4) 6340 TEST_FIELD_ALIGN (SID_AND_ATTRIBUTES, Sid, 4) 6341 TEST_FIELD_OFFSET(SID_AND_ATTRIBUTES, Sid, 0) 6342 TEST_FIELD_SIZE (SID_AND_ATTRIBUTES, Attributes, 4) 6343 TEST_FIELD_ALIGN (SID_AND_ATTRIBUTES, Attributes, 4) 6344 TEST_FIELD_OFFSET(SID_AND_ATTRIBUTES, Attributes, 4) 6345 } 6346 6347 static void test_pack_SID_IDENTIFIER_AUTHORITY(void) 6348 { 6349 /* SID_IDENTIFIER_AUTHORITY */ 6350 TEST_TYPE_SIZE (SID_IDENTIFIER_AUTHORITY, 6) 6351 TEST_TYPE_ALIGN (SID_IDENTIFIER_AUTHORITY, 1) 6352 TEST_FIELD_SIZE (SID_IDENTIFIER_AUTHORITY, Value, 6) 6353 TEST_FIELD_ALIGN (SID_IDENTIFIER_AUTHORITY, Value, 1) 6354 TEST_FIELD_OFFSET(SID_IDENTIFIER_AUTHORITY, Value, 0) 6355 } 6356 6357 static void test_pack_SINGLE_LIST_ENTRY(void) 6358 { 6359 /* SINGLE_LIST_ENTRY */ 6360 TEST_TYPE_SIZE (SINGLE_LIST_ENTRY, 4) 6361 TEST_TYPE_ALIGN (SINGLE_LIST_ENTRY, 4) 6362 TEST_FIELD_SIZE (SINGLE_LIST_ENTRY, Next, 4) 6363 TEST_FIELD_ALIGN (SINGLE_LIST_ENTRY, Next, 4) 6364 TEST_FIELD_OFFSET(SINGLE_LIST_ENTRY, Next, 0) 6365 } 6366 6367 static void test_pack_SYSTEM_ALARM_ACE(void) 6368 { 6369 /* SYSTEM_ALARM_ACE */ 6370 TEST_TYPE_SIZE (SYSTEM_ALARM_ACE, 12) 6371 TEST_TYPE_ALIGN (SYSTEM_ALARM_ACE, 4) 6372 TEST_FIELD_SIZE (SYSTEM_ALARM_ACE, Header, 4) 6373 TEST_FIELD_ALIGN (SYSTEM_ALARM_ACE, Header, 2) 6374 TEST_FIELD_OFFSET(SYSTEM_ALARM_ACE, Header, 0) 6375 TEST_FIELD_SIZE (SYSTEM_ALARM_ACE, Mask, 4) 6376 TEST_FIELD_ALIGN (SYSTEM_ALARM_ACE, Mask, 4) 6377 TEST_FIELD_OFFSET(SYSTEM_ALARM_ACE, Mask, 4) 6378 TEST_FIELD_SIZE (SYSTEM_ALARM_ACE, SidStart, 4) 6379 TEST_FIELD_ALIGN (SYSTEM_ALARM_ACE, SidStart, 4) 6380 TEST_FIELD_OFFSET(SYSTEM_ALARM_ACE, SidStart, 8) 6381 } 6382 6383 static void test_pack_SYSTEM_AUDIT_ACE(void) 6384 { 6385 /* SYSTEM_AUDIT_ACE */ 6386 TEST_TYPE_SIZE (SYSTEM_AUDIT_ACE, 12) 6387 TEST_TYPE_ALIGN (SYSTEM_AUDIT_ACE, 4) 6388 TEST_FIELD_SIZE (SYSTEM_AUDIT_ACE, Header, 4) 6389 TEST_FIELD_ALIGN (SYSTEM_AUDIT_ACE, Header, 2) 6390 TEST_FIELD_OFFSET(SYSTEM_AUDIT_ACE, Header, 0) 6391 TEST_FIELD_SIZE (SYSTEM_AUDIT_ACE, Mask, 4) 6392 TEST_FIELD_ALIGN (SYSTEM_AUDIT_ACE, Mask, 4) 6393 TEST_FIELD_OFFSET(SYSTEM_AUDIT_ACE, Mask, 4) 6394 TEST_FIELD_SIZE (SYSTEM_AUDIT_ACE, SidStart, 4) 6395 TEST_FIELD_ALIGN (SYSTEM_AUDIT_ACE, SidStart, 4) 6396 TEST_FIELD_OFFSET(SYSTEM_AUDIT_ACE, SidStart, 8) 6397 } 6398 6399 static void test_pack_TOKEN_DEFAULT_DACL(void) 6400 { 6401 /* TOKEN_DEFAULT_DACL */ 6402 TEST_TYPE_SIZE (TOKEN_DEFAULT_DACL, 4) 6403 TEST_TYPE_ALIGN (TOKEN_DEFAULT_DACL, 4) 6404 TEST_FIELD_SIZE (TOKEN_DEFAULT_DACL, DefaultDacl, 4) 6405 TEST_FIELD_ALIGN (TOKEN_DEFAULT_DACL, DefaultDacl, 4) 6406 TEST_FIELD_OFFSET(TOKEN_DEFAULT_DACL, DefaultDacl, 0) 6407 } 6408 6409 static void test_pack_TOKEN_GROUPS(void) 6410 { 6411 /* TOKEN_GROUPS */ 6412 TEST_TYPE_SIZE (TOKEN_GROUPS, 12) 6413 TEST_TYPE_ALIGN (TOKEN_GROUPS, 4) 6414 TEST_FIELD_SIZE (TOKEN_GROUPS, GroupCount, 4) 6415 TEST_FIELD_ALIGN (TOKEN_GROUPS, GroupCount, 4) 6416 TEST_FIELD_OFFSET(TOKEN_GROUPS, GroupCount, 0) 6417 TEST_FIELD_SIZE (TOKEN_GROUPS, Groups, 8) 6418 TEST_FIELD_ALIGN (TOKEN_GROUPS, Groups, 4) 6419 TEST_FIELD_OFFSET(TOKEN_GROUPS, Groups, 4) 6420 } 6421 6422 static void test_pack_TOKEN_OWNER(void) 6423 { 6424 /* TOKEN_OWNER */ 6425 TEST_TYPE_SIZE (TOKEN_OWNER, 4) 6426 TEST_TYPE_ALIGN (TOKEN_OWNER, 4) 6427 TEST_FIELD_SIZE (TOKEN_OWNER, Owner, 4) 6428 TEST_FIELD_ALIGN (TOKEN_OWNER, Owner, 4) 6429 TEST_FIELD_OFFSET(TOKEN_OWNER, Owner, 0) 6430 } 6431 6432 static void test_pack_TOKEN_PRIMARY_GROUP(void) 6433 { 6434 /* TOKEN_PRIMARY_GROUP */ 6435 TEST_TYPE_SIZE (TOKEN_PRIMARY_GROUP, 4) 6436 TEST_TYPE_ALIGN (TOKEN_PRIMARY_GROUP, 4) 6437 TEST_FIELD_SIZE (TOKEN_PRIMARY_GROUP, PrimaryGroup, 4) 6438 TEST_FIELD_ALIGN (TOKEN_PRIMARY_GROUP, PrimaryGroup, 4) 6439 TEST_FIELD_OFFSET(TOKEN_PRIMARY_GROUP, PrimaryGroup, 0) 6440 } 6441 6442 static void test_pack_TOKEN_PRIVILEGES(void) 6443 { 6444 /* TOKEN_PRIVILEGES */ 6445 TEST_TYPE_SIZE (TOKEN_PRIVILEGES, 16) 6446 TEST_TYPE_ALIGN (TOKEN_PRIVILEGES, 4) 6447 TEST_FIELD_SIZE (TOKEN_PRIVILEGES, PrivilegeCount, 4) 6448 TEST_FIELD_ALIGN (TOKEN_PRIVILEGES, PrivilegeCount, 4) 6449 TEST_FIELD_OFFSET(TOKEN_PRIVILEGES, PrivilegeCount, 0) 6450 TEST_FIELD_SIZE (TOKEN_PRIVILEGES, Privileges, 12) 6451 TEST_FIELD_ALIGN (TOKEN_PRIVILEGES, Privileges, 4) 6452 TEST_FIELD_OFFSET(TOKEN_PRIVILEGES, Privileges, 4) 6453 } 6454 6455 static void test_pack_TOKEN_SOURCE(void) 6456 { 6457 /* TOKEN_SOURCE */ 6458 TEST_TYPE_SIZE (TOKEN_SOURCE, 16) 6459 TEST_TYPE_ALIGN (TOKEN_SOURCE, 4) 6460 TEST_FIELD_SIZE (TOKEN_SOURCE, SourceName, 8) 6461 TEST_FIELD_ALIGN (TOKEN_SOURCE, SourceName, 1) 6462 TEST_FIELD_OFFSET(TOKEN_SOURCE, SourceName, 0) 6463 TEST_FIELD_SIZE (TOKEN_SOURCE, SourceIdentifier, 8) 6464 TEST_FIELD_ALIGN (TOKEN_SOURCE, SourceIdentifier, 4) 6465 TEST_FIELD_OFFSET(TOKEN_SOURCE, SourceIdentifier, 8) 6466 } 6467 6468 static void test_pack_TOKEN_STATISTICS(void) 6469 { 6470 /* TOKEN_STATISTICS (pack 4) */ 6471 TEST_FIELD_SIZE (TOKEN_STATISTICS, TokenId, 8) 6472 TEST_FIELD_ALIGN (TOKEN_STATISTICS, TokenId, 4) 6473 TEST_FIELD_OFFSET(TOKEN_STATISTICS, TokenId, 0) 6474 TEST_FIELD_SIZE (TOKEN_STATISTICS, AuthenticationId, 8) 6475 TEST_FIELD_ALIGN (TOKEN_STATISTICS, AuthenticationId, 4) 6476 TEST_FIELD_OFFSET(TOKEN_STATISTICS, AuthenticationId, 8) 6477 TEST_FIELD_SIZE (TOKEN_STATISTICS, ExpirationTime, 8) 6478 TEST_FIELD_ALIGN (TOKEN_STATISTICS, ExpirationTime, 4) 6479 TEST_FIELD_OFFSET(TOKEN_STATISTICS, ExpirationTime, 16) 6480 } 6481 6482 static void test_pack_TOKEN_USER(void) 6483 { 6484 /* TOKEN_USER */ 6485 TEST_TYPE_SIZE (TOKEN_USER, 8) 6486 TEST_TYPE_ALIGN (TOKEN_USER, 4) 6487 TEST_FIELD_SIZE (TOKEN_USER, User, 8) 6488 TEST_FIELD_ALIGN (TOKEN_USER, User, 4) 6489 TEST_FIELD_OFFSET(TOKEN_USER, User, 0) 6490 } 6491 6492 static void test_pack_ULARGE_INTEGER(void) 6493 { 6494 /* ULARGE_INTEGER */ 6495 } 6496 6497 static void test_pack_ULONGLONG(void) 6498 { 6499 /* ULONGLONG */ 6500 TEST_TYPE_SIZE (ULONGLONG, 8) 6501 TEST_TYPE_ALIGN (ULONGLONG, 8) 6502 TEST_TYPE_UNSIGNED(ULONGLONG) 6503 } 6504 6505 static void test_pack_WAITORTIMERCALLBACKFUNC(void) 6506 { 6507 /* WAITORTIMERCALLBACKFUNC */ 6508 TEST_TYPE_SIZE (WAITORTIMERCALLBACKFUNC, 4) 6509 TEST_TYPE_ALIGN (WAITORTIMERCALLBACKFUNC, 4) 6510 } 6511 6512 static void test_pack_WCHAR(void) 6513 { 6514 /* WCHAR */ 6515 TEST_TYPE_SIZE (WCHAR, 2) 6516 TEST_TYPE_ALIGN (WCHAR, 2) 6517 TEST_TYPE_UNSIGNED(WCHAR) 6518 } 6519 6520 static void test_pack_ATOM(void) 6521 { 6522 /* ATOM */ 6523 TEST_TYPE_SIZE (ATOM, 2) 6524 TEST_TYPE_ALIGN (ATOM, 2) 6525 TEST_TYPE_UNSIGNED(ATOM) 6526 } 6527 6528 static void test_pack_BOOL(void) 6529 { 6530 /* BOOL */ 6531 TEST_TYPE_SIZE (BOOL, 4) 6532 TEST_TYPE_ALIGN (BOOL, 4) 6533 TEST_TYPE_SIGNED(BOOL) 6534 } 6535 6536 static void test_pack_BYTE(void) 6537 { 6538 /* BYTE */ 6539 TEST_TYPE_SIZE (BYTE, 1) 6540 TEST_TYPE_ALIGN (BYTE, 1) 6541 TEST_TYPE_UNSIGNED(BYTE) 6542 } 6543 6544 static void test_pack_COLORREF(void) 6545 { 6546 /* COLORREF */ 6547 TEST_TYPE_SIZE (COLORREF, 4) 6548 TEST_TYPE_ALIGN (COLORREF, 4) 6549 TEST_TYPE_UNSIGNED(COLORREF) 6550 } 6551 6552 static void test_pack_DWORD(void) 6553 { 6554 /* DWORD */ 6555 TEST_TYPE_SIZE (DWORD, 4) 6556 TEST_TYPE_ALIGN (DWORD, 4) 6557 TEST_TYPE_UNSIGNED(DWORD) 6558 } 6559 6560 static void test_pack_FARPROC(void) 6561 { 6562 /* FARPROC */ 6563 TEST_TYPE_SIZE (FARPROC, 4) 6564 TEST_TYPE_ALIGN (FARPROC, 4) 6565 } 6566 6567 static void test_pack_FLOAT(void) 6568 { 6569 /* FLOAT */ 6570 TEST_TYPE_SIZE (FLOAT, 4) 6571 TEST_TYPE_ALIGN (FLOAT, 4) 6572 } 6573 6574 static void test_pack_GLOBALHANDLE(void) 6575 { 6576 /* GLOBALHANDLE */ 6577 TEST_TYPE_SIZE (GLOBALHANDLE, 4) 6578 TEST_TYPE_ALIGN (GLOBALHANDLE, 4) 6579 } 6580 6581 static void test_pack_HCURSOR(void) 6582 { 6583 /* HCURSOR */ 6584 TEST_TYPE_SIZE (HCURSOR, 4) 6585 TEST_TYPE_ALIGN (HCURSOR, 4) 6586 } 6587 6588 static void test_pack_HFILE(void) 6589 { 6590 /* HFILE */ 6591 TEST_TYPE_SIZE (HFILE, 4) 6592 TEST_TYPE_ALIGN (HFILE, 4) 6593 TEST_TYPE_SIGNED(HFILE) 6594 } 6595 6596 static void test_pack_HGDIOBJ(void) 6597 { 6598 /* HGDIOBJ */ 6599 TEST_TYPE_SIZE (HGDIOBJ, 4) 6600 TEST_TYPE_ALIGN (HGDIOBJ, 4) 6601 } 6602 6603 static void test_pack_HGLOBAL(void) 6604 { 6605 /* HGLOBAL */ 6606 TEST_TYPE_SIZE (HGLOBAL, 4) 6607 TEST_TYPE_ALIGN (HGLOBAL, 4) 6608 } 6609 6610 static void test_pack_HLOCAL(void) 6611 { 6612 /* HLOCAL */ 6613 TEST_TYPE_SIZE (HLOCAL, 4) 6614 TEST_TYPE_ALIGN (HLOCAL, 4) 6615 } 6616 6617 static void test_pack_HMODULE(void) 6618 { 6619 /* HMODULE */ 6620 TEST_TYPE_SIZE (HMODULE, 4) 6621 TEST_TYPE_ALIGN (HMODULE, 4) 6622 } 6623 6624 static void test_pack_INT(void) 6625 { 6626 /* INT */ 6627 TEST_TYPE_SIZE (INT, 4) 6628 TEST_TYPE_ALIGN (INT, 4) 6629 TEST_TYPE_SIGNED(INT) 6630 } 6631 6632 static void test_pack_LOCALHANDLE(void) 6633 { 6634 /* LOCALHANDLE */ 6635 TEST_TYPE_SIZE (LOCALHANDLE, 4) 6636 TEST_TYPE_ALIGN (LOCALHANDLE, 4) 6637 } 6638 6639 static void test_pack_LPARAM(void) 6640 { 6641 /* LPARAM */ 6642 TEST_TYPE_SIZE (LPARAM, 4) 6643 TEST_TYPE_ALIGN (LPARAM, 4) 6644 } 6645 6646 static void test_pack_LPCRECT(void) 6647 { 6648 /* LPCRECT */ 6649 TEST_TYPE_SIZE (LPCRECT, 4) 6650 TEST_TYPE_ALIGN (LPCRECT, 4) 6651 TEST_TARGET_SIZE (LPCRECT, 16) 6652 TEST_TARGET_ALIGN(LPCRECT, 4) 6653 } 6654 6655 static void test_pack_LPCRECTL(void) 6656 { 6657 /* LPCRECTL */ 6658 TEST_TYPE_SIZE (LPCRECTL, 4) 6659 TEST_TYPE_ALIGN (LPCRECTL, 4) 6660 TEST_TARGET_SIZE (LPCRECTL, 16) 6661 TEST_TARGET_ALIGN(LPCRECTL, 4) 6662 } 6663 6664 static void test_pack_LPCVOID(void) 6665 { 6666 /* LPCVOID */ 6667 TEST_TYPE_SIZE (LPCVOID, 4) 6668 TEST_TYPE_ALIGN (LPCVOID, 4) 6669 } 6670 6671 static void test_pack_LPPOINT(void) 6672 { 6673 /* LPPOINT */ 6674 TEST_TYPE_SIZE (LPPOINT, 4) 6675 TEST_TYPE_ALIGN (LPPOINT, 4) 6676 TEST_TARGET_SIZE (LPPOINT, 8) 6677 TEST_TARGET_ALIGN(LPPOINT, 4) 6678 } 6679 6680 static void test_pack_LPRECT(void) 6681 { 6682 /* LPRECT */ 6683 TEST_TYPE_SIZE (LPRECT, 4) 6684 TEST_TYPE_ALIGN (LPRECT, 4) 6685 TEST_TARGET_SIZE (LPRECT, 16) 6686 TEST_TARGET_ALIGN(LPRECT, 4) 6687 } 6688 6689 static void test_pack_LPRECTL(void) 6690 { 6691 /* LPRECTL */ 6692 TEST_TYPE_SIZE (LPRECTL, 4) 6693 TEST_TYPE_ALIGN (LPRECTL, 4) 6694 TEST_TARGET_SIZE (LPRECTL, 16) 6695 TEST_TARGET_ALIGN(LPRECTL, 4) 6696 } 6697 6698 static void test_pack_LPSIZE(void) 6699 { 6700 /* LPSIZE */ 6701 TEST_TYPE_SIZE (LPSIZE, 4) 6702 TEST_TYPE_ALIGN (LPSIZE, 4) 6703 TEST_TARGET_SIZE (LPSIZE, 8) 6704 TEST_TARGET_ALIGN(LPSIZE, 4) 6705 } 6706 6707 static void test_pack_LRESULT(void) 6708 { 6709 /* LRESULT */ 6710 TEST_TYPE_SIZE (LRESULT, 4) 6711 TEST_TYPE_ALIGN (LRESULT, 4) 6712 } 6713 6714 static void test_pack_POINT(void) 6715 { 6716 /* POINT */ 6717 TEST_TYPE_SIZE (POINT, 8) 6718 TEST_TYPE_ALIGN (POINT, 4) 6719 TEST_FIELD_SIZE (POINT, x, 4) 6720 TEST_FIELD_ALIGN (POINT, x, 4) 6721 TEST_FIELD_OFFSET(POINT, x, 0) 6722 TEST_FIELD_SIZE (POINT, y, 4) 6723 TEST_FIELD_ALIGN (POINT, y, 4) 6724 TEST_FIELD_OFFSET(POINT, y, 4) 6725 } 6726 6727 static void test_pack_POINTL(void) 6728 { 6729 /* POINTL */ 6730 TEST_TYPE_SIZE (POINTL, 8) 6731 TEST_TYPE_ALIGN (POINTL, 4) 6732 TEST_FIELD_SIZE (POINTL, x, 4) 6733 TEST_FIELD_ALIGN (POINTL, x, 4) 6734 TEST_FIELD_OFFSET(POINTL, x, 0) 6735 TEST_FIELD_SIZE (POINTL, y, 4) 6736 TEST_FIELD_ALIGN (POINTL, y, 4) 6737 TEST_FIELD_OFFSET(POINTL, y, 4) 6738 } 6739 6740 static void test_pack_PPOINT(void) 6741 { 6742 /* PPOINT */ 6743 TEST_TYPE_SIZE (PPOINT, 4) 6744 TEST_TYPE_ALIGN (PPOINT, 4) 6745 TEST_TARGET_SIZE (PPOINT, 8) 6746 TEST_TARGET_ALIGN(PPOINT, 4) 6747 } 6748 6749 static void test_pack_PPOINTL(void) 6750 { 6751 /* PPOINTL */ 6752 TEST_TYPE_SIZE (PPOINTL, 4) 6753 TEST_TYPE_ALIGN (PPOINTL, 4) 6754 TEST_TARGET_SIZE (PPOINTL, 8) 6755 TEST_TARGET_ALIGN(PPOINTL, 4) 6756 } 6757 6758 static void test_pack_PRECT(void) 6759 { 6760 /* PRECT */ 6761 TEST_TYPE_SIZE (PRECT, 4) 6762 TEST_TYPE_ALIGN (PRECT, 4) 6763 TEST_TARGET_SIZE (PRECT, 16) 6764 TEST_TARGET_ALIGN(PRECT, 4) 6765 } 6766 6767 static void test_pack_PRECTL(void) 6768 { 6769 /* PRECTL */ 6770 TEST_TYPE_SIZE (PRECTL, 4) 6771 TEST_TYPE_ALIGN (PRECTL, 4) 6772 TEST_TARGET_SIZE (PRECTL, 16) 6773 TEST_TARGET_ALIGN(PRECTL, 4) 6774 } 6775 6776 static void test_pack_PROC(void) 6777 { 6778 /* PROC */ 6779 TEST_TYPE_SIZE (PROC, 4) 6780 TEST_TYPE_ALIGN (PROC, 4) 6781 } 6782 6783 static void test_pack_PSIZE(void) 6784 { 6785 /* PSIZE */ 6786 TEST_TYPE_SIZE (PSIZE, 4) 6787 TEST_TYPE_ALIGN (PSIZE, 4) 6788 TEST_TARGET_SIZE (PSIZE, 8) 6789 TEST_TARGET_ALIGN(PSIZE, 4) 6790 } 6791 6792 static void test_pack_PSZ(void) 6793 { 6794 /* PSZ */ 6795 TEST_TYPE_SIZE (PSZ, 4) 6796 TEST_TYPE_ALIGN (PSZ, 4) 6797 } 6798 6799 static void test_pack_RECT(void) 6800 { 6801 /* RECT */ 6802 TEST_TYPE_SIZE (RECT, 16) 6803 TEST_TYPE_ALIGN (RECT, 4) 6804 TEST_FIELD_SIZE (RECT, left, 4) 6805 TEST_FIELD_ALIGN (RECT, left, 4) 6806 TEST_FIELD_OFFSET(RECT, left, 0) 6807 TEST_FIELD_SIZE (RECT, top, 4) 6808 TEST_FIELD_ALIGN (RECT, top, 4) 6809 TEST_FIELD_OFFSET(RECT, top, 4) 6810 TEST_FIELD_SIZE (RECT, right, 4) 6811 TEST_FIELD_ALIGN (RECT, right, 4) 6812 TEST_FIELD_OFFSET(RECT, right, 8) 6813 TEST_FIELD_SIZE (RECT, bottom, 4) 6814 TEST_FIELD_ALIGN (RECT, bottom, 4) 6815 TEST_FIELD_OFFSET(RECT, bottom, 12) 6816 } 6817 6818 static void test_pack_RECTL(void) 6819 { 6820 /* RECTL */ 6821 TEST_TYPE_SIZE (RECTL, 16) 6822 TEST_TYPE_ALIGN (RECTL, 4) 6823 TEST_FIELD_SIZE (RECTL, left, 4) 6824 TEST_FIELD_ALIGN (RECTL, left, 4) 6825 TEST_FIELD_OFFSET(RECTL, left, 0) 6826 TEST_FIELD_SIZE (RECTL, top, 4) 6827 TEST_FIELD_ALIGN (RECTL, top, 4) 6828 TEST_FIELD_OFFSET(RECTL, top, 4) 6829 TEST_FIELD_SIZE (RECTL, right, 4) 6830 TEST_FIELD_ALIGN (RECTL, right, 4) 6831 TEST_FIELD_OFFSET(RECTL, right, 8) 6832 TEST_FIELD_SIZE (RECTL, bottom, 4) 6833 TEST_FIELD_ALIGN (RECTL, bottom, 4) 6834 TEST_FIELD_OFFSET(RECTL, bottom, 12) 6835 } 6836 6837 static void test_pack_SIZE(void) 6838 { 6839 /* SIZE */ 6840 TEST_TYPE_SIZE (SIZE, 8) 6841 TEST_TYPE_ALIGN (SIZE, 4) 6842 TEST_FIELD_SIZE (SIZE, cx, 4) 6843 TEST_FIELD_ALIGN (SIZE, cx, 4) 6844 TEST_FIELD_OFFSET(SIZE, cx, 0) 6845 TEST_FIELD_SIZE (SIZE, cy, 4) 6846 TEST_FIELD_ALIGN (SIZE, cy, 4) 6847 TEST_FIELD_OFFSET(SIZE, cy, 4) 6848 } 6849 6850 static void test_pack_SIZEL(void) 6851 { 6852 /* SIZEL */ 6853 TEST_TYPE_SIZE (SIZEL, 8) 6854 TEST_TYPE_ALIGN (SIZEL, 4) 6855 } 6856 6857 static void test_pack_UCHAR(void) 6858 { 6859 /* UCHAR */ 6860 TEST_TYPE_SIZE (UCHAR, 1) 6861 TEST_TYPE_ALIGN (UCHAR, 1) 6862 TEST_TYPE_UNSIGNED(UCHAR) 6863 } 6864 6865 static void test_pack_UINT(void) 6866 { 6867 /* UINT */ 6868 TEST_TYPE_SIZE (UINT, 4) 6869 TEST_TYPE_ALIGN (UINT, 4) 6870 TEST_TYPE_UNSIGNED(UINT) 6871 } 6872 6873 static void test_pack_ULONG(void) 6874 { 6875 /* ULONG */ 6876 TEST_TYPE_SIZE (ULONG, 4) 6877 TEST_TYPE_ALIGN (ULONG, 4) 6878 TEST_TYPE_UNSIGNED(ULONG) 6879 } 6880 6881 static void test_pack_USHORT(void) 6882 { 6883 /* USHORT */ 6884 TEST_TYPE_SIZE (USHORT, 2) 6885 TEST_TYPE_ALIGN (USHORT, 2) 6886 TEST_TYPE_UNSIGNED(USHORT) 6887 } 6888 6889 static void test_pack_WORD(void) 6890 { 6891 /* WORD */ 6892 TEST_TYPE_SIZE (WORD, 2) 6893 TEST_TYPE_ALIGN (WORD, 2) 6894 TEST_TYPE_UNSIGNED(WORD) 6895 } 6896 6897 static void test_pack_WPARAM(void) 6898 { 6899 /* WPARAM */ 6900 TEST_TYPE_SIZE (WPARAM, 4) 6901 TEST_TYPE_ALIGN (WPARAM, 4) 6902 } 6903 6904 #endif /* _WIN64 */ 6905 6906 static void test_pack(void) 6907 { 6908 test_pack_ACCESS_ALLOWED_ACE(); 6909 test_pack_ACCESS_DENIED_ACE(); 6910 test_pack_ACCESS_MASK(); 6911 test_pack_ACE_HEADER(); 6912 test_pack_ACL(); 6913 test_pack_ACL_REVISION_INFORMATION(); 6914 test_pack_ACL_SIZE_INFORMATION(); 6915 test_pack_ATOM(); 6916 test_pack_BOOL(); 6917 test_pack_BOOLEAN(); 6918 test_pack_BYTE(); 6919 test_pack_CCHAR(); 6920 test_pack_CHAR(); 6921 test_pack_COLORREF(); 6922 test_pack_DWORD(); 6923 test_pack_DWORD32(); 6924 test_pack_DWORD64(); 6925 test_pack_DWORDLONG(); 6926 test_pack_DWORD_PTR(); 6927 test_pack_EXCEPTION_POINTERS(); 6928 test_pack_EXCEPTION_RECORD(); 6929 test_pack_EXECUTION_STATE(); 6930 test_pack_FARPROC(); 6931 test_pack_FLOAT(); 6932 test_pack_FPO_DATA(); 6933 test_pack_GENERIC_MAPPING(); 6934 test_pack_GLOBALHANDLE(); 6935 test_pack_HALF_PTR(); 6936 test_pack_HANDLE(); 6937 test_pack_HCURSOR(); 6938 test_pack_HFILE(); 6939 test_pack_HGDIOBJ(); 6940 test_pack_HGLOBAL(); 6941 test_pack_HLOCAL(); 6942 test_pack_HMODULE(); 6943 test_pack_HRESULT(); 6944 test_pack_IMAGE_ARCHIVE_MEMBER_HEADER(); 6945 test_pack_IMAGE_AUX_SYMBOL(); 6946 test_pack_IMAGE_BASE_RELOCATION(); 6947 test_pack_IMAGE_BOUND_FORWARDER_REF(); 6948 test_pack_IMAGE_BOUND_IMPORT_DESCRIPTOR(); 6949 test_pack_IMAGE_COFF_SYMBOLS_HEADER(); 6950 test_pack_IMAGE_DATA_DIRECTORY(); 6951 test_pack_IMAGE_DEBUG_DIRECTORY(); 6952 test_pack_IMAGE_DEBUG_MISC(); 6953 test_pack_IMAGE_DOS_HEADER(); 6954 test_pack_IMAGE_EXPORT_DIRECTORY(); 6955 test_pack_IMAGE_FILE_HEADER(); 6956 test_pack_IMAGE_FUNCTION_ENTRY(); 6957 test_pack_IMAGE_IMPORT_BY_NAME(); 6958 test_pack_IMAGE_IMPORT_DESCRIPTOR(); 6959 test_pack_IMAGE_LINENUMBER(); 6960 test_pack_IMAGE_LOAD_CONFIG_DIRECTORY(); 6961 test_pack_IMAGE_LOAD_CONFIG_DIRECTORY32(); 6962 test_pack_IMAGE_LOAD_CONFIG_DIRECTORY64(); 6963 test_pack_IMAGE_NT_HEADERS(); 6964 test_pack_IMAGE_NT_HEADERS32(); 6965 test_pack_IMAGE_NT_HEADERS64(); 6966 test_pack_IMAGE_OPTIONAL_HEADER(); 6967 test_pack_IMAGE_OPTIONAL_HEADER32(); 6968 test_pack_IMAGE_OPTIONAL_HEADER64(); 6969 test_pack_IMAGE_OS2_HEADER(); 6970 test_pack_IMAGE_RELOCATION(); 6971 test_pack_IMAGE_RESOURCE_DATA_ENTRY(); 6972 test_pack_IMAGE_RESOURCE_DIRECTORY(); 6973 test_pack_IMAGE_RESOURCE_DIRECTORY_ENTRY(); 6974 test_pack_IMAGE_RESOURCE_DIRECTORY_STRING(); 6975 test_pack_IMAGE_RESOURCE_DIR_STRING_U(); 6976 test_pack_IMAGE_SECTION_HEADER(); 6977 test_pack_IMAGE_SEPARATE_DEBUG_HEADER(); 6978 test_pack_IMAGE_SYMBOL(); 6979 test_pack_IMAGE_THUNK_DATA(); 6980 test_pack_IMAGE_TLS_DIRECTORY(); 6981 test_pack_IMAGE_TLS_DIRECTORY32(); 6982 test_pack_IMAGE_TLS_DIRECTORY64(); 6983 test_pack_IMAGE_VXD_HEADER(); 6984 test_pack_INT(); 6985 test_pack_INT16(); 6986 test_pack_INT32(); 6987 test_pack_INT64(); 6988 test_pack_INT8(); 6989 test_pack_INT_PTR(); 6990 test_pack_IO_COUNTERS(); 6991 test_pack_LANGID(); 6992 test_pack_LARGE_INTEGER(); 6993 test_pack_LCID(); 6994 test_pack_LIST_ENTRY(); 6995 test_pack_LOCALHANDLE(); 6996 test_pack_LONG(); 6997 test_pack_LONG32(); 6998 test_pack_LONG64(); 6999 test_pack_LONGLONG(); 7000 test_pack_LONG_PTR(); 7001 test_pack_LPARAM(); 7002 test_pack_LPCRECT(); 7003 test_pack_LPCRECTL(); 7004 test_pack_LPCVOID(); 7005 test_pack_LPPOINT(); 7006 test_pack_LPRECT(); 7007 test_pack_LPRECTL(); 7008 test_pack_LPSIZE(); 7009 test_pack_LRESULT(); 7010 test_pack_LUID(); 7011 test_pack_LUID_AND_ATTRIBUTES(); 7012 test_pack_MEMORY_BASIC_INFORMATION(); 7013 test_pack_MESSAGE_RESOURCE_BLOCK(); 7014 test_pack_MESSAGE_RESOURCE_DATA(); 7015 test_pack_MESSAGE_RESOURCE_ENTRY(); 7016 test_pack_NT_TIB(); 7017 test_pack_OBJECT_TYPE_LIST(); 7018 test_pack_PACCESS_ALLOWED_ACE(); 7019 test_pack_PACCESS_DENIED_ACE(); 7020 test_pack_PACCESS_TOKEN(); 7021 test_pack_PACE_HEADER(); 7022 test_pack_PACL(); 7023 test_pack_PACL_REVISION_INFORMATION(); 7024 test_pack_PACL_SIZE_INFORMATION(); 7025 test_pack_PCCH(); 7026 test_pack_PCH(); 7027 test_pack_PCSTR(); 7028 test_pack_PCWCH(); 7029 test_pack_PCWSTR(); 7030 test_pack_PEXCEPTION_POINTERS(); 7031 test_pack_PEXCEPTION_RECORD(); 7032 test_pack_PFPO_DATA(); 7033 test_pack_PGENERIC_MAPPING(); 7034 test_pack_PHANDLE(); 7035 test_pack_PIMAGE_ARCHIVE_MEMBER_HEADER(); 7036 test_pack_PIMAGE_AUX_SYMBOL(); 7037 test_pack_PIMAGE_BASE_RELOCATION(); 7038 test_pack_PIMAGE_BOUND_FORWARDER_REF(); 7039 test_pack_PIMAGE_BOUND_IMPORT_DESCRIPTOR(); 7040 test_pack_PIMAGE_COFF_SYMBOLS_HEADER(); 7041 test_pack_PIMAGE_DATA_DIRECTORY(); 7042 test_pack_PIMAGE_DEBUG_DIRECTORY(); 7043 test_pack_PIMAGE_DEBUG_MISC(); 7044 test_pack_PIMAGE_DOS_HEADER(); 7045 test_pack_PIMAGE_EXPORT_DIRECTORY(); 7046 test_pack_PIMAGE_FILE_HEADER(); 7047 test_pack_PIMAGE_FUNCTION_ENTRY(); 7048 test_pack_PIMAGE_IMPORT_BY_NAME(); 7049 test_pack_PIMAGE_IMPORT_DESCRIPTOR(); 7050 test_pack_PIMAGE_LINENUMBER(); 7051 test_pack_PIMAGE_LOAD_CONFIG_DIRECTORY(); 7052 test_pack_PIMAGE_NT_HEADERS(); 7053 test_pack_PIMAGE_NT_HEADERS32(); 7054 test_pack_PIMAGE_NT_HEADERS64(); 7055 test_pack_PIMAGE_OPTIONAL_HEADER(); 7056 test_pack_PIMAGE_OPTIONAL_HEADER32(); 7057 test_pack_PIMAGE_OPTIONAL_HEADER64(); 7058 test_pack_PIMAGE_OS2_HEADER(); 7059 test_pack_PIMAGE_RELOCATION(); 7060 test_pack_PIMAGE_RESOURCE_DATA_ENTRY(); 7061 test_pack_PIMAGE_RESOURCE_DIRECTORY(); 7062 test_pack_PIMAGE_RESOURCE_DIRECTORY_ENTRY(); 7063 test_pack_PIMAGE_RESOURCE_DIRECTORY_STRING(); 7064 test_pack_PIMAGE_RESOURCE_DIR_STRING_U(); 7065 test_pack_PIMAGE_SECTION_HEADER(); 7066 test_pack_PIMAGE_SEPARATE_DEBUG_HEADER(); 7067 test_pack_PIMAGE_SYMBOL(); 7068 test_pack_PIMAGE_THUNK_DATA(); 7069 test_pack_PIMAGE_TLS_CALLBACK(); 7070 test_pack_PIMAGE_TLS_DIRECTORY(); 7071 test_pack_PIMAGE_VXD_HEADER(); 7072 test_pack_PIO_COUNTERS(); 7073 test_pack_PISECURITY_DESCRIPTOR(); 7074 test_pack_PISECURITY_DESCRIPTOR_RELATIVE(); 7075 test_pack_PISID(); 7076 test_pack_PLARGE_INTEGER(); 7077 test_pack_PLIST_ENTRY(); 7078 test_pack_PLUID(); 7079 test_pack_PLUID_AND_ATTRIBUTES(); 7080 test_pack_PMEMORY_BASIC_INFORMATION(); 7081 test_pack_PMESSAGE_RESOURCE_BLOCK(); 7082 test_pack_PMESSAGE_RESOURCE_DATA(); 7083 test_pack_PMESSAGE_RESOURCE_ENTRY(); 7084 test_pack_PNT_TIB(); 7085 test_pack_POBJECT_TYPE_LIST(); 7086 test_pack_POINT(); 7087 test_pack_POINTL(); 7088 test_pack_PPOINT(); 7089 test_pack_PPOINTL(); 7090 test_pack_PPRIVILEGE_SET(); 7091 test_pack_PRECT(); 7092 test_pack_PRECTL(); 7093 test_pack_PRIVILEGE_SET(); 7094 test_pack_PRLIST_ENTRY(); 7095 test_pack_PROC(); 7096 test_pack_PRTL_CRITICAL_SECTION(); 7097 test_pack_PRTL_CRITICAL_SECTION_DEBUG(); 7098 test_pack_PRTL_OSVERSIONINFOEXW(); 7099 test_pack_PRTL_OSVERSIONINFOW(); 7100 test_pack_PRTL_RESOURCE_DEBUG(); 7101 test_pack_PSECURITY_DESCRIPTOR(); 7102 test_pack_PSECURITY_QUALITY_OF_SERVICE(); 7103 test_pack_PSID(); 7104 test_pack_PSID_IDENTIFIER_AUTHORITY(); 7105 test_pack_PSINGLE_LIST_ENTRY(); 7106 test_pack_PSIZE(); 7107 test_pack_PSTR(); 7108 test_pack_PSYSTEM_ALARM_ACE(); 7109 test_pack_PSYSTEM_AUDIT_ACE(); 7110 test_pack_PSZ(); 7111 test_pack_PTOKEN_GROUPS(); 7112 test_pack_PTOKEN_PRIVILEGES(); 7113 test_pack_PTOKEN_USER(); 7114 test_pack_PULARGE_INTEGER(); 7115 test_pack_PVECTORED_EXCEPTION_HANDLER(); 7116 test_pack_PVOID(); 7117 test_pack_PWCH(); 7118 test_pack_PWSTR(); 7119 test_pack_RECT(); 7120 test_pack_RECTL(); 7121 test_pack_RTL_CRITICAL_SECTION(); 7122 test_pack_RTL_CRITICAL_SECTION_DEBUG(); 7123 test_pack_RTL_OSVERSIONINFOEXW(); 7124 test_pack_RTL_OSVERSIONINFOW(); 7125 test_pack_RTL_RESOURCE_DEBUG(); 7126 test_pack_SECURITY_CONTEXT_TRACKING_MODE(); 7127 test_pack_SECURITY_DESCRIPTOR(); 7128 test_pack_SECURITY_DESCRIPTOR_CONTROL(); 7129 test_pack_SECURITY_DESCRIPTOR_RELATIVE(); 7130 test_pack_SECURITY_INFORMATION(); 7131 test_pack_SECURITY_QUALITY_OF_SERVICE(); 7132 test_pack_SHORT(); 7133 test_pack_SID(); 7134 test_pack_SID_AND_ATTRIBUTES(); 7135 test_pack_SID_IDENTIFIER_AUTHORITY(); 7136 test_pack_SINGLE_LIST_ENTRY(); 7137 test_pack_SIZE(); 7138 test_pack_SIZEL(); 7139 test_pack_SIZE_T(); 7140 test_pack_SSIZE_T(); 7141 test_pack_SYSTEM_ALARM_ACE(); 7142 test_pack_SYSTEM_AUDIT_ACE(); 7143 test_pack_TOKEN_DEFAULT_DACL(); 7144 test_pack_TOKEN_GROUPS(); 7145 test_pack_TOKEN_OWNER(); 7146 test_pack_TOKEN_PRIMARY_GROUP(); 7147 test_pack_TOKEN_PRIVILEGES(); 7148 test_pack_TOKEN_SOURCE(); 7149 test_pack_TOKEN_STATISTICS(); 7150 test_pack_TOKEN_USER(); 7151 test_pack_UCHAR(); 7152 test_pack_UHALF_PTR(); 7153 test_pack_UINT(); 7154 test_pack_UINT16(); 7155 test_pack_UINT32(); 7156 test_pack_UINT64(); 7157 test_pack_UINT8(); 7158 test_pack_UINT_PTR(); 7159 test_pack_ULARGE_INTEGER(); 7160 test_pack_ULONG(); 7161 test_pack_ULONG32(); 7162 test_pack_ULONG64(); 7163 test_pack_ULONGLONG(); 7164 test_pack_ULONG_PTR(); 7165 test_pack_USHORT(); 7166 test_pack_WAITORTIMERCALLBACKFUNC(); 7167 test_pack_WCHAR(); 7168 test_pack_WORD(); 7169 test_pack_WPARAM(); 7170 } 7171 7172 START_TEST(generated) 7173 { 7174 test_pack(); 7175 } 7176