Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using System.Windows.Forms.Integration.ElementHost.ElementHost in Avalonia crash #64

Open
chenrensong opened this issue Aug 15, 2023 · 6 comments

Comments

@chenrensong
Copy link

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.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)

@kant2002
Copy link
Owner

Are you have small sample for the integration? Really small with only one control

@chenrensong
Copy link
Author

https://github.com/chenrensong/Avalonia_AOT_WPF

@chenrensong
Copy link
Author

I want to test whether Avalonia AOT and WPF can coexist

@kant2002
Copy link
Owner

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

@chenrensong
Copy link
Author

The above error occurred in a debug environment without aot

@kant2002
Copy link
Owner

I did try with custom build of WinFormsComInterop which enables WPF support, but it still requires to have custom WPF fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants