Click here to Skip to main content
15,884,636 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, all!
There are 2 applications on windows: a application compiled with cygwin, a MFC application.
How to communicate between two processes?
Here, main process is MFC application, sub process is the application compiled with cygwin.
Thanks.

What I have tried:

I can't use PostMessage, pipe, shared memory.
Posted
Comments
Jochen Arndt 12-Sep-17 13:28pm    
How about a network connection using localhost?
forest-321 12-Sep-17 20:43pm    
Is there any way to communicate between mfc and cygwin with pipe?
Because, sub application already has the network communication modules.
Jochen Arndt 13-Sep-17 6:49am    
That statement makes no sense because an application can use multiple network connections as server or client and you stated that pipes can't be used.

It should be possible to use pipes but I actually don't know how.
forest-321 13-Sep-17 9:00am    
Thanks for reply.
I agree for your suggestion on network communication.
I think that the named pipes are not available because the file systems on which the two applications are based are different.
In case of pipes:
The pipes are created by using fork() function on LINUX and CreatePipe() function on windows, and I do not know how to communicate with each other.
Jochen Arndt 13-Sep-17 9:12am    
When using cygwin on Windows it will redirect the operations to the Windows API (that is for example pipe() should finally call CreatePipe()).

fork() is not related to piping. It might be used to "split" a process into two parts that handle different operations like reading and writing from/to a pipe. But the common method would be using threads instead.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900