Re: IRandomAccessStream doesn't belong in windows.storage

Rémi Bernon <[email protected]> Wed, 21 May 2025 10:26:12 +0200
Newsgroups gmane.comp.emulators.wine.devel
Message-ID <[email protected]>
On 5/21/25 10:18, light gray wrote:
> 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.
> 

In the Windows version I have been checking with (W10 22H2 or something 
like that), Windows.Storage.Streams.RandomAccessStream runtime class is 
registered from windows.storage.dll.

There has been other instances where the classes are moved around, I 
think we can assume it does not really matter.

-- 
Rémi Bernon <[email protected]>