Author: jimtabor
Date: Wed May 6 22:49:53 2009
New Revision: 40820
URL:
http://svn.reactos.org/svn/reactos?rev=40820&view=rev
Log:
- Implement ReplyMessage and kernel support for InSendMessage and GetMessageTime.
Modified:
trunk/reactos/dll/win32/user32/windows/message.c
trunk/reactos/include/reactos/win32k/ntuser.h
trunk/reactos/subsystems/win32/win32k/include/win32.h
trunk/reactos/subsystems/win32/win32k/ntuser/message.c
trunk/reactos/subsystems/win32/win32k/ntuser/misc.c
Modified: trunk/reactos/dll/win32/user32/windows/message.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/m…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/message.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/message.c [iso-8859-1] Wed May 6 22:49:53
2009
@@ -1071,6 +1071,7 @@
{
PUSER32_THREAD_DATA ThreadData = User32GetThreadData();
return(ThreadData->LastMessage.time);
+// return NtUserGetThreadState(THREADSTATE_GETMESSAGETIME);
}
@@ -1090,8 +1091,7 @@
return TRUE;
}
}
- return FALSE;
-/* return(NtUserGetThreadState(THREADSTATE_INSENDMESSAGE) != ISMEX_NOSEND);*/
+ return(NtUserGetThreadState(THREADSTATE_INSENDMESSAGE) != ISMEX_NOSEND);
}
@@ -1105,23 +1105,22 @@
{
PCLIENTTHREADINFO pcti = GetWin32ClientInfo()->pClientThreadInfo;
// FIXME("ISMEX %x\n",pcti);
- if (pcti && !(pcti->CTI_flags & CTI_INSENDMESSAGE)) return
ISMEX_NOSEND;
+ if (pcti && !(pcti->CTI_flags & CTI_INSENDMESSAGE))
+ return ISMEX_NOSEND;
else
- /* return NtUserGetThreadState(THREADSTATE_INSENDMESSAGE); */
- return 0;
-}
-
-
-/*
- * @unimplemented
+ return NtUserGetThreadState(THREADSTATE_INSENDMESSAGE);
+}
+
+
+/*
+ * @implemented
*/
BOOL
WINAPI
ReplyMessage(
LRESULT lResult)
{
- UNIMPLEMENTED;
- return FALSE;
+ return NtUserCallOneParam(lResult, ONEPARAM_ROUTINE_REPLYMESSAGE);
}
Modified: trunk/reactos/include/reactos/win32k/ntuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntu…
==============================================================================
--- trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] Wed May 6 22:49:53 2009
@@ -1721,7 +1721,8 @@
THREADSTATE_ACTIVEWINDOW,
THREADSTATE_CAPTUREWINDOW,
THREADSTATE_PROGMANWINDOW,
- THREADSTATE_TASKMANWINDOW
+ THREADSTATE_TASKMANWINDOW,
+ THREADSTATE_GETMESSAGETIME
};
DWORD
Modified: trunk/reactos/subsystems/win32/win32k/include/win32.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/win32.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/win32.h [iso-8859-1] Wed May 6 22:49:53
2009
@@ -38,6 +38,7 @@
PDESKTOPINFO pDeskInfo;
PCLIENTINFO pClientInfo;
FLONG TIF_flags;
+ LONG timeLast;
HANDLE hDesktop;
UINT cPaintsReady; /* Count of paints pending. */
UINT cTimersReady; /* Count of timers pending. */
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/message.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] Wed May 6
22:49:53 2009
@@ -1359,7 +1359,7 @@
IntGetCursorLocation(pti->Desktop->WindowStation,
&KernelModeMsg.pt);
KeQueryTickCount(&LargeTickCount);
- KernelModeMsg.time = MsqCalculateMessageTime(&LargeTickCount);
+ pti->timeLast = KernelModeMsg.time =
MsqCalculateMessageTime(&LargeTickCount);
MsqPostMessage(Window->MessageQueue, &KernelModeMsg,
NULL != MsgMemoryEntry && 0 != KernelModeMsg.lParam,
QS_POSTMESSAGE);
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/misc.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/misc.c [iso-8859-1] Wed May 6 22:49:53
2009
@@ -96,6 +96,28 @@
RETURN( (DWORD)GetW32ThreadInfo()->pDeskInfo->hTaskManWindow);
case THREADSTATE_ACTIVEWINDOW:
RETURN ( (DWORD)UserGetActiveWindow());
+ case THREADSTATE_INSENDMESSAGE:
+ {
+ DWORD Ret = ISMEX_NOSEND;
+ PUSER_MESSAGE_QUEUE MessageQueue =
+ ((PTHREADINFO)PsGetCurrentThreadWin32Thread())->MessageQueue;
+ DPRINT1("THREADSTATE_INSENDMESSAGE\n");
+
+ if (!IsListEmpty(&MessageQueue->SentMessagesListHead))
+ {
+ Ret = ISMEX_SEND;
+ }
+ else if (!IsListEmpty(&MessageQueue->NotifyMessagesListHead))
+ {
+ /* FIXME Need to set message flag when in callback mode with notify */
+ Ret = ISMEX_NOTIFY;
+ }
+ /* FIXME Need to set message flag if replied to or ReplyMessage */
+ RETURN( Ret);
+ }
+ case THREADSTATE_GETMESSAGETIME:
+ /* FIXME Needs more work! */
+ RETURN( ((PTHREADINFO)PsGetCurrentThreadWin32Thread())->timeLast);
}
RETURN( 0);