[Win32k]
authorJames Tabor <james.tabor@reactos.org>
Wed, 7 Jan 2015 14:02:45 +0000 (14:02 +0000)
committerJames Tabor <james.tabor@reactos.org>
Wed, 7 Jan 2015 14:02:45 +0000 (14:02 +0000)
- Answer my own question. Use the Extra Information long pointer to help traffic data. See CORE-7447.

svn path=/trunk/; revision=65993

reactos/win32ss/user/ntuser/message.c
reactos/win32ss/user/ntuser/msgqueue.c
reactos/win32ss/user/ntuser/msgqueue.h

index 7cf2345..9b1837c 100644 (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;
index f63ff6d..4a167ee 100644 (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)
          {
index 0812293..196d786 100644 (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,