Communication between processes
-
Hello, What is the best way to make different processes send messages to one another? I mean, I know how to make different threads within the same process (app) communicate with one another, but I really don't know what is the correct way of making different threads in different processes communicate with each other... David
-
Hello, What is the best way to make different processes send messages to one another? I mean, I know how to make different threads within the same process (app) communicate with one another, but I really don't know what is the correct way of making different threads in different processes communicate with each other... David
-
Hello, What is the best way to make different processes send messages to one another? I mean, I know how to make different threads within the same process (app) communicate with one another, but I really don't know what is the correct way of making different threads in different processes communicate with each other... David
Depends on what you are trying to do. 1. If all your processes are on the same machine, and you don't need a lot of data, or the data is of the same format every time, you can use memory mapped files. 2. You can use TCP/IP and sockets to send data back and forth, also works over the network. 3. If it is a TINY amount of infrequent data, with no return recipt required, you could look into MailSlots. 4. Hey, you can even use COM, but what a pain in the backside! (Marshaling data, getting hrreading mdoels and initialization to work right, DCOM settings, etc.) 5. You can use Local RPC (everything running on same computer) or Remote RPC (not necessarily on same computer). 6. WM_COPYDATA - sending data between windows of different processes. Your question is impossible to answer appropriately without more details. But you might want to read a little bit about each of the technologies mentioned here, and then you can make your own decision.
-
Depends on what you are trying to do. 1. If all your processes are on the same machine, and you don't need a lot of data, or the data is of the same format every time, you can use memory mapped files. 2. You can use TCP/IP and sockets to send data back and forth, also works over the network. 3. If it is a TINY amount of infrequent data, with no return recipt required, you could look into MailSlots. 4. Hey, you can even use COM, but what a pain in the backside! (Marshaling data, getting hrreading mdoels and initialization to work right, DCOM settings, etc.) 5. You can use Local RPC (everything running on same computer) or Remote RPC (not necessarily on same computer). 6. WM_COPYDATA - sending data between windows of different processes. Your question is impossible to answer appropriately without more details. But you might want to read a little bit about each of the technologies mentioned here, and then you can make your own decision.
Hi Blake and thanks for the input. Looking back at you posted, I think I will have to go for the COM solution as I think it is the best one. Can I ask you one thing though? Do you know of any site(s) with the right technical content I could learn from?
-
Hi Blake and thanks for the input. Looking back at you posted, I think I will have to go for the COM solution as I think it is the best one. Can I ask you one thing though? Do you know of any site(s) with the right technical content I could learn from?
I use CodeProject and MSDN almost exclusively. You can post an aritcle request here on CodeProejct, and someone might write a tutorial on COM as it pertains to InterProcess Communications (IPC). I am sorry that I don't have a recommendation for an excellent COM site. Maybe another user here could come up with some suggestions. Also, try the COM forum on CodeProject (unless you already did...)