Windows Form application and MFC application communication

  • Thread starter Thread starter batista
  • Start date Start date
B

batista

I need 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.

Need ur thought on this.

Thanks
 
batista said:
I need 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.

Need ur thought on this.

Thanks

You can use namedpipe.
In the same PC, namedpipe should be faster than Socket.

The main drawback is Dotnet framework does not have class to support
namedpipe directly. However, it is easy to find many open source code in
Internet, which wraps the namedpipe API in dotnet class.
 
Did you consider using MSMQ?
From a .net application, create a message and drop it in the queue. Change
your MFC application to listen to this queue and receive the text that .net
application passes.

Hope this helps.
 
Back
Top