[KERNEL32]

- Zero-initialize base address in BasepLoadLibraryAsDatafile. Should fix 2nd stage problems.
- Add a trace debugprint, silented by default.
See issue #6092 for more details.

svn path=/trunk/; revision=51277
This commit is contained in:
Aleksey Bragin 2011-04-08 09:21:41 +00:00
parent ef01012506
commit a3690ead55

View file

@ -274,7 +274,7 @@ BasepLoadLibraryAsDatafile(PWSTR Path, LPCWSTR Name, HMODULE *hModule)
HANDLE hFile = INVALID_HANDLE_VALUE; HANDLE hFile = INVALID_HANDLE_VALUE;
HANDLE hMapping; HANDLE hMapping;
NTSTATUS Status; NTSTATUS Status;
PVOID lpBaseAddress; PVOID lpBaseAddress = NULL;
SIZE_T ViewSize; SIZE_T ViewSize;
//PUNICODE_STRING OriginalName; //PUNICODE_STRING OriginalName;
//UNICODE_STRING dotDLL = RTL_CONSTANT_STRING(L".DLL"); //UNICODE_STRING dotDLL = RTL_CONSTANT_STRING(L".DLL");
@ -282,6 +282,8 @@ BasepLoadLibraryAsDatafile(PWSTR Path, LPCWSTR Name, HMODULE *hModule)
/* Zero out handle value */ /* Zero out handle value */
*hModule = 0; *hModule = 0;
DPRINT("BasepLoadLibraryAsDatafile(%S %S %p)\n", Path, Name, hModule);
/*Status = RtlDosApplyFileIsolationRedirection_Ustr(TRUE, /*Status = RtlDosApplyFileIsolationRedirection_Ustr(TRUE,
Name, Name,
&dotDLL, &dotDLL,
@ -470,7 +472,7 @@ done:
if (FreeString) RtlFreeUnicodeString(&DllName); if (FreeString) RtlFreeUnicodeString(&DllName);
/* Set last error in failure case */ /* Set last error in failure case */
if ( !NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
BaseSetLastNTError(Status); BaseSetLastNTError(Status);
return NULL; return NULL;