I have a plugin DLL that I've written in C++ MFC loaded by a 3rd party application presumably written in C++ with MFC. My DLL has a GUI interface and is based on CWinApp; I guess somehow the message pump of my plugin cooperates with the message pump of the main app (?) I believe my DLL is probably loaded via LoadLibrary and started via a call to an exported function in my DLL. My plugin calls functions and classes that the 3rd party application exposes via a static lib that my DLL links against.
This is fine but working with MFC/C++ is frustrating as compared to working in WinForms and C#. So I'm wondering if it would be possible to have my DLL not use MFC but instead use winforms and C#? Is there some way this could work? I'm imagining I guess the DLL written in C# that exports a function that is called from the 3rd party app and then this starting a winforms app? Also my DLL needs to link to a static C++ library in order to interop with the 3rd party application. Would that be possible to access from C#? Or if not directly possible maybe I can write some kind of wrapper?