Using System.Windows.Forms.Integration.ElementHost.ElementHost in Avalonia crash
Using System.Windows.Forms.Integration.ElementHost.ElementHost in Avalonia
在 WinFormsComInterop.WinFormsComWrappers.ComputeVtables(Object obj, CreateComInterfaceFlags flags, Int32& count) 在 System.StubHelpers.InterfaceMarshaler.ConvertToNative(Object objSrc, IntPtr itfMT, IntPtr classMT, Int32 flags) 在 MS.Win32.UnsafeNativeMethods.RegisterDragDrop(HandleRef hwnd, IOleDropTarget target) 在 System.Windows.DragDrop.RegisterDropTarget(IntPtr windowHandle) 在 System.Windows.Interop.HwndSource.Initialize(HwndSourceParameters parameters) 在 System.Windows.Forms.Integration.ElementHost.<OnHandleCreated>b__54_0() 在 System.Windows.Threading.Dispatcher.Invoke(Action callback, DispatcherPriority priority, CancellationToken cancellationToken, TimeSpan timeout) 在 System.Windows.Threading.Dispatcher.Invoke(Action callback) 在 System.Windows.Forms.Integration.ElementHost.OnHandleCreated(EventArgs e) 在 System.Windows.Forms.Control.WmCreate(Message& m) 在 System.Windows.Forms.Control.WndProc(Message& m) 在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam)
Are you have small sample for the integration? Really small with only one control
https://github.com/chenrensong/Avalonia_AOT_WPF
I want to test whether Avalonia AOT and WPF can coexist
WPF currently not supported I would say. So even if I manage to made a progress I expect thing fails down the road. Anyway I would try to make thing working
The above error occurred in a debug environment without aot
I did try with custom build of WinFormsComInterop which enables WPF support, but it still requires to have custom WPF fork.