Author: hpoussin
Date: Fri Dec 7 20:00:21 2007
New Revision: 31057
URL:
http://svn.reactos.org/svn/reactos?rev=31057&view=rev
Log:
Better guess of the file path
Modified:
trunk/reactos/ntoskrnl/ke/freeldr.c
Modified: trunk/reactos/ntoskrnl/ke/freeldr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/freeldr.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/freeldr.c (original)
+++ trunk/reactos/ntoskrnl/ke/freeldr.c Fri Dec 7 20:00:21 2007
@@ -877,6 +877,7 @@
PIMAGE_NT_HEADERS NtHeader;
WCHAR PathToDrivers[] = L"\\SystemRoot\\System32\\drivers\\";
WCHAR PathToSystem32[] = L"\\SystemRoot\\System32\\";
+ WCHAR PathSetup[] = L"\\SystemRoot\\";
CHAR DriverNameLow[256];
ULONG Base;
@@ -1064,7 +1065,13 @@
LdrEntry->FullDllName.Buffer = BldrModuleStringsFull[i];
/* Guess the path */
- if (strstr(DriverNameLow, ".dll") || strstr(DriverNameLow,
".exe"))
+ if (LoaderBlock->SetupLdrBlock)
+ {
+ UNICODE_STRING TempString;
+ RtlInitUnicodeString(&TempString, PathSetup);
+ RtlAppendUnicodeStringToString(&LdrEntry->FullDllName,
&TempString);
+ }
+ else if (strstr(DriverNameLow, ".dll") || strstr(DriverNameLow,
".exe"))
{
UNICODE_STRING TempString;
RtlInitUnicodeString(&TempString, PathToSystem32);