ntoskrnl: Set DriverStart and DriverSize fields in DRIVER_OBJECT.

Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Derek Lesho 2020-06-19 13:11:37 -05:00 committed by Alexandre Julliard
parent 67949d96a7
commit 8f1d1c533c
1 changed files with 2 additions and 0 deletions

View File

@ -3645,6 +3645,8 @@ static NTSTATUS WINAPI init_driver( DRIVER_OBJECT *driver_object, UNICODE_STRING
return STATUS_DLL_INIT_FAILED;
driver_object->DriverSection = find_ldr_module( module );
driver_object->DriverStart = ((LDR_DATA_TABLE_ENTRY *)driver_object->DriverSection)->DllBase;
driver_object->DriverSize = ((LDR_DATA_TABLE_ENTRY *)driver_object->DriverSection)->SizeOfImage;
nt = RtlImageNtHeader( module );
if (!nt->OptionalHeader.AddressOfEntryPoint) return STATUS_SUCCESS;