I am trying to make interprocess communication between two processes on windows, from an high level of perspective I want to synchronize these two processes, let say there are two processes, process 1 process 2,
Process 1 is an 32 bit application and process 2 is an 64 bit application, process 1 is running, sometimes it is calling process 2, process 2 runs for short terms and closes it self, process 2 needs to read some data from process 1 when it is opened.
For this scenario I thought MailSlot could be a good candidate, in order to communicate over mail slot process 2 must create a mail slot, then process 1 should send mail to this mail slot, and than process 2 should read mail slot, my question is how can I synchronize these two processes so that when process 2 is opened it creates a mail slot, than it triggers process 1 to send mail and switches to a wait state, than process 1 sends mail to process 2, than process 2 switches to run state and reads mail.
How can I implement such a scenario?