✔ 最佳答案
The terminology of "exchanging data between programs" is "interprocess communications" (IPC).
The program supplying data is the server and the one requesting data is the client.
There are many protocols available to Visual C++ on the Windows platform for IPC. Please click the link on each of them for details:
IPC with local processes:
Clipboard a set of functions and messages that enable applications to transfer data.
Component Object Model (Object Linking & Embedding) is a platform-independent, distributed, object-oriented system for creating binary software components that can interact. COM is the foundation technology for Microsoft's OLE (compound documents) and ActiveX® (Internet-enabled components) technologies, as well as others.
Data Copy provides a WM_COPYDATA message that enables you to send data from one application to another.
Dynamic Data Exchange (DDE) is a set of messages and guidelines which sends messages between applications that share data and uses shared memory to exchange data between applications.
DDE Management Library (DDEML) provides an interface that simplifies the task of adding DDE capability to an application.
File Mapping is the association of a file's contents with a portion of the virtual address space of a process amd the system creates a file mapping object (also known as a section object) to maintain this association.
Mailslots is a mechanism for one-way interprocess communications: Applications can store messages in a mailslot and the owner of the mailslot can retrieve messages that are stored there.
Pipes is a section of shared memory that processes use for communication.
IPC with remote processes:
Remote Procedure Call (RPC) can formally specify an interface to the remote procedures using a language designed for this purpose.
Windows Sockets 2 (Winsocks2) Windows Sockets 2 (Winsock) enables programmers to create advanced Internet, intranet, and other network-capable applications to transmit application data across the wire, independent of the network protocol being used.
Distributed Component Object Model (DCOM) extends the Component Object Model (COM) to support communication among objects on different computers—on a local area network (LAN), a wide area network (WAN), or even the Internet.
Reference:
Interprocess Communications