- Answer my own question. Use the Extra Information long pointer to help traffic data. See CORE-7447.

svn path=/trunk/; revision=65993
This commit is contained in:
James Tabor 2015-01-07 14:02:45 +00:00
parent 1f48881307
commit 4d380127d3
3 changed files with 13 additions and 3 deletions

View file

@ -772,6 +772,7 @@ co_IntPeekMessage( PMSG Msg,
UINT MsgFilterMin,
UINT MsgFilterMax,
UINT RemoveMsg,
LONG_PTR *ExtraInfo,
BOOL bGMSG )
{
PTHREADINFO pti;
@ -835,6 +836,7 @@ co_IntPeekMessage( PMSG Msg,
MsgFilterMin,
MsgFilterMax,
ProcessMask,
ExtraInfo,
Msg ))
{
return TRUE;
@ -916,6 +918,7 @@ co_IntWaitMessage( PWND Window,
PTHREADINFO pti;
NTSTATUS Status = STATUS_SUCCESS;
MSG Msg;
LONG_PTR ExtraInfo = 0;
pti = PsGetCurrentThreadWin32Thread();
@ -926,6 +929,7 @@ co_IntWaitMessage( PWND Window,
MsgFilterMin,
MsgFilterMax,
MAKELONG( PM_NOREMOVE, GetWakeMask( MsgFilterMin, MsgFilterMax)),
&ExtraInfo,
TRUE ) ) // act like GetMessage.
{
return TRUE;
@ -964,6 +968,7 @@ co_IntGetPeekMessage( PMSG pMsg,
PTHREADINFO pti;
BOOL Present = FALSE;
NTSTATUS Status;
LONG_PTR ExtraInfo = 0;
if ( hWnd == HWND_TOPMOST || hWnd == HWND_BROADCAST )
hWnd = HWND_BOTTOM;
@ -1005,6 +1010,7 @@ co_IntGetPeekMessage( PMSG pMsg,
MsgFilterMin,
MsgFilterMax,
RemoveMsg,
&ExtraInfo,
bGMSG );
if (Present)
{
@ -1122,6 +1128,7 @@ UserPostMessage( HWND Wnd,
PTHREADINFO pti;
MSG Message;
LARGE_INTEGER LargeTickCount;
LONG_PTR ExtraInfo = 0;
Message.hwnd = Wnd;
Message.message = Msg;
@ -1212,7 +1219,7 @@ UserPostMessage( HWND Wnd,
}
else
{
MsqPostMessage(pti, &Message, FALSE, QS_POSTMESSAGE, 0, 0);
MsqPostMessage(pti, &Message, FALSE, QS_POSTMESSAGE, 0, ExtraInfo);
}
}
return TRUE;

View file

@ -2026,6 +2026,7 @@ MsqPeekMessage(IN PTHREADINFO pti,
IN UINT MsgFilterLow,
IN UINT MsgFilterHigh,
IN UINT QSflags,
OUT LONG_PTR *ExtraInfo,
OUT PMSG Message)
{
PUSER_MESSAGE CurrentMessage;
@ -2053,8 +2054,9 @@ MsqPeekMessage(IN PTHREADINFO pti,
( ( ( MsgFilterLow == 0 && MsgFilterHigh == 0 ) && CurrentMessage->QS_Flags & QSflags ) ||
( MsgFilterLow <= CurrentMessage->Msg.message && MsgFilterHigh >= CurrentMessage->Msg.message ) ) )
{
*Message = CurrentMessage->Msg;
QS_Flags = CurrentMessage->QS_Flags;
*Message = CurrentMessage->Msg;
*ExtraInfo = CurrentMessage->ExtraInfo;
QS_Flags = CurrentMessage->QS_Flags;
if (Remove)
{

View file

@ -131,6 +131,7 @@ MsqPeekMessage(IN PTHREADINFO pti,
IN UINT MsgFilterLow,
IN UINT MsgFilterHigh,
IN UINT QSflags,
OUT LONG_PTR *ExtraInfo,
OUT PMSG Message);
BOOL APIENTRY
co_MsqPeekHardwareMessage(IN PTHREADINFO pti,