Robert Shearman : ole32: Try to retrieve messages that are COM calls first.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Mar 30 05:44:06 CST 2006


Module: wine
Branch: refs/heads/master
Commit: ff85f892c623438af0d2151c6a6811527ff75b4a
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=ff85f892c623438af0d2151c6a6811527ff75b4a

Author: Robert Shearman <rob at codeweavers.com>
Date:   Wed Mar 29 18:40:07 2006 +0100

ole32: Try to retrieve messages that are COM calls first.

Try to retrieve messages that are COM calls first in
CoWaitForMultipleHandles before retrieving other types.

---

 dlls/ole32/compobj.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c
index 9ab9478..ab87a5d 100644
--- a/dlls/ole32/compobj.c
+++ b/dlls/ole32/compobj.c
@@ -2645,7 +2645,10 @@ HRESULT WINAPI CoCopyProxy(IUnknown *pPr
 
 static BOOL COM_PeekMessage(struct apartment *apt, MSG *msg)
 {
-    return PeekMessageW(msg, NULL, 0, 0, PM_REMOVE|PM_NOYIELD);
+    /* first try to retrieve messages for incoming COM calls to the apartment window */
+    return PeekMessageW(msg, apt->win, WM_USER, WM_APP - 1, PM_REMOVE|PM_NOYIELD) ||
+    /* next retrieve all other messages */
+           PeekMessageW(msg, NULL, 0, 0, PM_REMOVE|PM_NOYIELD);
 }
 
 /***********************************************************************




More information about the wine-cvs mailing list