ole32: Standardize COM aggregation for the FreeThreadedMarshaler.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9525b1e2cf
commit
a60b189787
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue