mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
[NTOSKRNL]
Lookup new Ldr entries in IopInitializeBuiltinDriver (we used the old ones from the loader block, that are not valid anymore after the drivers have been relocated!) svn path=/trunk/; revision=61659
This commit is contained in:
parent
f9a9a6e8de
commit
6ea50da3a2
1 changed files with 20 additions and 2 deletions
|
@ -818,14 +818,16 @@ LdrProcessDriverModule(PLDR_DATA_TABLE_ENTRY LdrEntry,
|
|||
NTSTATUS
|
||||
NTAPI
|
||||
INIT_FUNCTION
|
||||
IopInitializeBuiltinDriver(IN PLDR_DATA_TABLE_ENTRY LdrEntry)
|
||||
IopInitializeBuiltinDriver(IN PLDR_DATA_TABLE_ENTRY BootLdrEntry)
|
||||
{
|
||||
PDEVICE_NODE DeviceNode;
|
||||
PDRIVER_OBJECT DriverObject;
|
||||
NTSTATUS Status;
|
||||
PWCHAR FileNameWithoutPath;
|
||||
LPWSTR FileExtension;
|
||||
PUNICODE_STRING ModuleName = &LdrEntry->BaseDllName;
|
||||
PUNICODE_STRING ModuleName = &BootLdrEntry->BaseDllName;
|
||||
PLDR_DATA_TABLE_ENTRY LdrEntry;
|
||||
PLIST_ENTRY NextEntry;
|
||||
UNICODE_STRING ServiceName;
|
||||
|
||||
/*
|
||||
|
@ -869,6 +871,22 @@ IopInitializeBuiltinDriver(IN PLDR_DATA_TABLE_ENTRY LdrEntry)
|
|||
return(Status);
|
||||
}
|
||||
|
||||
/* Lookup the new Ldr entry in PsLoadedModuleList */
|
||||
NextEntry = PsLoadedModuleList.Flink;
|
||||
while (NextEntry != &PsLoadedModuleList)
|
||||
{
|
||||
LdrEntry = CONTAINING_RECORD(NextEntry,
|
||||
LDR_DATA_TABLE_ENTRY,
|
||||
InLoadOrderLinks);
|
||||
if (RtlEqualUnicodeString(ModuleName, &LdrEntry->BaseDllName, TRUE))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
NextEntry = NextEntry->Flink;
|
||||
}
|
||||
NT_ASSERT(NextEntry != &PsLoadedModuleList);
|
||||
|
||||
/*
|
||||
* Initialize the driver
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue