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
As you can see, I use an EventHandler without generics (corresponding to object sender and EventArgs args) and the event fires normally. Since the sender type is CoreWindow and args is object, it doesn't have much impact.
如图所示,我使用不带有泛型的 EventHandler(对应 object sender 和 EventArgs args),事件正常触发。因为这个事件对应 sender 类型为 CoreWindow,args 为 object,故没有太大影响。
However when I use TypedEventHandler with generics, an exception occurs, so I would like to ask you, is there any workaround?
然而当我使用带有泛型的 TypedEventHandler 时,却发生了异常,所以想问您一下,有什么解决方法吗?
When I try to use ComWrappersSupport. RegisterComInterfaceEntries registered EventHandler type, The NullReferenceException occurs when the ABI.System.EventHandler.CreateMarshaler() method is called
Describe the bug
How to CreateMarshaler with Generic types?
As you can see, I use an EventHandler without generics (corresponding to object sender and EventArgs args) and the event fires normally. Since the sender type is CoreWindow and args is object, it doesn't have much impact.
如图所示,我使用不带有泛型的 EventHandler(对应 object sender 和 EventArgs args),事件正常触发。因为这个事件对应 sender 类型为 CoreWindow,args 为 object,故没有太大影响。
However when I use TypedEventHandler with generics, an exception occurs, so I would like to ask you, is there any workaround?
然而当我使用带有泛型的 TypedEventHandler 时,却发生了异常,所以想问您一下,有什么解决方法吗?
Expected behavior
CreateMarshaller with Generic types normally
Version Info
CsWinRT 2.1.3
Windows SDK 10.0.26100.45
.NET SDK 9.0.0-preivew7
Additional context
None
The text was updated successfully, but these errors were encountered: