Symptoms
If the Terminate event of a GlobalMultiUse class calls a procedure inanother DLL, and if the same GlobalMultiUse class had previously called thesame DLL, then you receive an error and the IDE may crash.
With Visual Basic 5.0, you may receive one of the following errors:
Exception: privileged instruction (0xc0000096), Address: 0×00186a3a
-or-
VB5 caused an invalid page fault (or general page fault)
With Visual Basic 6.0, the IDE does not crash, but you may receive thefollowing error:
Run-time error ‘-2147418105 (80010007)’:
Automation error
This error translates to:
“The callee (server [not server application]) is not available and
disappeared; all connections are invalid. The call may have executed.”
Resolution
This problem can occur when the ActiveX components are not shut down in thenecessary order when your client application ends. For example, supposeyour client application uses two ActiveX DLLs (DLL1 and DLL2). If theTerminate event of a class in DLL2 calls a procedure in DLL1, but DLL1 hasbeen shut down before DLL2, you can experience this problem because theprocedure in DLL1 is unavailable. The “Steps to Reproduce Behavior” sectionof this article demonstrates this scenario and shows how to work around theproblem by controlling the order in which the two DLLs shut down.