Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Releases resources that are 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 one.
Syntax
HRESULT ReleaseMarshalData(
[in] PVOID pBuffer,
[in] ULONG cbBuffer,
[in] ULONG ibFirstRelease,
[in] RPCOLEDATAREP dataRep,
[in] CALLFRAME_MARSHALCONTEXT *pcontext
);
Parameters
[in] pBuffer
A pointer to the buffer containing the marshaled [out] values.
[in] cbBuffer
The size of the buffer, in bytes.
[in] ibFirstRelease
The first byte in the buffer, which is to be released. A value of zero implies that the interface pointers in the whole buffer are to be released. The marshaled interface pointers are assumed to have been released by some other mechanism.
[in] dataRep
The data representation with which the data was marshaled.
[in] pcontext
A pointer to the CALLFRAME_MARSHALCONTEXT structure containing context information about how un-marshalling is carried out.
Return value
This method can return the following values.
| Return code | Description |
|---|---|
|
The method completed successfully. |
|
An unexpected error has occurred. |
Remarks
The ReleaseMarshalData method must be called exactly once to clean up the resources held in a marshaled buffer. However when the MSHLFLAGS enumeration is set to MSHLFLAGS_NORMAL, this is done automatically during un-marshaling and so need not be carried out explicitly.
This method can function correctly 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 |