I am really confused by the multitude of misinformation about native / managed interop.
I have a regular C++ exe which is NOT built using CLR stuff (it is neither Managed C++ nor C++/CLI and never will be). This C++ exe is "in charge", there is no managed wrapper for it.
I would like to access some code I have in a C# assembly from my C++ exe. I can access the C# assembly from my C++ code using COM. However, when my C# code detects an event I would like it to call back into my C++ code. The C++ function pointer to call back into will be provided at runtime. Note that the C++ function pointer is to a function found in the exe's execution environment. It may use static members from there. I don't want the managed code to try and load up some DLL to call a function (there is no DLL).
How do I pass this C++ function pointer to my C# code through COM/.NET and have my C# code successfully call it?
Thanks!