DMLSRV: Demonstrates Basic DDEML Server Communications
DMLSRV is a companion program for the DMLCLT sample application. These two applications show basic dynamic data exchange management library (DDEML) communications between a server and a client. DMLCLT and DMLSRV demonstrate connect, request, asynchronous, hot advise loop, and warm advise loop transactions.
Connect: The client connects to the server to initiate a conversation. DMLCLT uses the DdeConnect function to start a general conversation (which deals with text and bitmaps) and a SYSTEM conversation (which supports the system topic).
Request: When the client needs information from the server, it calls the DdeClientTransaction(...XTYP_REQUEST) function. DMLCLT demonstrates several types of requests.
Asynchronous transaction: DMLCLT starts an asynchronous transaction with the server to request information that may not be ready at the time of the request. DMLCLT starts this transaction when the user selects the Asynchronous Transaction command from the Transactions menu. When the server receives the request (as an XTYP_REQUEST transaction), it prompts the user for the number of window bitmaps the client should display and returns a data handle containing the number from its callback function. The DDEML sends the client a XTYP_XACT_COMPLETE to indicate that the server has finished the transaction. The client then displays the desired number of bitmaps. The asynchronous transaction ensures that the transaction will not time out before the user has a chance to close the dialog box.
Hot Advise Loop: When a hot advise loop is established between a client and a server, the server notifies the client (through an XTYP_ADVDATA) each time data changes. The notification includes a handle to the changed data. When you choose the Change Bitmap command from the DMLSRV window, the server notifies the client that the bitmap has changed (this notification includes a handle to the changed bitmap). The client then displays the bitmap in its window.
Warm Advise Loop: When a warm advise loop is established between a client and a server, the server notifies the client that the specified data has changed, but it does not send the client the changed data by default. DMLCLT displays a message box asking the user if the client window should be updated with the bitmap from the server. If the user selects Yes, the client requests the data containing the changed bitmap from the server through the DdeClientTransaction(...XTYP_REQUEST) function.
DMLSRV was built and tested under Microsoft(R) Windows(TM) version 3.1.
{ewc navigate.dll, ewbutton, /Bcodeview /T"Click to open or copy files in the dmlsrv project." /C"samples}