UWP development details record: IStream and IRandomAccessStream ^ and IMFByteStream conversion, uwpistream
IStream and IRandomAccessStream ^ convert each other
IRandomAccessStream ^ --> IStream: CreateStreamOverRandomAccessStream
IStream --> IRandomAccessStream ^: CreateRandomAccessStreamOverStream
Mutual conversion between IStream and IMFByteStream
IStream --> IMFByteStream: MFCreateMFByteStreamOnStream
IMFByteStream --> IStream: MFCreateStreamOnMFByteStream
IMFByteStream andIRandomAccessStream ^ mutual conversion
IRandomAccessStream ^ --> IMFByteStream: MFCreateMFByteStreamOnStreamEx
IMFByteStream --> IRandomAccessStream ^: MFCreateStreamOnMFByteStreamEx
In addition:
The MFCreateMFByteStreamOnStreamEx MSDN document has an error. The first parameter should be IUnknown * rather than IUnknown;
Convert IRandomAccessStream ^ To IUnknown * use reinterpret_cast <IUnknown *> () or reinterpret_cast <IInspectable *> ().