Added WH_GETMESSAGE support.

svn path=/trunk/; revision=34498
This commit is contained in:
James Tabor 2008-07-14 07:26:13 +00:00
parent 4c46f5b78e
commit c66063fbaa
2 changed files with 9 additions and 4 deletions

View file

@ -570,7 +570,7 @@ NtUserSetWindowsHookEx(
/* We only (partially) support local WH_CBT hooks and
* WH_KEYBOARD_LL/WH_MOUSE_LL hooks for now */
if ((WH_CBT != HookId || Global)
&& WH_KEYBOARD_LL != HookId && WH_MOUSE_LL != HookId)
&& WH_KEYBOARD_LL != HookId && WH_MOUSE_LL != HookId && WH_GETMESSAGE != HookId)
{
#if 0 /* Removed to get winEmbed working again */
UNIMPLEMENTED

View file

@ -856,6 +856,10 @@ NtUserPeekMessage(PNTUSERGETMESSAGEINFO UnsafeInfo,
}
Present = co_IntPeekMessage(&Msg, hWnd, MsgFilterMin, MsgFilterMax, RemoveMsg);
// The WH_GETMESSAGE hook enables an application to monitor messages about to
// be returned by the GetMessage or PeekMessage function.
co_HOOK_CallHooks( WH_GETMESSAGE, HC_ACTION, RemoveMsg & PM_REMOVE, (LPARAM)&Msg);
if (Present)
{
Info.Msg = Msg.Msg;
@ -1845,6 +1849,7 @@ NtUserMessageCall(
{
LRESULT lResult = 0;
PWINDOW_OBJECT Window = NULL;
USER_REFERENCE_ENTRY Ref;
UserEnterExclusive();
@ -1852,15 +1857,15 @@ NtUserMessageCall(
if (hWnd && (hWnd != INVALID_HANDLE_VALUE) && !(Window = UserGetWindowObject(hWnd)))
{
return 0;
}
}
UserRefObjectCo(Window, &Ref);
switch(dwType)
{
case NUMC_DEFWINDOWPROC:
lResult = IntDefWindowProc(Window, Msg, wParam, lParam);
break;
}
UserDerefObjectCo(Window);
UserLeave();
return lResult;
}