Communicating between processes

Started by
3 comments, last by RamboBones 20 years, 3 months ago
Does anybody know how to get two Win32 processes to be able to communicate through each other. Like send messages and data to each other. I thought about using windows but since one of the processes won''t actually have a window assigned to it I didn''t really want to create a small one and hide it just for that purpose. What I''m looking for is something similar to the two applications reading and writing from the same file to pass information, only a better model of that. I looked at pipes but can''t understand how to use them or even if they do what I want. If anybody knows how to do this then please tell me.
Advertisement
you could always connect them via winsock...
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
Actually, using hidden windows as middlemen might be the most straightforward solution if you''re unwilling to use pipes.

If you''re seeking one-way communication between parent and child applications, you may want to look into anonymous pipes. If you''d like the two applications to send and receive data over a single, two-way connection, consider a named pipe.

Mailslots are most similar to the type of mechanism you described: an application creates a mailslot by reserving a certain amount of space in memory (analogous to a file on the hard disk). Other applications deposit information into the mailslot, and the owner application accesses and acts on the received contents.

________________________________________________
RapscallionGL development continues...
"Optimal decisions, once made, do not need to be changed." - Robert Sedgewick, Algorithms in C
________________________________________________"Optimal decisions, once made, do not need to be changed." - Robert Sedgewick, Algorithms in C
okay, a mailslot seems just like what I want. but umm.... how do I use one. Got any links to some tutorials or anything?

Edit: i'll look around on MSDN

Edit2: I've gotten mailslots working, thanks guys

[edited by - RamboBones on January 15, 2004 12:34:12 AM]

[edited by - RamboBones on January 16, 2004 1:27:36 AM]
Theres an article in the MSDN about inter process communicating via shared files. Dont have the link atm, but if you search for it I''m sure you''ll find it.

This topic is closed to new replies.

Advertisement