Commit 0725276f authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

ole32: Change returned size in CoGetMarshalSizeMax if object implements IMarshal.

parent 475b2d6b
......@@ -1804,24 +1804,24 @@ HRESULT WINAPI CoGetMarshalSizeMax(ULONG *pulSize, REFIID riid, IUnknown *pUnk,
{
HRESULT hr;
LPMARSHAL pMarshal;
CLSID marshaler_clsid;
BOOL std_marshal = FALSE;
hr = get_marshaler(riid, pUnk, dwDestContext, pvDestContext, mshlFlags, &pMarshal);
if (hr != S_OK)
return hr;
if(!pUnk)
return E_POINTER;
hr = IMarshal_GetUnmarshalClass(pMarshal, riid, pUnk, dwDestContext,
pvDestContext, mshlFlags, &marshaler_clsid);
hr = IUnknown_QueryInterface(pUnk, &IID_IMarshal, (void**)&pMarshal);
if (hr != S_OK)
{
ERR("IMarshal::GetUnmarshalClass failed, 0x%08x\n", hr);
IMarshal_Release(pMarshal);
return hr;
std_marshal = TRUE;
hr = CoGetStandardMarshal(riid, pUnk, dwDestContext, pvDestContext,
mshlFlags, &pMarshal);
}
if (hr != S_OK)
return hr;
hr = IMarshal_GetMarshalSizeMax(pMarshal, riid, pUnk, dwDestContext,
pvDestContext, mshlFlags, pulSize);
if (!IsEqualCLSID(&marshaler_clsid, &CLSID_StdMarshal))
if (!std_marshal)
/* add on the size of the whole OBJREF structure like native does */
*pulSize += sizeof(OBJREF);
......
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