There is already answered question about passing C++ callback into in-process COM method. But the same technique doesn't work for out-of-process usage.
I have a C# interface and it has a method which registers callback/delegate with two parameters.
void ProcessNotification(ConsoleNotificationType type, IntPtr parameter);
This C# interface is registered using Out-of-process COM configuration (exe-file). Now I want to pass a C++ callback function into that method, but Visual Studio gives me an error:
InvalidFunctionPointerInDelegate
So, how can I pass my C++ callback function into the Interface's registering callback function?