Reputation: 2018
CreateProcess()
from processthreadsapi.h
).As P1 will start P2, I imagine P2 will know about P1 and will be able to signal it (send it a message) easily...
Can you tell me what would be the easiest approach to implement this mechanism?
The important point, for me in this post, is what is the easiest mechanism for sending a message from P2 to P1.
Using the CreateProcess()
function, info. can be sent to the child process.
Can this info be the "identity" of the parent process (PPID) so that the child process can send it messages?
Thank you.
Upvotes: 0
Views: 1110
Reputation: 324
For the problem you have described I would use anonymous pipes for interprocess communication.
Here is a whole article on Windows IPC that you should read : https://learn.microsoft.com/en-us/windows/win32/ipc/interprocess-communications#using-pipes-for-ipc
Upvotes: 2
Reputation: 792
Can you tell me what would be the easiest approach to implement this mechanism?
Upvotes: 0