Within C++ on Windows, is there any easy way to create a (COM) IStream interface to an existing std::stream object?
An example would be to read an image with IWICStream::InitializeFromIStream() from std::cin.
There is no standard implementation for that. You need to write your class (or find a third-party one) that implements the IStream interface and internally delegates to an std::stream as needed. However, you are likely to have trouble implementing IStream::Stat(), which is commonly used to retrieve a stream's data size. In the case of std::cin, you would not know how much data is being provided.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With