I wanted to implement interprocess communication without using named pipes, without using memory mapped files, without using sockets. I wanted to implement my own method of communication between processes, and here is my result: http://gist.github.com/543717
I was hoping someone could look over my code and give me some constructive feedback about how to improve it, and possibly how better to design it. It is also a bit buggy, meaning that the wrong input could cause errors. If someone could please just take a look I would really appreciate it.
I don't like to rely on the windows messaging system to perform interprocess communication.
I say this because the processing of windows messages can be stalled for a variety of reasons and interrupt the passing of IP data. I guess you can mitigate this somewhat by putting your code into message handling worker threads.
Besides, this would require to have a message queue always, disregarding of the type of the app, otherwise it should be stated "for windowed apps only". Sounds like not a general solution, unlike pipes, MMFs and sockets.
My code actually does handle all the windows messages in a separate thread so you don't have to. All you have to do is read and write to connection objects.
Also, I've rewritten a great portion of the code now, so I don't think it is as buggy anymore. I had to remove the stuff with the ports; that wasn't working out. But now you just connect to an application and an end point called an AppPhone is created. You just read and write to this object, and you can communicate between processes.