The information in this article applies to:
SYMPTOMSUnder Windows NT, when deleting a Visual Basic 5.0 or Visual Basic 6.0 UserControl sited in the ActiveX Control Test Container, the following Application Error might occur:
CAUSEThis is caused by an errant WM_SETCURSOR message, which is sent after the DELETE key has been pressed to remove the control from the container. The code for the ActiveX Control Test Container (TSTCON32.EXE) does not check for a valid object before attempting to obtain a specific interface. RESOLUTIONThe source code for the ActiveX Control Test Container is located on the Visual Studio 6.0 MSDN CD in the "Samples\VC98\mfc\ole\tstcon" directory. The bug can be corrected by modifying the tcitem.cpp. Replace the HitTest method with the code below and recompile the tstcon project:
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. MORE INFORMATIONThe problem is caused by the following code segment, which is called after the object has been deleted and m_lpObject has been set to NULL:
Place the following code segment just prior to this QueryInterface method call to check whether m_lpObject is NULL, avoiding the problem:
Steps to Reproduce Behavior
The error message described in the symptoms section above should appear. Additional query words:
Keywords : kbActiveX kbContainer kbGrpVB kbDSupport |
Last Reviewed: August 16, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |