IMarshal::UnmarshalInterface
Initializes a
newly created proxy and returns an interface pointer to that proxy.
HRESULT UnmarshalInterface(
IStream * pStm, |
//Pointer to the stream to be unmarshaled |
REFIID riid, |
//Reference to the identifier of the interface to be
unmarshaled |
void ** ppv |
//Indirect pointer to interface |
); |
|
Parameters
pStm
[in] Pointer
to the stream from which the interface pointer is to be unmarshaled.
riid
[in]
Reference to the identifier of the interface to be unmarshaled.
ppv
[out]
Indirect pointer to the interface.
Return Values
The method
supports the standard return value E_FAIL, as well as the following:
S_OK
The interface
pointer was unmarshaled successfully.
E_NOINTERFACE
The specified
interface was not supported.
Remarks
The COM
library in the process where unmarshaling is to occur calls the proxy s
implementation of this method.
Notes to Callers
You do not
call this method directly. There are, however, some situations in which you
might call it indirectly through a call to CoUnmarshalInterface
Notes to Implementers
The proxy s
implementation should read the data written to the stream by the original
object s implementation of IMarshal::MarshalInterface
To return the
appropriate interface pointer, the proxy implementation can simply call IUnknown::QueryInterface
Just before
exiting, even if exiting with an error, your implementation should reposition
the seek pointer in the stream immediately after the last byte of data read.
See Also