Author: jimtabor
Date: Thu Jul 31 17:48:59 2008
New Revision: 34985
URL:
http://svn.reactos.org/svn/reactos?rev=34985&view=rev
Log:
- Support relative callback proc with module base.
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/hook.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/hook.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1] Thu Jul 31 17:48:59
2008
@@ -1142,7 +1142,11 @@
Hook->ModuleName.Length = ModuleName.Length;
}
- Hook->Proc = HookProc;
+ if (Mod) /* make proc relative to the module base */
+ Hook->Proc = (void *)((char *)HookProc - (char *)Mod);
+ else
+ Hook->Proc = HookProc;
+
Hook->Ansi = Ansi;
Handle = Hook->Self;