ole32: Change returned size in CoGetMarshalSizeMax if object implements IMarshal.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
475b2d6b5f
commit
0725276f0f
|
@ -1804,24 +1804,24 @@ HRESULT WINAPI CoGetMarshalSizeMax(ULONG *pulSize, REFIID riid, IUnknown *pUnk,
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
LPMARSHAL pMarshal;
|
LPMARSHAL pMarshal;
|
||||||
CLSID marshaler_clsid;
|
BOOL std_marshal = FALSE;
|
||||||
|
|
||||||
hr = get_marshaler(riid, pUnk, dwDestContext, pvDestContext, mshlFlags, &pMarshal);
|
if(!pUnk)
|
||||||
if (hr != S_OK)
|
return E_POINTER;
|
||||||
return hr;
|
|
||||||
|
|
||||||
hr = IMarshal_GetUnmarshalClass(pMarshal, riid, pUnk, dwDestContext,
|
hr = IUnknown_QueryInterface(pUnk, &IID_IMarshal, (void**)&pMarshal);
|
||||||
pvDestContext, mshlFlags, &marshaler_clsid);
|
|
||||||
if (hr != S_OK)
|
if (hr != S_OK)
|
||||||
{
|
{
|
||||||
ERR("IMarshal::GetUnmarshalClass failed, 0x%08x\n", hr);
|
std_marshal = TRUE;
|
||||||
IMarshal_Release(pMarshal);
|
hr = CoGetStandardMarshal(riid, pUnk, dwDestContext, pvDestContext,
|
||||||
return hr;
|
mshlFlags, &pMarshal);
|
||||||
}
|
}
|
||||||
|
if (hr != S_OK)
|
||||||
|
return hr;
|
||||||
|
|
||||||
hr = IMarshal_GetMarshalSizeMax(pMarshal, riid, pUnk, dwDestContext,
|
hr = IMarshal_GetMarshalSizeMax(pMarshal, riid, pUnk, dwDestContext,
|
||||||
pvDestContext, mshlFlags, pulSize);
|
pvDestContext, mshlFlags, pulSize);
|
||||||
if (!IsEqualCLSID(&marshaler_clsid, &CLSID_StdMarshal))
|
if (!std_marshal)
|
||||||
/* add on the size of the whole OBJREF structure like native does */
|
/* add on the size of the whole OBJREF structure like native does */
|
||||||
*pulSize += sizeof(OBJREF);
|
*pulSize += sizeof(OBJREF);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue