558{
563
566 {
567 skip(
"couldn't create temp file\n");
568 return;
569 }
570
573
575 ok(
img !=
NULL,
"ImageLoad unexpectedly failed\n");
576
578 {
580 "unexpected ModuleName, got %s instead of %s\n",
img->ModuleName,
temp_file);
581 ok(
img->MappedAddress !=
NULL,
"MappedAddress != NULL\n");
582 if (
img->MappedAddress)
583 {
585 "MappedAddress doesn't point to IMAGE_DOS_HEADER\n");
586 }
587 ok(
img->FileHeader !=
NULL,
"FileHeader != NULL\n");
589 {
591 "FileHeader doesn't point to IMAGE_NT_HEADERS32\n");
592 }
593 ok(
img->NumberOfSections == 3,
594 "unexpected NumberOfSections, got %ld instead of 3\n",
img->NumberOfSections);
595 if (
img->NumberOfSections >= 3)
596 {
597 ok(!
strcmp((
const char *)
img->Sections[0].Name,
".text"),
598 "unexpected name for section 0, expected .text, got %s\n",
599 (
const char *)
img->Sections[0].Name);
600 ok(!
strcmp((
const char *)
img->Sections[1].Name,
".bss"),
601 "unexpected name for section 1, expected .bss, got %s\n",
602 (
const char *)
img->Sections[1].Name);
603 ok(!
strcmp((
const char *)
img->Sections[2].Name,
".idata"),
604 "unexpected name for section 2, expected .idata, got %s\n",
605 (
const char *)
img->Sections[2].Name);
606 }
607 ok(
img->Characteristics == 0x102,
608 "unexpected Characteristics, got 0x%lx instead of 0x102\n",
img->Characteristics);
609 ok(
img->fSystemImage == 0,
610 "unexpected fSystemImage, got %d instead of 0\n",
img->fSystemImage);
611 ok(
img->fDOSImage == 0,
612 "unexpected fDOSImage, got %d instead of 0\n",
img->fDOSImage);
614 "unexpected fReadOnly, got %d instead of 1\n",
img->fReadOnly);
616 "unexpected Version, got %d instead of 1\n",
img->Version);
617 ok(
img->SizeOfImage == 0x600,
618 "unexpected SizeOfImage, got 0x%lx instead of 0x600\n",
img->SizeOfImage);
619
623 ok(
ret == 448,
"GetImageUnusedHeaderBytes returned %lu instead of 448\n",
ret);
625 ok(
count == 64,
"unexpected size for unused header bytes, got %lu instead of 64\n",
count);
626
628 }
629
631}
PLOADED_IMAGE WINAPI ImageLoad(PCSTR dll_name, PCSTR dll_path)
BOOL WINAPI ImageUnload(PLOADED_IMAGE loaded_image)
DWORD WINAPI GetImageUnusedHeaderBytes(PLOADED_IMAGE LoadedImage, LPDWORD SizeUnusedHeaderBytes)