Commit a1548b45 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

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.
parent 8c551796
...@@ -2643,6 +2643,11 @@ HRESULT WINAPI CoCopyProxy(IUnknown *pProxy, IUnknown **ppCopy) ...@@ -2643,6 +2643,11 @@ HRESULT WINAPI CoCopyProxy(IUnknown *pProxy, IUnknown **ppCopy)
} }
static BOOL COM_PeekMessage(struct apartment *apt, MSG *msg)
{
return PeekMessageW(msg, NULL, 0, 0, PM_REMOVE|PM_NOYIELD);
}
/*********************************************************************** /***********************************************************************
* CoWaitForMultipleHandles [OLE32.@] * CoWaitForMultipleHandles [OLE32.@]
* *
...@@ -2704,7 +2709,7 @@ HRESULT WINAPI CoWaitForMultipleHandles(DWORD dwFlags, DWORD dwTimeout, ...@@ -2704,7 +2709,7 @@ HRESULT WINAPI CoWaitForMultipleHandles(DWORD dwFlags, DWORD dwTimeout,
if (res == WAIT_OBJECT_0 + cHandles) /* messages available */ if (res == WAIT_OBJECT_0 + cHandles) /* messages available */
{ {
MSG msg; MSG msg;
while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE|PM_NOYIELD)) while (COM_PeekMessage(apt, &msg))
{ {
/* FIXME: filter the messages here */ /* FIXME: filter the messages here */
TRACE("received message whilst waiting for RPC: 0x%04x\n", msg.message); TRACE("received message whilst waiting for RPC: 0x%04x\n", msg.message);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment