DDE Conversation Can Cause Error Message: DDE Channel Locked (95462)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition for Windows 2.0
- Microsoft Visual Basic Standard Edition for Windows 3.0
- Microsoft Visual Basic Professional Edition for Windows 2.0
- Microsoft Visual Basic Professional Edition for Windows 3.0
- Microsoft Visual Basic Standard Edition for Windows 1.0
This article was previously published under Q95462 SUMMARY
The error message "DDE channel locked" indicates that an attempt is being
made to open a DDE conversation between two objects that are already
engaged in a conversation. However, usually the error message occurs in a
Visual Basic application as a result of a non-Visual Basic DDE Server
application failing to post or send a DDE message Visual Basic is
expecting.
The best overall solution is to alter the DDE server application so that it
correctly sends the appropriate DDE messages.
Both "DDE channel locked" and "Timeout while waiting for DDE response" are
errors that can be trapped in Visual Basic, so you can work around the
problem by performing the following steps: - Turn on error trapping. For example:
On Local Error GoTo DDEerrhand:
- In your error handling routine, trap error #284 ("DDE channel locked")
and set the LinkTimeout property to 1. This triggers the error message
"Timeout while waiting for DDE response" much quicker.
- Also, in your error handling routine trap error #286 ("Timeout while
waiting for DDE response"), reset the LinkTimeout value, re-establish
the link, and execute a RESUME statement, as in this example:
DDEerrhand:
Select Case Err
Case 284:
OldLinkMode = Text1.LinkMode
OldTimeout = Text1.LinkTimeout
Text1.LinkTimeout = 1
Resume
Case 286:
Text1.LinkTimeout = OldTimeout
Text1.LinkMode = 0
Text1.LinkMode = OldLinkMode
Resume
End Select
Modification Type: | Major | Last Reviewed: | 12/12/2003 |
---|
Keywords: | KB95462 |
---|
|