I have a WPF application (.exe) which needs to open and display a window when a COM object (VB6 macro) calls an application method. I’ve made one managed code project in the .exe solution COM visible and the COM object successfully calls a method on the managed code project.
How do I start the WPF window from the managed code method? Do I need to make my entire exe COM visible? Do I need to turn my .exe into a class library .dll?
As you know the CLR is a COM server, so your managed method will be called in the same thread/process your COM object(the VB6 macro) lives.
Do you need to spawn your WPF app as a separate process(out of proc). This might be harder with the COM interop but if you want to go that way you can check that article Building COM Servers in .NET.
Another, much easier option, is just to use Process.Start in your managed stub to execute your WPF app.