Module: wine Branch: master Commit: 038c8e642a8871e9454fc7b709d1bd00b5a36d6b URL: http://source.winehq.org/git/wine.git/?a=commit;h=038c8e642a8871e9454fc7b709...
Author: Rob Shearman rob@codeweavers.com Date: Sat Dec 23 15:50:07 2006 +0000
ole32: Call the MessagePending function for message filters.
---
dlls/ole32/compobj.c | 31 ++++++++++++++++++++++++++----- 1 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 4a88390..81236c7 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -34,8 +34,6 @@ * - Implement the OXID resolver so we don't need magic endpoint names for * clients and servers to meet up * - * - Call IMessageFilter functions. - * * - Make all ole interface marshaling use NDR to be wire compatible with * native DCOM * - Use & interpret ORPCTHIS & ORPCTHAT. @@ -2720,9 +2718,6 @@ HRESULT WINAPI CoRegisterMessageFilter( else if (lpOldMessageFilter) IMessageFilter_Release(lpOldMessageFilter);
- if (lpMessageFilter) - FIXME("message filter has been registered, but will not be used\n"); - return S_OK; }
@@ -3191,6 +3186,32 @@ HRESULT WINAPI CoWaitForMultipleHandles( { MSG msg;
+ /* call message filter */ + + if (COM_CurrentApt()->filter) + { + DWORD be_handled = IMessageFilter_MessagePending( + COM_CurrentApt()->filter, 0 /* FIXME */, + now - start_time, + COM_CurrentInfo()->pending_call_count ? PENDINGTYPE_NESTED : PENDINGTYPE_TOPLEVEL); + TRACE("IMessageFilter_MessagePending returned %d\n", be_handled); + switch (be_handled) + { + case PENDINGMSG_CANCELCALL: + WARN("call canceled\n"); + hr = RPC_E_CALL_CANCELED; + break; + case PENDINGMSG_WAITNOPROCESS: + case PENDINGMSG_WAITDEFPROCESS: + default: + /* FIXME: MSDN is very vague about the difference + * between WAITNOPROCESS and WAITDEFPROCESS - there + * appears to be none, so it is possibly a left-over + * from the 16-bit world. */ + break; + } + } + /* note: using "if" here instead of "while" might seem less * efficient, but only if we are optimising for quick delivery * of pending messages, rather than quick completion of the