ICallUnmarshal::ReleaseMarshalData method

Releases resources that may be held by interface pointers residing in a packet of marshaled data. This method finds all interface pointers in the packet and calls the CoReleaseMarshalData function on each interface pointer.

Syntax


HRESULT ReleaseMarshalData(
  [in]  ULONG iMethod,
  [in]  PVOID pBuffer,
  [in]  ULONG cbBuffer,
  [in]  ULONG ibFirstRelease,
  [in]  RPCOLEDATAREP dataRep,
  [in]  CALLFRAME_MARSHALCONTEXT *pcontext
);

Parameters

iMethod [in]

The method number.

pBuffer [in]

A pointer to the buffer containing the marshaled out parameters.

cbBuffer [in]

The size of the buffer, in bytes.

ibFirstRelease [in]

The first byte in the buffer to be released. A value of zero implies that the interface pointers in the whole buffer are to be released. The idea is that marshaled interface pointers prior to the indicated byte are assumed to have already been released by some other mechanism.

dataRep [in]

The data representation with which the data was marshaled.

pcontext [in]

A pointer to a CALLFRAME_MARSHALCONTEXT structure that contains information about the context in which unmarshaling is to be carried out.

Return value

This method can return the following values.

Return codeDescription
S_OK

The method completed successfully.

E_UNEXPECTED

An unexpected error has occurred.

 

Remarks

To clean up resources held in the marshaled buffer, the ReleaseMarshalData method must be called. However when the MSHLFLAGS enumeration is set to normal, this is done automatically when unmarshaling.

ReleaseMarshalData can be used on both marshaled in and out parameters.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Callobj.h

IDL

Callobj.idl

IID

IID_ICallUnmarshal is defined as 5333B003-2E42-11d2-B89D-00C04FB9618A

See also

ICallUnmarshal

 

 

Community Additions

ADD
Show:
© 2014 Microsoft