From a035fd4e218581c38d48799a522dd84b048b7a30 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Mon, 12 Jan 2009 23:36:10 +0000 Subject: [PATCH] - 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 --- reactos/include/reactos/win32k/ntuser.h | 10 +-- .../subsystems/win32/win32k/ntuser/message.c | 88 +------------------ 2 files changed, 4 insertions(+), 94 deletions(-) diff --git a/reactos/include/reactos/win32k/ntuser.h b/reactos/include/reactos/win32k/ntuser.h index 1d81fa3795c..c252ffbf99a 100644 --- a/reactos/include/reactos/win32k/ntuser.h +++ b/reactos/include/reactos/win32k/ntuser.h @@ -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 diff --git a/reactos/subsystems/win32/win32k/ntuser/message.c b/reactos/subsystems/win32/win32k/ntuser/message.c index 2f23df40396..ae2cf1960dc 100644 --- a/reactos/subsystems/win32/win32k/ntuser/message.c +++ b/reactos/subsystems/win32/win32k/ntuser/message.c @@ -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; }