Unmarshals a buffer containing an interface pointer and releases the stream when an interface pointer has been marshaled from another thread to the calling thread.
HRESULT CoGetInterfaceAndReleaseStream(
LPSTREAM pStm, //Pointer to the stream from which the object is
// to be marshaled
REFIID riid, //Reference to the identifier of the interface
LPVOID * ppv //Address of output variable that receives the
// interface pointer requested in riid
);
This function supports the standard return value E_INVALIDARG, as well as the following:
This function can also return any of the values returned by CoUnmarshalInterface.
The CoGetInterfaceAndReleaseStream function performs the following tasks:
Windows NT: Use version 4.0 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in objbase.h.
Import Library: Included as a resource in ole32.dll.
CoMarshalInterThreadInterfaceInStream, CoUnmarshalInterface