Commit a60b1897 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

ole32: Standardize COM aggregation for the FreeThreadedMarshaler.

parent 9525b1e2
......@@ -39,16 +39,15 @@
WINE_DEFAULT_DEBUG_CHANNEL(ole);
typedef struct _FTMarshalImpl {
IUnknown IUnknown_iface;
LONG ref;
IUnknown IUnknown_inner;
IMarshal IMarshal_iface;
IUnknown *pUnkOuter;
IUnknown *outer_unk;
LONG ref;
} FTMarshalImpl;
static inline FTMarshalImpl *impl_from_IUnknown(IUnknown *iface)
{
return CONTAINING_RECORD(iface, FTMarshalImpl, IUnknown_iface);
return CONTAINING_RECORD(iface, FTMarshalImpl, IUnknown_inner);
}
static inline FTMarshalImpl *impl_from_IMarshal( IMarshal *iface )
......@@ -67,7 +66,7 @@ IiFTMUnknown_fnQueryInterface (IUnknown * iface, REFIID riid, LPVOID * ppv)
*ppv = NULL;
if (IsEqualIID (&IID_IUnknown, riid))
*ppv = &This->IUnknown_iface;
*ppv = &This->IUnknown_inner;
else if (IsEqualIID (&IID_IMarshal, riid))
*ppv = &This->IMarshal_iface;
else {
......@@ -113,7 +112,7 @@ FTMarshalImpl_QueryInterface (LPMARSHAL iface, REFIID riid, LPVOID * ppv)
FTMarshalImpl *This = impl_from_IMarshal(iface);
TRACE ("(%p)->(%s,%p)\n", This, debugstr_guid (riid), ppv);
return IUnknown_QueryInterface (This->pUnkOuter, riid, ppv);
return IUnknown_QueryInterface(This->outer_unk, riid, ppv);
}
static ULONG WINAPI
......@@ -123,7 +122,7 @@ FTMarshalImpl_AddRef (LPMARSHAL iface)
FTMarshalImpl *This = impl_from_IMarshal(iface);
TRACE ("\n");
return IUnknown_AddRef (This->pUnkOuter);
return IUnknown_AddRef(This->outer_unk);
}
static ULONG WINAPI
......@@ -133,7 +132,7 @@ FTMarshalImpl_Release (LPMARSHAL iface)
FTMarshalImpl *This = impl_from_IMarshal(iface);
TRACE ("\n");
return IUnknown_Release (This->pUnkOuter);
return IUnknown_Release(This->outer_unk);
}
static HRESULT WINAPI
......@@ -342,12 +341,12 @@ HRESULT WINAPI CoCreateFreeThreadedMarshaler (LPUNKNOWN punkOuter, LPUNKNOWN * p
if (!ftm)
return E_OUTOFMEMORY;
ftm->IUnknown_iface.lpVtbl = &iunkvt;
ftm->IUnknown_inner.lpVtbl = &iunkvt;
ftm->IMarshal_iface.lpVtbl = &ftmvtbl;
ftm->ref = 1;
ftm->pUnkOuter = punkOuter ? punkOuter : &ftm->IUnknown_iface;
ftm->outer_unk = punkOuter ? punkOuter : &ftm->IUnknown_inner;
*ppunkMarshal = &ftm->IUnknown_iface;
*ppunkMarshal = &ftm->IUnknown_inner;
return S_OK;
}
......
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