PRB: Catastrophic Failure Error Using an ActiveX Control (189065)
The information in this article applies to:
- Microsoft virtual machine
- Microsoft SDK for Java 2.0
- Microsoft SDK for Java 2.01
- Microsoft SDK for Java 2.02
- Microsoft SDK for Java 3.0
- Microsoft SDK for Java 3.1
- Microsoft SDK for Java 3.2
- Microsoft Visual J++ 1.0
- Microsoft Visual J++ 1.1
This article was previously published under Q189065 SYMPTOMS
When trying to use a Visual C++ generated ActiveX Control from Java, you
will see the following error when trying to run the Java application:
Error:<0x8000ffff> Catastrophic failure
Press any key to continue...
RESOLUTION
When trying to use an ActiveX Control as an automation server, you need to
override the method IsInvokeAllowed. For more information on why this
method has to be overridden, please see the REFERENCES section below.
To fix the problem, override IsInvokeAllowed in your ActiveX Control as
follows:
BOOL CMyOleControl::IsInvokeAllowed (DISPID)
{
// You can check to see if COleControl::m_bInitialized is FALSE
// in your automation functions to limit access.
return TRUE;
}
For the example case given below, you will override this method in the
Circ3ctl.cpp file and declare this virtual function in the Cir3ctl.h file.
Also make sure you rebuild and re-register the control before using it from
Java.
STATUS
This behavior is by design.
REFERENCES
For more information on how to use an ActiveX Control as an Automation
Server, please see the following article in the Microsoft Knowledge
Base:
146120 HOWTO: Use an OLE Control as an Automation Server
For more information on how to use the new Jvc.exe with Visual J++, please
see the following article in the Microsoft Knowledge Base:
183712 HOWTO: Installation Instructions for SDK for Java
Modification Type: | Minor | Last Reviewed: | 7/13/2004 |
---|
Keywords: | kbprb KB189065 |
---|
|