IRandomAccessStream doesn't belong in windows.storage

light gray <[email protected]> Wed, 21 May 2025 11:48:20 +0330
Newsgroups gmane.comp.emulators.wine.devel
Message-ID <CAK1GefFtbv5bncu-nUePtN0=NT2Jm8x9_78UxtWOxaFPxAgRwg@mail.gmail.com>
Hi devs!

I've recently noticed that there's a new `windows.storage` WinRT library
within Wine, and the library houses a stubbed implementation for
`IRandomAccessStream`.
There's an issue however. Looking at Windows registry keys to see which
libraries register which runtime classes, it appears `shcore` houses the
implementation for `IRandomAccessStream`. Not `windows.storage`.
While inherently this isn't a problem since applications acquire runtime
classes via `RoGetActivationFactory`, this could pose an issue later down
the line when more WinRT interfaces get implemented within Wine. Mainly
with how different classes are registered at compile time. Not only that,
it would also make implementing functions such as
`CreateRandomAccessStreamOnFile` a bit more complicated.
As a reference, the following is my own experimental implementation of
`IRandomAccessStream`:
https://github.com/Weather-OS/WineCoreUAP/commit/318d3b8ecb036f04dcf6365235ac1c123dbafb1c

Best wishes, Weather.