FIX: Unhandled Exception When Hosting Java Beans as ActiveX Controls
ID: Q223363
|
The information in this article applies to:
-
Microsoft Visual J++, version 6.0
-
Microsoft SDK for Java, version 3.1
-
Microsoft virtual machine
SYMPTOMS
Java Beans registered as ActiveX controls might cause a memory fault when exiting if the hosting application/window is a WFC-based Form.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article.
This bug was corrected in Visual Studio 6.0 Service Pack 3.
For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:
Q194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why
Q194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed
MORE INFORMATION
Steps to Reproduce Behavior
- Register a Java AWT-based Bean Widget as an ActiveX control using javareg:
javareg /register /control /class:ClassName /codebase:PathToClassFile /typelib:NameOfTypeLibraryFile.tlb
(See the SDK For Java documentation for more information on the javareg tool.)
- Open a new Visual J++ 6.0 Windows Application project.
- Customize the toolbox (right-click) and add the newly-registered control to the toolbox (ActiveX tab).
- Select the new control from the toolbox and add it to the form.
- View the code of the WFC Form. After the initForm() call, set the text or title of the Bean/Control with a call to setText/Title.
- Run the application in the debugger [F5].
- Close the Form by clicking on the [x] in the upper-right corner of the window.
Results:
An error dialog will pop up with a memory access violation message.
© Microsoft Corporation 1999, All Rights Reserved.
Contributions by Robert LaCasse, Microsoft Corporation
REFERENCES
For the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java,
please see the following pages on the Microsoft Technical Support site:
http://support.microsoft.com/support/visualj/
http://support.microsoft.com/support/java/
Additional query words:
Keywords : kbservicepack kbJavaVM kbVJ600bug kbVS600sp2 kbVS600SP1 kbVS600sp3fix kbSDKJava310bug
Version : WINDOWS:3.1,6.0
Platform : WINDOWS
Issue type : kbbug