ICallFrame::Unmarshal method (callobj.h)

Unmarshals a packet of data containing the previously marshaled [out] parameters of a call into this already existing activation record.

Syntax

HRESULT Unmarshal(
  [in]  PVOID                    pBuffer,
  [in]  ULONG                    cbBuffer,
  [in]  RPCOLEDATAREP            dataRep,
  [in]  CALLFRAME_MARSHALCONTEXT *pcontext,
  [out] ULONG                    *pcbUnmarshalled
);

Parameters

[in] pBuffer

A pointer to the buffer containing the marshaled [out] values.

[in] cbBuffer

The size of the buffer, in bytes.

[in] dataRep

The NDR data representation with which the data was marshaled. For more information, see IRpcChannelBuffer::GetBuffer.

[in] pcontext

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

[out] pcbUnmarshalled

Receives the number of bytes that were successfully unmarshaled. This parameter is returned even in error situations. This parameter is optional.

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 unmarshalling, the [in] versions of [in, out] parameters are freed and interface pointers are released and replaced with their [out] versions. All the [in, out] and [out] parameters will always be set to reasonable [in], [in, out] values, [out] values successfully unmarshaled from the returned data, or a value explicitly initialized to NULL. On failure return, the caller will typically want to call ICallFrame::Free in order to clean up the values that are not NULL.

Requirements

Requirement Value
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