mirror of
https://github.com/reactos/reactos.git
synced 2024-08-15 16:07:07 +00:00
fix a version info winetest by allowing non dll files to be loaded with LOAD_LIBRARY_AS_DATAFILE
svn path=/trunk/; revision=35976
This commit is contained in:
parent
b0a663b4a6
commit
b5c636ee01
|
@ -650,6 +650,9 @@ LdrpMapDllImageFile(IN PWSTR SearchPath OPTIONAL,
|
|||
0,
|
||||
FullNtFileName.Buffer);
|
||||
|
||||
if (!MapAsDataFile)
|
||||
{
|
||||
|
||||
Status = NtReadFile(FileHandle,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -665,6 +668,7 @@ LdrpMapDllImageFile(IN PWSTR SearchPath OPTIONAL,
|
|||
NtClose(FileHandle);
|
||||
return Status;
|
||||
}
|
||||
|
||||
/*
|
||||
* Overlay DOS and NT headers structures to the
|
||||
* buffer with DLL's header raw data.
|
||||
|
@ -683,6 +687,7 @@ LdrpMapDllImageFile(IN PWSTR SearchPath OPTIONAL,
|
|||
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Create a section for dll.
|
||||
|
@ -2058,6 +2063,8 @@ LdrpLoadModule(IN PWSTR SearchPath OPTIONAL,
|
|||
{
|
||||
*BaseAddress = ImageBase;
|
||||
}
|
||||
if (!MappedAsDataFile)
|
||||
{
|
||||
/* Get and check the NT headers */
|
||||
NtHeaders = RtlImageNtHeader(ImageBase);
|
||||
if (NtHeaders == NULL)
|
||||
|
@ -2068,6 +2075,7 @@ LdrpLoadModule(IN PWSTR SearchPath OPTIONAL,
|
|||
RtlFreeUnicodeString(&FullDosName);
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
}
|
||||
DPRINT("Mapped %wZ at %x\n", &FullDosName, ImageBase);
|
||||
if (MappedAsDataFile)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue