ICallUnmarshal::ReleaseMarshalData method (callobj.h)
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
[in] iMethod
The method number.
[in] pBuffer
A pointer to the buffer containing the marshaled out parameters.
[in] cbBuffer
The size of the buffer, in bytes.
[in] ibFirstRelease
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.
[in] dataRep
The data representation with which the data was marshaled.
[in] pcontext
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 code | Description |
---|---|
|
The method completed successfully. |
|
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
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 |