Commit 50ec1d68 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

ole32: Add on the size of the whole OBJREF structure in the case of custom marshaling.

parent 340f7a3e
...@@ -1450,13 +1450,13 @@ HRESULT WINAPI CoGetMarshalSizeMax(ULONG *pulSize, REFIID riid, IUnknown *pUnk, ...@@ -1450,13 +1450,13 @@ HRESULT WINAPI CoGetMarshalSizeMax(ULONG *pulSize, REFIID riid, IUnknown *pUnk,
hr = IMarshal_GetMarshalSizeMax(pMarshal, riid, pUnk, dwDestContext, hr = IMarshal_GetMarshalSizeMax(pMarshal, riid, pUnk, dwDestContext,
pvDestContext, mshlFlags, pulSize); pvDestContext, mshlFlags, pulSize);
/* add on the size of the common header */ if (IsEqualCLSID(&marshaler_clsid, &CLSID_DfMarshal))
*pulSize += FIELD_OFFSET(OBJREF, u_objref); /* add on the size of the common header */
*pulSize += FIELD_OFFSET(OBJREF, u_objref);
/* if custom marshaling, add on size of custom header */ else
if (!IsEqualCLSID(&marshaler_clsid, &CLSID_DfMarshal)) /* custom marshaling: add on the size of the whole OBJREF structure
*pulSize += FIELD_OFFSET(OBJREF, u_objref.u_custom.pData) - * like native does */
FIELD_OFFSET(OBJREF, u_objref.u_custom); *pulSize += sizeof(OBJREF);
IMarshal_Release(pMarshal); IMarshal_Release(pMarshal);
return hr; return hr;
......
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