Two programs communicating locally.
I came to codeguru just to browse early in my C programming career. I programmed mainly on Linux but I want to move to windows. I'm definitely not the strongest programmer, but I like the challenge sometimes. I'm not looking for COMPLETE answers here, just directions and pointers.
I want two separate programs to run on windows, very simple programs. These programs will communicate locally back and forth by sending irrelevant (at first) data. I want them to be able to detect and send data back and forth. Looking around, I've decided to use sockets. I am new to sockets ESPECIALLY on windows. Can anyone point me to a good tutorial or give me some info to look at that would help me in this programming endeavor.
I have been following these forums for a few months now. This is my first post, so I may have messed up somewhere, but this community seems great. Thanks guys!
Re: Two programs communicating locally.
Well, sockets are good for IPC but using them to communicate locally (on the same PC) would be an overhead.
Perhaps simple posting/sending user defined messages with PostMessage/SendMessage will be easier to implement?
Or using WM_COPYDATA message?
Another possibility is using File Mapping. Or just a Clipboard...
Have a look at:
MSDN: Interprocess Communications
Using WM_COPYDATA
An MFC Asynchronous Socket Example Done Right
Re: Two programs communicating locally.
I would be looking at using pipes? These are quite easy to set up and use for IPC.
http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx
Re: Two programs communicating locally.
Yeah, I want to do it with sockets as I may and probably will expand. The references link will help a great deal. If you guys have any pointers or further references, please let me know!
Re: Two programs communicating locally.