provided by: 
Originally published at Internet.comWin32 offers several possibilities for interprocess communication (shared memory, mailslots, named pipes to name a few). Each has its advantages and disadvantages - the best one does not actually exist. This article describes how to use shared memory for interprocess communication in the following scenario: * Multiple processes are communicating to one process (kind of similar to client/server architecture on a local machine). * Data transfer is bidirectional which means that each process (client) sends data to the server and collects an answer. * Data transfer is initiated by the clients. * Access to shared memory must be protected from concurrent access which results in data corruption - synchronization.
Note: Shared memory is a very convenient method for interprocess communication on a local machine since it will work both on Windows 95 and on Windows NT. Named Pipes (better choice since it works also via a network) are not fully supported on Windows 95.
Since multiple clients are communicating to the server, it is assumed that the server proccess must be started first. However, this is not a requirement. First, I will describe the server side and then the client side.
Server
...
Read article at Internet.com site