Click here to Skip to main content
15,887,341 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
In my VC++ code,

Is it possible SendMessage() between two processes not using shared memory or socket?

For example,

A.exe send a message to B.exe which is running background.

Thank you in advance.

What I have tried:

More than 2 days wasted for this program....
Posted
Updated 22-May-17 20:44pm
Comments
Michael_Davies 23-May-17 2:38am    
You do not say which operating system, Win/Linux? For Windows there are several methods of IPC, see;
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365574(v=vs.85).aspx
Member 12330615 31-May-17 21:20pm    
Windows,
But B.exe does not use MFC, it is not dialob based.
Mohibur Rashid 23-May-17 3:25am    
try socket

Hi,
Search solution using WM_COPYDATA parameter to send message.
Here you can find the start of the solution:
https://stackoverflow.com/questions/2451103/use-wm-copydata-to-send-data-between-processes
Best regards
 
Share this answer
 
In SendMessage function pass first parameter as handle of second process.
Please refer link for more details -> Sending a message to the Main Frame Window of Another Application, given only the Process Handle[^]
 
Share this answer
 

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