---
name: "CoGetMarshalSizeMax"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/CoGetMarshalSizeMax"
---

# CoGetMarshalSizeMax(3w)

## NAME

**CoGetMarshalSizeMax** (OLE32.@)

## SYNOPSIS

HRESULT CoGetMarshalSizeMax\
  (\
   ULONG\*    *pulSize*,\
   REFIID    *riid*,\
   IUnknown\* *pUnk*,\
   DWORD     *dwDestContext*,\
   void\*     *pvDestContext*,\
   DWORD     *mshlFlags*\
  )

## DESCRIPTION

Gets the maximum amount of data that will be needed by a marshal.

## PARAMS

*pulSize* **\[Out\]**  Address where maximum marshal size will be stored.

*riid* **\[In\]**  Identifier of the interface to marshal.

*pUnk* **\[In\]**  Pointer to the object to marshal.

*dwDestContext* **\[In\]**  Destination. Used to enable or disable optimizations.

*pvDestContext* **\[In\]**  Reserved. Must be **NULL**.

*mshlFlags* **\[In\]**  Flags that affect the marshaling. See **[CoMarshalInterface(3w)](/CoMarshalInterface/3w.md)**.

## RETURNS

**Success:** **S\_OK**.

**Failure:** **HRESULT** code.

## SEE ALSO

CoMarshalInterface().

## IMPLEMENTATION

Declared in **"objbase.h"**.

Implemented in **"dlls/ole32/marshal.c"**.

Debug channel **"ole"**.
