PRB: DDEML Does Not Synchronize CBR_BLOCK'd Data

ID: Q216317


The information in this article applies to:


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:


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 

Last Reviewed: July 2, 1999