ICallFrame::Marshal method

Marshals the call frame by turning its reachable data into a flat buffer without disturbing the frame.

Syntax

HRESULT Marshal(
  CALLFRAME_MARSHALCONTEXT *pmshlContext,
  MSHLFLAGS                mshlflags,
  PVOID                    pBuffer,
  ULONG                    cbBuffer,
  ULONG                    *pcbBufferUsed,
  RPCOLEDATAREP            *pdataRep,
  ULONG                    *prpcFlags
);

Parameters

pmshlContext

A pointer to the CALLFRAME_MARSHALCONTEXT structure containing context information about how marshalling is carried out.

mshlflags

Flag indicating whether the data to be marshaled is to be transmitted back to the client process — the normal case — or written to a global table, where it can be retrieved by multiple clients. The possible values are from the MSHLFLAGS enumeration.

pBuffer

A pointer to the buffer into which the marshaled data is to be placed.

cbBuffer

The size of the buffer, in bytes.

pcbBufferUsed

Receives the size of the buffer that was actually used. This parameter is optional.

pdataRep

Receives the NDR data representation with which the data was marshaled. This parameter is optional. For more information, see IRpcChannelBuffer::GetBuffer.

prpcFlags

Receives an RPC flag associated with the call. This parameter is optional. For more information, see IRpcChannelBuffer::GetBuffer.

Return Value

This method can return the following values.

Return code Description
S_OK
The method completed successfully.
E_UNEXPECTED
An unexpected error has occurred.

Remarks

When marshalling the [In] versions of [in, out] parameters are present, and the [out] versions are undefined. When marshalling [out] parameters the values are valid.

If this method returns an error, the caller will not be able to clean it up. Resources such as memory transiently allocated during the attempted marshalling have been freed.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header callobj.h

See Also

ICallFrame