|
Advise Transaction
A client application can use the DDEML to establish one or more links to items
in a server application. When such a link has been established, the server
sends periodic updates about the linked item to the client (typically, whenever
the value of the item associated with the server application changes). Linking
establishes an advise loop between the two applications that remains in place
until the client ends it.
There are two kinds of advise loops: "hot" and "warm." In a hot advise loop,
the server immediately sends a data handle that identifies the changed value. In
a warm advise loop, the server notifies the client that the value of the item
has changed but does not send the data handle until the client requests it.
A client can request a hot advise loop with a server by specifying the XTYP_ADVSTART transaction type in a call to DdeClientTransaction. To request a warm advise loop, the client must combine the XTYPF_NODATA flag
with the XTYP_ADVSTART transaction type. In either event, the DDEML passes the
XTYP_ADVSTART transaction to the server's DDE callback function. The server's
DDE callback function should examine the parameters that accompany the
XTYP_ADVSTART transaction (including the requested format, topic name, and item name)
and then return TRUE to allow the advise loop or FALSE to deny it.
After an advise loop has been established, the server application should call
the DdePostAdvise function whenever the value of the item associated with the requested item
name changes. This call results in an XTYP_ADVREQ transaction being sent to the server's own DDE callback function. The
server's DDE callback function should return a data handle that identifies the new
value of the data item. The DDEML then notifies the client that the specified item
has changed by sending the XTYP_ADVDATA transaction to the client's DDE callback function.
If the client requested a hot advise loop, the DDEML passes the data handle
for the changed item to the client during the XTYP_ADVDATA transaction.
Otherwise, the client can send an XTYP_REQUEST transaction to obtain the data handle.
It is possible for a server to send updates faster than a client can process
the new data. The speed of updates can be a problem for a client that must
perform lengthy processing operations on the data. In this case, the client should
specify the XTYPF_ACKREQ flag when it requests an advise loop. This flag causes
the server to wait for the client to acknowledge that it has received and
processed a data item before the server sends the next data item. Advise loops that
are established with the XTYPF_ACKREQ flag are more robust with fast servers
but may occasionally miss updates. Advise loops established without the
XTYPF_ACKREQ flag are guaranteed not to miss updates as long as the client keeps up with
the server.
A client can end an advise loop by specifying the XTYP_ADVSTOP transaction type in a call to DdeClientTransaction.
If a server does not support advise loops, it should specify the
CBF_FAIL_ADVISES filter flag in the DdeInitialize function. This flag prevents the DDEML from sending the XTYP_ADVSTART and XTYP_ADVSTOP transactions to the server.
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|