PRB: DDEML Does Not Synchronize CBR_BLOCK'd Data
ID: Q216317
|
The information in this article applies to:
-
Microsoft Win32 Software Development Kit (SDK)
SYMPTOMS
When multiple DDEML clients are connected to one DDEML server on the same service/topic/item, data generated to fill an XTYP_REQUEST from one client may be returned to another client.
CAUSE
The DDEML server must gather data in a lengthy process, and the data gathering must occur in the sequence it is requested.
The DDEML server returns CBR_BLOCK in response to an initial XTYP_REQUEST. DDEML creates a queue to hold this request and subsequent transactions on this conversation. Meanwhile, if another client sends an XTYP_REQUEST on the same service/topic/item, the server returns CBR_BLOCK as well, and DDEML creates another queue to hold outstanding transactions on the conversation associated with the second client.
When the data is ready, the server application calls DdeEnableCallback( idInst, NULL, ENABLE_ALL ), which permits the outstanding requests to enter the server's DDEML callback function again. There is no guarantee that the first client to make the XTYP_REQUEST will be matched with the first data the server returns.
RESOLUTION
If returned data is dependent on the order requests arrive, the server application must use a mechanism other than returning CBR_BLOCK. Once the DDEML server returns from its callback function, it relinquishes control of the transaction.
There are two possible workarounds for this issue:
- Modify the server so that it uses DDE messages instead of DDEML. The server then has full control over the timeliness and sequence of its responses. DDEML clients should still be compatible with this server, so this approach is desirable when many clients are already installed.
-or-
- Modify the clients to use one-time advise loops. This option is preferable if the server is difficult to modify and few clients exist.
STATUS
This behavior is by design.
MORE INFORMATION
For additional information about one-time advise loops, please see the following
article in the Microsoft Knowledge Base:
Q102584 Returning CBR_BLOCK from DDEML Transactions
Additional query words:
Keywords : kbDDE kbWinOS kbGrpPlatform
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbprb