Windows Form application and MFC application communication

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
 
J

jacky kwok

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.
 
B

bkm

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top