From 4f409ee040a444755ca761ea58eefdc237e175bc Mon Sep 17 00:00:00 2001 From: James Tabor Date: Tue, 8 Apr 2008 05:08:25 +0000 Subject: [PATCH] Good example how client thread info structure works. Only one flag was seen being set and cleared when multi-thread messages are sent. Researched back in 2001. svn path=/trunk/; revision=32893 --- reactos/dll/win32/user32/windows/message.c | 16 +++++++++------- reactos/include/reactos/win32k/ntuser.h | 3 +++ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/reactos/dll/win32/user32/windows/message.c b/reactos/dll/win32/user32/windows/message.c index 7366bf678c1..40aae48857e 100644 --- a/reactos/dll/win32/user32/windows/message.c +++ b/reactos/dll/win32/user32/windows/message.c @@ -1081,12 +1081,11 @@ BOOL STDCALL InSendMessage(VOID) { - static DWORD ShowNotImplemented = TRUE; - if (ShowNotImplemented) - { - DbgPrint("InSendMessage is unimplemented\n"); - ShowNotImplemented = FALSE; - } + PCLIENTTHREADINFO pcti = ((PW32CLIENTINFO)GetWin32ClientInfo())->pClientThreadInfo; + + if ( pcti ) + return (pcti->CTI_flags & CTI_INSENDMESSAGE); + else /* return(NtUserGetThreadState(THREADSTATE_INSENDMESSAGE) != ISMEX_NOSEND); */ return FALSE; } @@ -1100,8 +1099,11 @@ STDCALL InSendMessageEx( LPVOID lpReserved) { + PCLIENTTHREADINFO pcti = ((PW32CLIENTINFO)GetWin32ClientInfo())->pClientThreadInfo; + + if (pcti && !(pcti->CTI_flags & CTI_INSENDMESSAGE)) return ISMEX_NOSEND; + else /* return NtUserGetThreadState(THREADSTATE_INSENDMESSAGE); */ - UNIMPLEMENTED; return 0; } diff --git a/reactos/include/reactos/win32k/ntuser.h b/reactos/include/reactos/win32k/ntuser.h index 5e5b7b64002..b8d91a4dc4d 100644 --- a/reactos/include/reactos/win32k/ntuser.h +++ b/reactos/include/reactos/win32k/ntuser.h @@ -181,8 +181,11 @@ typedef struct _W32PROCESSINFO } W32PROCESSINFO, *PW32PROCESSINFO; +#define CTI_INSENDMESSAGE 0x0002 + typedef struct _CLIENTTHREADINFO { + DWORD CTI_flags; DWORD dwcPumpHook; } CLIENTTHREADINFO, *PCLIENTTHREADINFO;