- Win32k doesn't know what "opaque" means. Store the module base address in the structure too for the code that relied on the handle being the base address.

svn path=/trunk/; revision=44120
This commit is contained in:
Stefan Ginsberg 2009-11-12 20:41:12 +00:00
parent 141ef5cfc3
commit 69b02e1155
3 changed files with 10 additions and 14 deletions

View file

@ -4,11 +4,13 @@
#include <winddi.h>
typedef struct _DRIVERS
{
LIST_ENTRY ListEntry;
PVOID SectionPointer;
PVOID BaseAddress;
UNICODE_STRING DriverName;
}DRIVERS, *PDRIVERS;
BOOL DRIVER_RegisterDriver(LPCWSTR Name, PFN_DrvEnableDriver EnableDriver);
PFN_DrvEnableDriver DRIVER_FindExistingDDIDriver(LPCWSTR Name);

View file

@ -26,13 +26,6 @@
#include <debug.h>
typedef struct _DRIVERS
{
LIST_ENTRY ListEntry;
PVOID SectionPointer;
UNICODE_STRING DriverName;
}DRIVERS, *PDRIVERS;
extern LIST_ENTRY GlobalDriverListHead;
@ -181,7 +174,7 @@ EngFindImageProcAddress(IN HANDLE Module,
return NULL;
}
RtlInitAnsiString(&ProcNameString, ProcName);
Status = LdrGetProcedureAddress(Module,
Status = LdrGetProcedureAddress(((PDRIVERS)Module)->BaseAddress,
&ProcNameString,
0,
&Function);
@ -235,6 +228,7 @@ EngLoadImage (LPWSTR DriverName)
DriverInfo->DriverName.Buffer = ExAllocatePool(PagedPool, GdiDriverInfo.DriverName.MaximumLength);
RtlCopyUnicodeString(&DriverInfo->DriverName, &GdiDriverInfo.DriverName);
DriverInfo->SectionPointer = GdiDriverInfo.SectionPointer;
DriverInfo->BaseAddress = GdiDriverInfo.ImageAddress;
InsertHeadList(&GlobalDriverListHead, &DriverInfo->ListEntry);
}
}

View file

@ -163,7 +163,7 @@ static BOOL UserLoadKbdDll(WCHAR *wsKLID,
DPRINT("Loaded %wZ\n", &FullLayoutPath);
RtlInitAnsiString( &kbdProcedureName, "KbdLayerDescriptor" );
LdrGetProcedureAddress((PVOID)*phModule,
LdrGetProcedureAddress((*(PDRIVERS*)phModule)->BaseAddress,
&kbdProcedureName,
0,
(PVOID*)&layerDescGetFn);