You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This came up in microsoft/CsWinRT#1858. We'd like for the COM generator to support [return: MarshalUsing] to use custom marshallers for exceptions, so that CsWinRT could correctly allow using the necessary error propagation logic from generated COM interfaces. Currently, trying the code below doesn't do anything (but also it doesn't emit any warnings, it just silently does nothing).
API proposal
class GeneratedComInterfaceAttribute
{
+ public Type? ExceptionToUnmanagedMarshaller { get; set; }
}
Use case example
Users will be able to implement COM interfaces like this, implemented on WinRT-exposed types: