- Un-implement NtUserDispatchMessage.

- First of all, it is incorrect. I had a rant that I was going to send to the private mail list, but this will do.
- No more "New Standards"! The Window object should already know it is ANSI or not. A pointer to MSG is the only thing passed.


svn path=/trunk/; revision=38741
This commit is contained in:
James Tabor 2009-01-12 23:36:10 +00:00
parent a10da42dd1
commit a035fd4e21
2 changed files with 4 additions and 94 deletions

View file

@ -1207,17 +1207,9 @@ NTAPI
NtUserDisableThreadIme(
DWORD dwUnknown1);
typedef struct tagNTUSERDISPATCHMESSAGEINFO
{
BOOL HandledByKernel;
BOOL Ansi;
WNDPROC Proc;
MSG Msg;
} NTUSERDISPATCHMESSAGEINFO, *PNTUSERDISPATCHMESSAGEINFO;
LRESULT
NTAPI
NtUserDispatchMessage(PNTUSERDISPATCHMESSAGEINFO MsgInfo);
NtUserDispatchMessage(PMSG pMsg);
BOOL
NTAPI

View file

@ -405,92 +405,10 @@ CLEANUP:
}
LRESULT APIENTRY
NtUserDispatchMessage(PNTUSERDISPATCHMESSAGEINFO UnsafeMsgInfo)
NtUserDispatchMessage(PMSG UnsafeMsgInfo)
{
NTSTATUS Status;
NTUSERDISPATCHMESSAGEINFO MsgInfo;
LRESULT Result = TRUE;
DECLARE_RETURN(LRESULT);
DPRINT("Enter NtUserDispatchMessage\n");
UserEnterExclusive();
Status = MmCopyFromCaller(&MsgInfo, UnsafeMsgInfo, sizeof(NTUSERDISPATCHMESSAGEINFO));
if (! NT_SUCCESS(Status))
{
SetLastNtError(Status);
RETURN( 0);
}
/* Process timer messages. */
if (WM_TIMER == MsgInfo.Msg.message && 0 != MsgInfo.Msg.lParam)
{
LARGE_INTEGER LargeTickCount;
/* FIXME: Call hooks. */
/* FIXME: Check for continuing validity of timer. */
MsgInfo.HandledByKernel = FALSE;
KeQueryTickCount(&LargeTickCount);
MsgInfo.Proc = (WNDPROC) MsgInfo.Msg.lParam;
MsgInfo.Msg.lParam = (LPARAM)LargeTickCount.u.LowPart;
}
else if (NULL == MsgInfo.Msg.hwnd)
{
MsgInfo.HandledByKernel = TRUE;
Result = 0;
}
else
{
PWINDOW_OBJECT Window;
/* Get the window object. */
Window = UserGetWindowObject(MsgInfo.Msg.hwnd);
if (NULL == Window)
{
MsgInfo.HandledByKernel = TRUE;
Result = 0;
}
else
{
if (Window->OwnerThread != PsGetCurrentThread())
{
DPRINT1("Window doesn't belong to the calling thread!\n");
MsgInfo.HandledByKernel = TRUE;
Result = 0;
}
else
{
/* FIXME: Call hook procedures. */
MsgInfo.HandledByKernel = FALSE;
Result = 0;
if (Window->Wnd->IsSystem)
{
MsgInfo.Proc = (!MsgInfo.Ansi ? Window->Wnd->WndProc : Window->Wnd->WndProcExtra);
}
else
{
MsgInfo.Ansi = !Window->Wnd->Unicode;
MsgInfo.Proc = Window->Wnd->WndProc;
}
}
}
}
Status = MmCopyToCaller(UnsafeMsgInfo, &MsgInfo, sizeof(NTUSERDISPATCHMESSAGEINFO));
if (! NT_SUCCESS(Status))
{
SetLastNtError(Status);
RETURN( 0);
}
RETURN( Result);
CLEANUP:
DPRINT("Leave NtUserDispatchMessage. ret=%i\n", _ret_);
UserLeave();
END_CLEANUP;
UNIMPLEMENTED;
return 0;
}