On Wed Jun 18 09:02:59 2025 +0000, Hans Leidekker wrote:
monodis also asserts on native windows.foundation.winmd. It could be making assumptions that hold for .NET assemblies but not for WinRT metadata, or perhaps it's a plain bug. I doubt it was tested a lot against winmd files. This snippet produces equivalent rows according to winedump -j clr when compiled with widl and midlrt:
[ contract(Windows.Foundation.UniversalApiContract, 1.0), uuid(11111111-2222-3333-4444-555555555555), ] interface IWineInterface : IInspectable { [propget] HRESULT WineMethod([out, retval] int *param); [propput] HRESULT WineMethod(int param); };
Hmm... I was also looking at existing Windows metadata files with ILSpy and their getter/setters seem to have corresponding MEMBERREF rows, not sure why.
The sample seem to match, indeed (and monodis doesn't assert there, only does with more complex IDL), although it only does with int properties. The property signature is currently hardcoded and should probably use the proper type.