I need to implement a class in C++ that can call a C# function from unmanaged C++ and return a value. I've done this from C++ to C++ using MIDL/RPC binding over named pipe which works great but now my server application is moving to C# but the client must remain unmanaged C++ (it's an explorer extension).
I've looked at various methods and lots of people suggest COM, it was my understanding that COM was not so much for IPC/RPC but for hosting a served object in a client app. Is this going to be possible with COM, if so, can anyone point me in the direction of a good reference or example?
EDIT:
Just to be clear, I cannot use managed code as the client (DLL) is loaded into Explorer's process space.
What I am trying to achieve is when the user right-clicks on a file the extension will ask a running service (session 0) for some details about the file. This was previously done via RPC in a C++ <-> C++ client/server. Now the server has been upgraded to C# but I'm not sure what my options are. Is COM an option?
Thanks, J