Choosing an IPC Mechanism
After you decide that your application would benefit from IPC, you must decide which of the available IPC methods to use. It is likely that an application will use several IPC mechanisms. For example, all Win32-based applications should provide at least minimal support for the clipboard. In addition, COM and DDE offer the application an opportunity to communicate with applications that support these protocols. By supporting the protocols for the clipboard, COM, and DDE, you enable your application to share data with other applications, without knowing anything about the applications themselves.
The answers to these questions determine whether an application can benefit by using one or more of the IPC mechanisms available in the Win32 API.
-
Should the application be able to communicate with other applications running on other computers on a network, or is it sufficient for the application to communicate only with applications on the local computer?
-
Should the application be able to communicate with applications running on other computers that may be running under different operating systems (that is, MS-DOS®, 16-bit Windows®, UNIX)?
-
Should the user of the application have to choose the other application(s) with which the application communicates, or can the application implicitly find its cooperating partners?
-
Should the application communicate with many different applications in a general way, such as allowing cut and paste operations with any other application, or should its communications requirements be limited to a restricted set of interactions with specific other applications?
-
Is performance a critical aspect of the application? All IPC mechanisms include some amount of overhead.
-
Should the application be a GUI application or a console application? Some IPC mechanisms require a GUI application.