Passes streams containing interfaces between different threads, and is a
helper that allows you to pass interface pointers easily and correctly between
| REFIID riid,
||//Interface exposed by the object to be marshaled
| LPUNKNOWN pUnk,
||//Points to the object to be marshaled
| LPSTREAM * ppStm
||//Output pointer to the stream interface
Specifies the interface that is to be marshalled.
Points to the IUnknown
of the object to be marshalled, thus specifying the object.
[Out] On return, points to the stream containing the interface .
Output stream contains marshalled interface.
There was not enough memory to complete the call.
One or more arguments are invalid.
CoMarshalInterThreadInterfaceInStream is a helper function that facilitates passing streams containing interfaces
between threads, although you could implement it yourself from existing APIs if
desired. It creates a stream and passes it to CoMarshalInterface
, then passes the pointer to that stream back to the caller. The stream it
returns is guaranteed to behave correctly when different threads access it. The
receiving thread can then call the corresponding helper function CoGetInterfaceAndReleaseStream
to get the interface pointer and release the stream object.
- Software for developers
Software for Android Developers
- More information resources
Unix Manual Pages