|
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
Related LinksSoftware for Delphi and C++ Builder developers Software for Visual Studio .NET developers Software for Visual Basic 6 developers Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder
More Online Helps Win32 Programmer's Reference (win32.hlp) Win32 Multimedia Programmer's Reference (mmedia.hlp) Microsoft Windows Pen API Programmer's Reference (penapi.hlp) Microsoft Windows Sockets 2 Reference (sock2.hlp) Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp) Unix Manual Pages
|