|
IMarshal::UnmarshalInterface
Initializes a newly created proxy and returns an interface pointer to that
proxy.
HRESULT IMarshal::UnmarshalInterface(
IStream * pStm,
| //Stream used for unmarshaling
| REFIID riid,
| //IID of interface pointer desired
| void ** ppv
| //Receives the interface pointer
| );
|
|
Parameters
pStm
[in]Points to the stream from which the interface pointer is to be unmarshaled.
riid
[in]Specifies the IID of the interface pointer desired.
ppv
[out]Receives the interface pointer.
Return Values
S_OK
The interface pointer was unmarshaled successfully.
E_FAIL
Indicates that the implementation failed.
E_NOINTERFACE
The specified interface was not supported.
Comments
This method is called from the receiving side (that is; the side doing the
unmarshaling). This method is called on the proxy object itself; that is; the
object whose CLSID was returned by IMarshal::GetUnmarshalClass.
Notes to Implementors
Your implementation should read the data written to the stream by your
implementation of IMarshal::MarshalInterface and use that data to initialize the proxy object.
To return the appropriate interface pointer; your implementation can simply
call IUnknown::QueryInterface on itself, passing the riid and ppv parameters. However; your implementation is free to create a different object
and return a pointer to that object; if you find it necessary.
Just before exiting; your implementation should position the seek pointer in
the stream immediately after the last byte of data read. This should be done
even if the method exits with an error.
See Also
IMarshal::GetUnmarshalClass, IMarshal::MarshalInterface
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
|