FIX: Unhandled exception when hosting Java Beans as ActiveX controls (223363)



The information in this article applies to:

  • Microsoft Visual J++ 6.0
  • Microsoft SDK for Java 3.1
  • Microsoft 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

MORE INFORMATION

Steps to Reproduce Behavior

  1. 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/
  2. Open a new Visual J++ 6.0 Windows Application project.
  3. Customize the toolbox (right-click) and add the newly-registered control to the toolbox (ActiveX tab).
  4. Select the new control from the toolbox and add it to the form.
  5. 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.
  6. Run the application in the debugger [F5].
  7. 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.

REFERENCES

For support information about Visual J++ and the SDK for Java, visit the following Microsoft Web site:

Modification Type:MajorLast Reviewed:6/14/2006
Keywords:kbBug kbfix kbVS600sp3fix KB223363 kbAudDeveloper