- Dereference pointer to event and fix module check in hooks.

svn path=/trunk/; revision=35025
This commit is contained in:
James Tabor 2008-08-02 06:21:55 +00:00
parent 6d4ff1a0c0
commit de7b0d6e38
2 changed files with 4 additions and 3 deletions

View file

@ -362,6 +362,8 @@ NtUserSetWinEventHook(
else
pEH->Proc = lpfnWinEventProc;
UserDereferenceObject(pEH);
Ret = Handle;
IntSetSrvEventMask( eventMin, eventMax);
}

View file

@ -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;