Module: wine
Branch: refs/heads/master
Commit: a1548b45d8c3d19fad5632f997da65e5deb4ce0d
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=a1548b45d8c3d19fad5632f…
Author: Robert Shearman <rob(a)codeweavers.com>
Date: Wed Mar 29 18:39:03 2006 +0100
ole32: Put the PeekMessage call of CoWaitForMultipleHandles into a separate function.
Put the PeekMessage call of CoWaitForMultipleHandles into a separate
function so that the order and type of the messages retrieved can be
customised in the future.
---
dlls/ole32/compobj.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c
index 32d7a73..9ab9478 100644
--- a/dlls/ole32/compobj.c
+++ b/dlls/ole32/compobj.c
@@ -2643,6 +2643,11 @@ HRESULT WINAPI CoCopyProxy(IUnknown *pPr
}
+static BOOL COM_PeekMessage(struct apartment *apt, MSG *msg)
+{
+ return PeekMessageW(msg, NULL, 0, 0, PM_REMOVE|PM_NOYIELD);
+}
+
/***********************************************************************
* CoWaitForMultipleHandles [OLE32.@]
*
@@ -2704,7 +2709,7 @@ HRESULT WINAPI CoWaitForMultipleHandles(
if (res == WAIT_OBJECT_0 + cHandles) /* messages available */
{
MSG msg;
- while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE|PM_NOYIELD))
+ while (COM_PeekMessage(apt, &msg))
{
/* FIXME: filter the messages here */
TRACE("received message whilst waiting for RPC: 0x%04x\n", msg.message);
Module: wine
Branch: refs/heads/master
Commit: 3091aa5302a60e1efc6518b3205dca5d4b7a7b02
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=3091aa5302a60e1efc6518b…
Author: Robert Shearman <rob(a)codeweavers.com>
Date: Wed Mar 29 18:38:21 2006 +0100
ole32: Pass the no yield flag to PeekMessage.
Pass the no yield flag to PeekMessage since we sleep in
MsgWaitForMultipleObjectsEx and the extra context switch is wasteful.
---
dlls/ole32/compobj.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c
index 7057450..2528b61 100644
--- a/dlls/ole32/compobj.c
+++ b/dlls/ole32/compobj.c
@@ -2703,7 +2703,7 @@ HRESULT WINAPI CoWaitForMultipleHandles(
if (res == WAIT_OBJECT_0 + cHandles) /* messages available */
{
MSG msg;
- while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE))
+ while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE|PM_NOYIELD))
{
/* FIXME: filter the messages here */
TRACE("received message whilst waiting for RPC: 0x%04x\n", msg.message);