Author: sginsberg
Date: Thu Nov 12 21:41:12 2009
New Revision: 44120
URL:
http://svn.reactos.org/svn/reactos?rev=44120&view=rev
Log:
- 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.
Modified:
trunk/reactos/subsystems/win32/win32k/include/driver.h
trunk/reactos/subsystems/win32/win32k/ldr/loader.c
trunk/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c
Modified: trunk/reactos/subsystems/win32/win32k/include/driver.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/driver.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/driver.h [iso-8859-1] Thu Nov 12
21:41:12 2009
@@ -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);
Modified: trunk/reactos/subsystems/win32/win32k/ldr/loader.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ld…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ldr/loader.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ldr/loader.c [iso-8859-1] Thu Nov 12 21:41:12
2009
@@ -25,13 +25,6 @@
#define NDEBUG
#include <debug.h>
-
-typedef struct _DRIVERS
-{
- LIST_ENTRY ListEntry;
- PVOID SectionPointer;
- UNICODE_STRING DriverName;
-}DRIVERS, *PDRIVERS;
extern LIST_ENTRY GlobalDriverListHead;
@@ -181,7 +174,7 @@
return NULL;
}
RtlInitAnsiString(&ProcNameString, ProcName);
- Status = LdrGetProcedureAddress(Module,
+ Status = LdrGetProcedureAddress(((PDRIVERS)Module)->BaseAddress,
&ProcNameString,
0,
&Function);
@@ -235,6 +228,7 @@
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);
}
}
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c [iso-8859-1] Thu Nov 12
21:41:12 2009
@@ -163,7 +163,7 @@
DPRINT("Loaded %wZ\n", &FullLayoutPath);
RtlInitAnsiString( &kbdProcedureName, "KbdLayerDescriptor" );
- LdrGetProcedureAddress((PVOID)*phModule,
+ LdrGetProcedureAddress((*(PDRIVERS*)phModule)->BaseAddress,
&kbdProcedureName,
0,
(PVOID*)&layerDescGetFn);