Rob Shearman : ole32:
Track the pending call count so that the correct call type can be
passed to the message filter HandleInComingCall function .
Alexandre Julliard
julliard at wine.codeweavers.com
Sun Dec 24 09:37:56 CST 2006
Module: wine
Branch: master
Commit: aca17cd1207686e4683f1f3b7f7617806662b3c8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=aca17cd1207686e4683f1f3b7f7617806662b3c8
Author: Rob Shearman <rob at codeweavers.com>
Date: Sat Dec 23 15:49:47 2006 +0000
ole32: Track the pending call count so that the correct call type can be passed to the message filter HandleInComingCall function.
---
dlls/ole32/compobj_private.h | 1 +
dlls/ole32/rpc.c | 8 +++++++-
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/dlls/ole32/compobj_private.h b/dlls/ole32/compobj_private.h
index f9d1c76..276d82e 100644
--- a/dlls/ole32/compobj_private.h
+++ b/dlls/ole32/compobj_private.h
@@ -169,6 +169,7 @@ struct oletls
IUnknown *state; /* see CoSetState */
DWORD inits; /* number of times CoInitializeEx called */
GUID causality_id; /* unique identifier for each COM call */
+ LONG pending_call_count; /* number of calls pending */
};
diff --git a/dlls/ole32/rpc.c b/dlls/ole32/rpc.c
index 49f5842..eec961d 100644
--- a/dlls/ole32/rpc.c
+++ b/dlls/ole32/rpc.c
@@ -983,10 +983,14 @@ void RPC_ExecuteCall(struct dispatch_par
interface_info.pUnk = params->iface;
interface_info.iid = params->iid;
interface_info.wMethod = msg->ProcNum;
+
if (IsEqualGUID(&orpcthis.cid, &COM_CurrentInfo()->causality_id))
calltype = CALLTYPE_NESTED;
- else /* FIXME: also detect CALLTYPE_TOPLEVEL_CALLPENDING */
+ else if (COM_CurrentInfo()->pending_call_count == 0)
calltype = CALLTYPE_TOPLEVEL;
+ else
+ calltype = CALLTYPE_TOPLEVEL_CALLPENDING;
+
handlecall = IMessageFilter_HandleInComingCall(COM_CurrentApt()->filter,
calltype,
(HTASK)GetCurrentProcessId(),
@@ -1019,7 +1023,9 @@ void RPC_ExecuteCall(struct dispatch_par
* this call - this should be checked with what Windows does */
old_causality_id = COM_CurrentInfo()->causality_id;
COM_CurrentInfo()->causality_id = orpcthis.cid;
+ COM_CurrentInfo()->pending_call_count++;
params->hr = IRpcStubBuffer_Invoke(params->stub, params->msg, params->chan);
+ COM_CurrentInfo()->pending_call_count--;
COM_CurrentInfo()->causality_id = old_causality_id;
message_state = (struct message_state *)msg->Handle;
More information about the wine-cvs
mailing list