InterProcess Communication, .Net to C++

AOA,

I seek suggestions and possibly solutions to the problem stated below:

I have an application written purely in .NET ( Windows Form Application) and another application that is supposed to be written in MFC(Visual C++) or Win32 GUI Application. The problem is to communicate data between the two applications.
for example,
If i click a button in .NET GUI application, the data(some text) shuld be sent to the VC++ GUI application.
Both the .NET and VC++ application will run on the same PC.

One option that seems applicable is to use sockets for data communication between the two applications. But since both application will run on the same PC, I thought if there were some other faster options available. Like interprocess communication etc.

What is the preffered approach.


Answer this question

InterProcess Communication, .Net to C++

  • eTape

    Depends on which data you have to share:
    - If your goal is to share that an event happens, without giving additional info, you can pulse or set an OS Event
    - If your goal is to share that an event happens, plus giving additional info that are integers or can be casted to integers, you can use the windows message pump
    - If your goal is to send not-trivial data I would use a socket with UDP protocol, since it does not requires a physical connection
    - If your goal is to send not-trivial data and you must be aware that the other app is on I would use a socket with TCP protocol

    Anyway an UDP or TCP socket gives you the maximum flexibility, while the OS event give you the maximum performance.



  • Tommmy77

    Thanks Nimrand.It really help.

    Can any body point to any other way beside it



  • DanielWiss

    Sockets would work just fine, from an efficiency standpoint. Named pipes might also be an option, but I have no experience with using those on Windows. However, it is supported, I believe.
  • InterProcess Communication, .Net to C++