Initializes a proxy object using data written into the stream by a previous
call to the CoMarshalInterface
function, and returns an interface pointer to that proxy object.
| IStream * pStm,
||//Stream used for unmarshalling
| REFIID riid,
||//IID of interface pointer desired
| void ** ppv
||//Receives the interface pointer
Points to the stream from which the interface pointer is to be unmarshalled.
Specifies the IID of the interface pointer desired.
Receives the interface pointer.
Indicates the interface was unmarshalled successfully.
is an invalid pointer.
Indicates the CoInitialize
function was not called on the current thread before this function was called.
Indicates the object application has been disconnected from the remoting
system (for example, as a result of a call to the CoDisconnectObject
Indicates an error occurred reading the registration database.
Out of memory.
Indicates one or more arguments are invalid.
Indicates an unexpected error occurred.
Indicates the final QueryInterface
of this function for the requested interface returned E_NOINTERFACE.
Indicates an unspecified error.
Indicates an error occurred when creating the handler (standard or custom
The main steps that CoUnmarshalInterface
performs are the following:
- The function reads a CLSID from the stream.
- If standard marshalling is being used, the function gets an IMarshal pointer to an instance of the standard unmarshaller. If custom marshalling is
being used, the function creates a proxy by calling the CoCreateInstance function, passing the CLSID it read from the stream, and requests an IMarshal interface pointer to the newly created proxy.
- Using whichever IMarshal interface pointer it has acquired, the function then calls IMarshal::UnmarshalInterface and, if appropriate, IMarshal::ReleaseMarshalData.
You typically do not need to call this function. The primary caller of this
function is OLE, from within interface proxies or stubs that unmarshal an
The only place where you might need to call this function is from your
implementation of IMarshal::UnmarshalInterface
, if you are performing custom marshaling. If your implementation of IMarshal::MarshalInterface
called the CoMarshalInterface
function to marshal an interface pointer to the stream, you must call CoUnmarshalInterface
to retrieve that interface pointer. The retrieved interface pointer is
typically a pointer to a private object in the originating process.
- Software for developers
Software for Android Developers
- More information resources
Unix Manual Pages