IMarshal::ReleaseMarshalData

Destroys a marshaled data packet.

HRESULT IMarshal::ReleaseMarshalData(

IStream * pStm
//Stream used for unmarshaling
);

Parameter

pStm

[in] Points to a stream that contains the data packet which is to be destroyed.

Return Values

S_OK

The data packet was released successfully.

E_FAIL

Indicates an unspecified error.

E_OUTOFMEMORY

Out of memory.

E_INVALIDARG

One or more arguments were invalid.

E_UNEXPECTED

An unexpected error occured.

IStream errors

See the IStream interface for information on possible stream access errors.

Comments

This method is typically called from the receiving side (that is, the side doing the unmarshaling), sometimes via the CoReleaseMarshalData or CoUnmarshalInterface API functions. However, if the data packet does not arrive on the receiving side or if the appropriate proxy object cannot be successfully created there, this method is called from the originating side (that is, the side doing the marshaling).

As an analogy, the data packet can be thought of as a reference to the original object, just as if it were another interface pointer being held on the object. Like a real interface pointer, that data packet must be released at some point. The use of IMarshal::ReleaseMarshalData to release data packets is analogous to the use of IUnknown::Release to release interface pointers.

Notes to Implementors

If your implementation stores state information about marshaled data packets, use this method to release the state information associated with the data packet found in pstm. Your implementation should also position the seek pointer in the stream past the last byte of data.

See Also

CoUnMarshalInterface, CoReleaseMarshalData

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database