FIX: GPF/UAE When Closing DDE Application from the Task ListLast reviewed: October 30, 1997Article ID: Q94166 |
2.00
WINDOWS
kbinterop kbprg kbbuglist
The information in this article applies to: - Microsoft Visual Basic programming system for Windows, version 2.0 SYMPTOMS =======+ A General Protection (GP) fault or an Unrecoverable Application Error (UAE) occurs under the following conditions: - A Visual Basic application is actively communicating via a Dynamic Data Exchange (DDE) link- The Visual Basic application is acting as the destination (or client) in the DDE conversation.- You close the application by choosing End Task from the Windows task list while the DDE link is still active. WORKAROUNDTo work around the problem, ensure that the DDE conversion terminates before the Visual Basic application terminates by setting the LinkMode property to zero in an event other than the Unload or QueryUnload events for Form1. To do this, you need to enable a timer within the Form_Unload (or Form_QueryUnload) event. Within the Timer event, set the LinkMode property to zero to terminate the DDE conversation.
STATUSMicrosoft has confirmed this to be a problem in Microsoft Visual Basic version 2.0 for Windows. This problem was corrected in Microsoft Visual Basic version 3.0 for Windows.
MORE INFORMATIONThe following steps reproduce this problem:
To summarize, you can avoid the entire problem by inserting the following steps (4a - 4c) after step 4 shown above. Then redo steps 1 through 11. 4a. Add a timer control (Timer1) to Form1 4b. Add the following code to the Form_Unload event of Form1:
Sub Form_Unload (Cancel As Integer) 'Cause the DDE conversation to terminate from within the Timer 'event Timer1.Interval = 1 Timer1.Enabled = True 'Allow the timer event to occur DoEvents End Sub4c. Add the following code to the Timer1_Timer event:
Sub Timer1_Timer () 'Terminate the DDE conversation Text1.LinkMode = 0 'Timer has served its purpose, so disable it. Timer1.Enabled = False End Sub |
Additional reference words: buglist2.00 fixlist3.00 1.00 2.00 3.00 GPF
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |