WinFormsComInterop icon indicating copy to clipboard operation
WinFormsComInterop copied to clipboard

can you develop a COM Wrapper version that can run with wpf and corert?

Open uno-studio opened this issue 4 years ago • 2 comments

Hello, that's great. this is what I was looking for. I am a wpf app developer, can you develop a COM Wrapper version that can run with wpf and corert? It would be great if that could be done

uno-studio avatar Apr 07 '21 18:04 uno-studio

@unominhtuan this project is for testing implementation of COM support in NativeAOT. Actual progress can be monitored here https://github.com/dotnet/runtimelab/issues/306

This is slowly moving to some progress, so cross your fingers

kant2002 avatar Apr 08 '21 01:04 kant2002

@unofficialdev I think I can say what can be done right now. Here known and unknown dragons.

Known dragons is

  • Marshal.ReleaseComObject and Marshal.FinalReleaseComObject does not work with ComWrappers. This would not be implemented in CoreCLR. Probably same for NativeAOT, so you have to maintain fork with simple change.
  • WPF has to be modified to support for ComWrappers. They are slow to react on the matter, so chances that it would be slow process. You can show your interest by expressing why you need this here. Also if any PR appears for ComWrappers support, also express your interested in having these changes landed.

Unknown dragons

  • WPF uses C++/CLI which I still does not hit, so not sure how it is affects NativeAOT. That can be big problem down the road. Maybe not and limited form of WPF can run with NativeAOT.

kant2002 avatar Jul 14 '21 06:07 kant2002