Ii. Working Principle of DDE
As the name suggests, DDE provides differentProgramA general technology that enables Dynamic Data Exchange during operation. Although Windows messages are the best way to transmit information between different program windows, a message can only contain two parameters (wparam and lparam) and cannot transmit more information. Memory block is an important means to store more information, but it does not support sharing of global memory handles. DDE is a protocol based on the Windows internal message system, global atoms, and shared global memory. It is used to coordinate data exchange and command calls between Windows applications.
The DDE protocol uses three levels of naming: Service, topic, and item to identify the data unit transmitted by DDE. The topic is a meaningful unit of information for the server. It is a good topic for Word documents. Many servers have default themes, but they cannot know which topics the server has, unless you have read the relevant technical documents of the application. Each conversation between the DDE client and the service program is started by the customer first. Therefore, the DDE Server must be put into operation before each customer starts, the following is the transaction composition of a typical DDE session process:
· Automatic client program session and server program response.
· Customers and servers exchange data using the following methods:
· The server sends data to the customer at the customer's request;
· The customer actively wants the server to send data;
· Customers require the server to send data (hot data connection) when data is modified );
· The customer requires the server to send a notification (warm data connection) after data modification );
· The server executes a command at the customer's requirement.
· The session is terminated by the customer or server.