From 145e9fad8398a6b7673c3215e2f8d6c233200b7e Mon Sep 17 00:00:00 2001 From: James Tabor Date: Mon, 13 Jul 2009 05:00:17 +0000 Subject: [PATCH] - Half-implement MmPageEntireDriver and use it to set the module instance for win32k. ATM, it does not set the entry pageable. - I mean no disrespect to the Arm developers, I'm an admire of your great work with ReactOS! By my commits you can see the need for the offset address when calling internal procs in win32k. - References: MmPageEntireDriver, http://www.osronline.com/ddkx/kmarch/k106_7os2.htm svn path=/trunk/; revision=41939 --- reactos/ntoskrnl/mm/ARM3/drvmgmt.c | 3 ++- reactos/subsystems/win32/win32k/main/dllmain.c | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/mm/ARM3/drvmgmt.c b/reactos/ntoskrnl/mm/ARM3/drvmgmt.c index 93f7fd0c11c..ab8e9a40dde 100644 --- a/reactos/ntoskrnl/mm/ARM3/drvmgmt.c +++ b/reactos/ntoskrnl/mm/ARM3/drvmgmt.c @@ -119,7 +119,8 @@ MmPageEntireDriver(IN PVOID AddressWithinSection) // // We should find the driver loader entry and return its base address // - UNIMPLEMENTED; + PLDR_DATA_TABLE_ENTRY pLdrDataTabEntry = MiLookupDataTableEntry(AddressWithinSection); + if (pLdrDataTabEntry) return pLdrDataTabEntry->DllBase; return NULL; } diff --git a/reactos/subsystems/win32/win32k/main/dllmain.c b/reactos/subsystems/win32/win32k/main/dllmain.c index 53b133e28d1..bd45e34bb94 100644 --- a/reactos/subsystems/win32/win32k/main/dllmain.c +++ b/reactos/subsystems/win32/win32k/main/dllmain.c @@ -27,6 +27,8 @@ #define NDEBUG #include +HANDLE hModuleWin; + PGDI_HANDLE_TABLE INTERNAL_CALL GDIOBJ_iAllocHandleTable(OUT PSECTION_OBJECT *SectionObject); BOOL INTERNAL_CALL GDI_CleanupForProcess (struct _EPROCESS *Process); /* FIXME */ @@ -387,6 +389,8 @@ DriverEntry ( return STATUS_UNSUCCESSFUL; } + hModuleWin = MmPageEntireDriver(DriverEntry); + /* * Register Object Manager Callbacks */