mirror of
https://github.com/reactos/reactos.git
synced 2024-10-02 15:34:13 +00:00
- Dereference pointer to event and fix module check in hooks.
svn path=/trunk/; revision=35025
This commit is contained in:
parent
6d4ff1a0c0
commit
de7b0d6e38
|
@ -362,6 +362,8 @@ NtUserSetWinEventHook(
|
|||
else
|
||||
pEH->Proc = lpfnWinEventProc;
|
||||
|
||||
UserDereferenceObject(pEH);
|
||||
|
||||
Ret = Handle;
|
||||
IntSetSrvEventMask( eventMin, eventMax);
|
||||
}
|
||||
|
|
|
@ -1143,10 +1143,9 @@ NtUserSetWindowsHookEx(
|
|||
RETURN( NULL);
|
||||
}
|
||||
Hook->ModuleName.Length = ModuleName.Length;
|
||||
/* make proc relative to the module base */
|
||||
Hook->Proc = (void *)((char *)HookProc - (char *)Mod);
|
||||
}
|
||||
|
||||
if (Mod) /* make proc relative to the module base */
|
||||
Hook->Proc = (void *)((char *)HookProc - (char *)Mod);
|
||||
else
|
||||
Hook->Proc = HookProc;
|
||||
|
||||
|
|
Loading…
Reference in a new issue