Dec 142017
 
Demo of using DDEML under Windows 3.1.
File DMLDEM.ZIP from The Programmer’s Corner in
Category Windows 3.X Files
Demo of using DDEML under Windows 3.1.
File Name File Size Zip Size Zip Type
DEMO.ZIP 64806 60808 deflated
LEGAL.TXT 1889 916 deflated
README.TXT 7144 2194 deflated
UNZIPME.BAT 22 22 stored

Download File DMLDEM.ZIP Here

Contents of the README.TXT file


The DMLDEMO sample demonstrates a basic
implementation of DDEML to communicate between a
server and a client. The sample demonstrates the
following types of transactions:

Connect
Request
Asynchronous Tranactions
Hot Advise Loop
Warm Advise Loop

The implementation of these transactions is discussed
in further detail below:

Connect: The client connects to the server in order
to initiate a conversation. In DMLDEMO,
DdeConnect() is used 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 gets it by calling the
DdeClientTransaction(...XTYP_REQUEST) function.
DMLDEMO demonstrates several types of requests
in several cases.

Asynchronous Transaction: The client starts an
asynchronous transaction with the server in order to
request information that may not be ready at the time
the client requests it. In DMLDEMO, the
client starts an asynchhronous transaction when the
user clicks on the "Asynchronous Transaction" menu
item. (under Transactions in the main menu). When the
server receives the request (as an
XTYP_REQUEST transaction), it displays a dialog box
that asks the user how many copies of the window
bitmap the client should display. After the user has
closed the dialog box, the server returns a data
handle containing the number the user selected from its
callback function. The DDEML then sends the client a
XTYP_XACT_COMPLETE to let the client know that the
server is finished with the transaction. The
client then displays the desired number of bitmaps.
In this case, an asynchronous transaction is required
so 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 (via an XTYP_ADVDATA) each time
a certain piece of data has changed. The notification
includes a handle to the changed data. When a hot
advise loop is active in DMLDEMO, the server
notifies the client that the bitmap has changed (this
notification includes a handle to the changed bitmap)
every time the server's bitmap is changed (click on
the server's "Change Bitmap" menu item) . 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. In DMLDEMO, the client brings up a message
box asking the user if the client's window should be
updated with the bitmap from the server. If the user
selected "Yes", then the client requests the data
containing the changed bitmap from the server via the
DdeClientTransaction(...XTYP_REQUEST)
function.


KB ARTICLE:

INF: Sample Application Demonstrates Using DDEML [P_WinSDK]
ID: Q82077 CREATED: 25-MAR-1992 MODIFIED: 10-APR-1992

Summary:

DMLDEMO is a file in the Software/Data Library that demonstrates how
two applications for the Windows environment can communicate using the
Dynamic Data Exchange Management Libraries (DDEML). DMLDEMO
demonstrates the following types of transactions:

- Connect
- Request
- Asynchronous Request
- Hot Advise Loop
- Warm Advise Loop

DMLDEMO can be found in the Software/Data Library by searching on the
word DMLDEMO, the Q number of this article, or S13372. DMLDEMO was
archived using the PKware file-compression utility.

Note: The DMLDEMO file contains code for a client application and for
a server application in separate directories. To preserve the
directory structure, be sure to specify the -d option switch to
PKUNZIP. For example,

pkunzip -d dmldemo

More Information:

The remainder of this article details the five transaction types.

Connect Transaction
-------------------

The client calls the DdeConnect function to connect to the server and
initiate a conversation. In the DMLDEMO application, the DdeConnect
function starts a general conversation, which deals with text and
bitmaps, and a SYSTEM conversation, which supports the system topic.

Request Transaction
-------------------

When the client requires information from the server, the client calls
the DdeClientTransaction function, specifying XTYP_REQUEST as the
value for the uType parameter. The DMLDEMO client uses a request
transaction to retrieve the number and type of bitmaps to display. The
request transaction is used in both synchronous and asynchronous
contexts.

Asynchronous Transaction
------------------------

The client starts an asynchronous transaction with the server to
request information that may not be ready at the time the client makes
the request.

In the DMLDEMO application, the client starts an asynchronous
transaction when the user chooses Asynchronous Transaction from the
Transactions menu. When the server receives the request (as an
XTYP_REQUEST transaction), it displays a dialog box that asks the user
how many copies of the window bitmap the client should display. After
the user dismisses the dialog box, the server returns a data handle
containing the number the user selected from its callback function.
When the server has completed the transaction, the DDEML sends an
XTYP_XACT_COMPLETE to the client application's callback function. The
client then displays the requested number of bitmaps.

In this case, an asynchronous transaction is required to prevent the
transaction from timing 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 transaction)
each time a certain piece of data changes. The notification includes a
handle to the changed data. When a hot advise loop is active in the
DMLDEMO application, the server notifies the client that the bitmap
has changed (this notification includes a handle to the changed
bitmap) every time the server's bitmap is changed. (To change the
bitmap, choose Change Bitmap from the server application's menu.) The
client application then displays the bitmap.

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 the server does not send the changed data to the client. In the
DMLDEMO application, when the client receives a notification from the
server, the client brings up a message box asking the user if the
client's window should be updated with the new bitmap from the server.
If the user chooses the "Yes" button, the client requests the changed
bitmap from the server using the DdeClientTransaction function,
specifying XTYP_REQUEST as the value of the uType parameter.

Additional reference words: 3.00 3.10 softlib DMLDEMO.ZIP




 December 14, 2017  Add comments

Leave a Reply