Microsoft KB Archive/223363

= FIX: Unhandled exception when hosting Java Beans as ActiveX controls =

Article ID: 223363

Article Last Modified on 6/14/2006

-

APPLIES TO


 * Microsoft Visual J++ 6.0 Standard Edition
 * Microsoft Software Development Kit for Java 3.1
 * Microsoft Java Virtual Machine

-



This article was previously published under Q223363



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 that this is a bug in the Microsoft products that are listed in the "Applies to" section.

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:

194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed



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. For more information, visit the following Microsoft Web site:http://www.microsoft.com/mscorp/java/  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].</li> 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.</li></ol>

<div class="references_section">