PRB: Run-Time Error After an ActiveX Server Crashes (189949)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q189949 SYMPTOMS
If an ActiveX Server (EXE) object is instantiated in a Visual Basic client
application, and the ActiveX server crashes, Visual Basic 5.0 and Visual
Basic 6.0 will return the following error messages, respectively, every
time the server object is subsequently referenced:
Run-time Error '-2147023174 (800706ba)':
Automation Error
Run-time Error '462':
The remote server machine does not exist or is unavailable
This includes attempts to use the keyword New or CreateObject to restart
the server.
CAUSE
After the ActiveX server crashes, Visual Basic attempts to re-establish a
connection to the server and the above error is triggered.
RESOLUTION
For Visual Basic 6.0, if you modify the code in step 4 of the "Create the Client" steps below, the error does not occur:
Private Sub Command1_Click()
On Error GoTo ErrHand
Set clsTest = New Class1
clsTest.Test
Exit Sub
ErrHand:
Set clsTest = Nothing
Resume
End Sub
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 5/8/2003 |
---|
Keywords: | kbprb KB189949 |
---|
|