IPC bewteen .Net & Native C++ processes

Feb 17, 2010 at 9:16 AM

Hi,

I need some advises in order to interconnect remotely 1 application written in C# / .Net 2.0 with and 1 application written in native C++.
A precision: the C++ application is a COTS product (I can't recompile it), and loads a plugin Dll that I create, so I can only integrate the interconnection code in that Dll.
Do you have any idea of the best solution ?
Of course the socket based solution exists, however it requires to manage the serialization & unserailization for every type that could be exchanged.

Thanks a lot for your help !

Cheers,

Pascal Levier

Coordinator
Feb 18, 2010 at 8:57 AM

Hello

Are the two applications connected in the intranet or on the internet? If they are in the intrnet environment, you may consider named pipe. See CppNamedPipeClient, CppNamedPipeServer, CSNamedPipeClient, CSNamedPipeServer samples. These C++ C# named pipe client and server can communicate with each other.

If the applications are on the internet env, you need socket. Currently, I do not have a sample to demo socket communication between .NET and C++ app in All-In-One Code Framework. You can try searching it on the internet.

If you have any feedback or suggestions for the All-In-One Code Framework project, please email it to codefxf@microsoft.com

Regards
Jialiang Ge