Rob Shearman : ole32:
Fix the detection of when we need an additional QueryInterface in
CoUnmarshalInterface .
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Jan 10 05:36:05 CST 2007
Module: wine
Branch: master
Commit: f658adffc2e0bcb8e103152fdc2d92a13996ddcc
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f658adffc2e0bcb8e103152fdc2d92a13996ddcc
Author: Rob Shearman <rob at codeweavers.com>
Date: Tue Jan 9 17:18:03 2007 +0000
ole32: Fix the detection of when we need an additional QueryInterface in CoUnmarshalInterface.
---
dlls/ole32/marshal.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/dlls/ole32/marshal.c b/dlls/ole32/marshal.c
index 3708f50..5b2d5b2 100644
--- a/dlls/ole32/marshal.c
+++ b/dlls/ole32/marshal.c
@@ -1671,16 +1671,13 @@ HRESULT WINAPI CoUnmarshalInterface(IStr
if (hr)
ERR("IMarshal::UnmarshalInterface failed, 0x%08x\n", hr);
- /* IID_NULL means use the interface ID of the marshaled object */
- if (!IsEqualIID(riid, &IID_NULL))
- iid = *riid;
-
if (hr == S_OK)
{
- if (!IsEqualIID(riid, &iid))
+ /* IID_NULL means use the interface ID of the marshaled object */
+ if (!IsEqualIID(riid, &IID_NULL) && !IsEqualIID(riid, &iid))
{
TRACE("requested interface != marshalled interface, additional QI needed\n");
- hr = IUnknown_QueryInterface(object, &iid, ppv);
+ hr = IUnknown_QueryInterface(object, riid, ppv);
if (hr)
ERR("Couldn't query for interface %s, hr = 0x%08x\n",
debugstr_guid(riid), hr);
More information about the wine-cvs
mailing list