Blog Posts

9 Posts

ComfyJ 2.7 Release Notes

Posted by Roman Kazmin Sep 18, 2009

New Features and Improvements:

  • Added OleContainer.takeScreenshot() method that allows taking a screenshot of an embedded ActiveX component
  • Added ability to register COM components for a current user only (COM ServerManager)
  • Added ability to get/set properties of a COM object by their DISPIDs, not only by their names (Automation)
  • Added support of IObjectSafety COM interface and wrappers for it
  • Added ability to specify a COM threading model for a Java COM server: -Dteamdev.comfyj.server.threading=[DEFAULT], APARTMENTTHREADED or MULTITHREADED
  • Improved stability of queryInterface() Java COM server method in multithreading environment
  • Changed the signature of IDataObject.getData() method in order to allow fill out parameter properly
  • Added an indication (in UI) that a Java COM server is an OLE component (COM ServerManager)
  • Added OSGI manifest to ComfyJ library
  • Provided the ability to get the HRESULT after execution of the function (Codegen)

 

Resolved Issues:

  • Re-parenting issue in OleContainer component
  • Flickering issues in OleContainer component
  • Focus handling issues in OleContainer component
  • NPE in the OleContainer.destroyObject() method
  • Issue in IDispatchServer class with dispatching methods that have SafeArray parameters, which contain a structure type
  • Problem with passing null BSTRs values through VARIANT byref
  • Corrected INTERFACE_IDENTIFIER constant (IID) of IDataObject interface
  • Issue in the code generation for WMP11 Type library (Codegen)
  • Issue with not determining the presence of installed JDK 1.6 and thus "Compilation", "JAR" and "JavaDoc" options were disabled (Codegen)
  • Problem with generation of parameters for Pointer to Pointer types, such as LPWSTR* (Codegen)
  • Problem with generation of wrappers for "linked" structures(Codegen)
  • NPE in Codegen when it tries to find tools.jar library (Codegen)
  • Problem with starting application when there is no JDK installed on a PC (Codegen)
  • Added using of Wnd class instead of Int32 type in generated Java COM wrappers where it's necessary (Codegen)

 

Documentation:

  • Updated Programmer's Guide
0 Comments Permalink

ComfyJ 2.6 Release Notes

Posted by Roman Kazmin Mar 31, 2009

Improvements:

  • CodeGen for ComfyJ now generates the Java COM wrappers with JavaDoc which are taken directly from a TLB library
  • Added ability to selectively handle incoming and outgoing COM messages while waiting for responses from synchronous calls (out-of-proc COM servers)

 

Fixes:

  • Fixed the visual issue in OleContainer introduced with ComfyJ-2.5.1
0 Comments Permalink

Improvements:

  • Added support for Running Object Table (ROT) and IMarshall-related functions
  • Codegen for ComfyJ does not require JAVA_HOME environment variable now

 

Fixes:

  • Fixed fond issue with using BStr values in SafeArray
  • Fixed crash issue in ComfyJ Demo while running on JVM 1.6
  • Fixed the issue with OLE control re-opening in the OleContainer that leads to JVM crash
  • Fixed the problem in OleContainer, used to appear during opening/saving OLE documents
  • Fixed the memory leak that appears when manually releasing SafeArrays

 

Documentation:

  • Added information about using ComfyJ in Java Web Start (JWS) Applications
0 Comments Permalink

New Features:

  • Added processing of the [optional] flag in the parameter specification in Codegen for ComfyJ application.
  • Added new wrappers (in ComFunctions class) for RegisterActiveObject and RevokeActiveObject methods.
  • Added a new sample that demonstrates integration with MS Richedit text control.
  • Added the debug mode to ComfyJ and particularly to IUnknownImpl class. The purpose of this mode is simply to keep stack trace of a Java COM wrapper. And if any error occurs during the release of this object we can print that stack trace. It can point out to the object which can be released incorrectly. This mode can be extremely useful for example in case if we got Access Violation error (Exception c0000005, at ...) which may occur when NativeResourceCollector tries to release already released Java COM wrappers. To enable this debug mode use -DdebugComfyJ=true parameter.
  • Added the ability to OleCotnainer for handling keyboard events of embedded objects.

 

Improvements:

  • Added MshCtx enumeration, wrapper for MSHCTX  type.
  • Added MshlFlags MshCtx enumeration, wrapper for MSHLFLAGS type.
  • Added new helper methods that allow invoking of COM methods with one or more parameter without using Java arrays.
  • Added a new option to IDispatchServer class, which can specify whether to use case sensitive or case-insensitive comparison of method names.
  • Added a new optional timeout parameter (to Java COM server support) which can specify the period that host JVM will wait after last instance of Java COM server is destroyed.
  • Added the ability to specify the default COM interface of a Java COM server.
  • Changed the SafeArray to be resizable and re-creatable.
  • Improved performance of values setting in multi-dimensial SafeArray (now in several times faster).

 

Fixes:

  • Fixed the java.lang.OutOfMemoryError exception that occurred when trying to generate stubs.
  • Fixed the problem with BStr parameters that did not work correctly in VTBLs.
  • Fixed a memory leak in OleContainer when various listeners remained in memory.
  • Fixes in IStream* classes. The IStream inherits ISequentialStream now, but not IUnknown as it was before. Also, added the corresponding ISequentialStream* classes.
  • Fixed the naming of OleFunctions.marshallInterfaceToStream and OleFunctions.unmarshallInterfaceFromStream function wrappers. Also, added checking of HResult after function call.
  • Added .release() to the reserved names to fix the problem with name clashing.
  • Fixed the problem with incorrect order of VTBL methods for some interfaces.
  • Fixed the problem OleContainer when embedded OLE object "steals" focus input of a parent window in first appearance.
  • Fixed the problem in IDispathServer with invocation of methods which contain COM objects in parameters.
  • Fixed the problem in implementation of ISequentialStream.read() method in the ISequentialStreamImpl and ISequentialStreamVTBL classes.
  • Fixed the problem in Variant.getVariantType() method when it does not determine correctly the VarType of successors from IDispatchImpl class or classes that implement IDispatch.
  • Fixed the problem with getting the currency (VT_CY) value from Variant.
  • Fixed the problem in the Automation.invokeDispatch() method with releasing of Automation object after method invocation.
  • Fixed the problem in BStr class when BStr is created using BStr(String value, int size) constructor.
  • Fixed the problem when Automation fails with DISP_E_UNKNOWNNAME exception when invoke the methods of VB COM object.
  • Fixed the "invalid window handle" problem when disposing of OleContainer which is embedded in JDialog.
  • Fixed generation of enumerations for names that contain whitespaces.
  • Fixed the issue with focus in AbstractOleControl class.
  • Fixed the issue with incorrect marshaling of VB empty arrays.
  • Fixed the issue with incorrect marshaling of SafeArrays stored in Variant variables.
  • Fixed the problem with registering of all Java COM classes that extend AbstractOleControl class.
0 Comments Permalink

Changes since version 2.3:

  • Added the CodegenForComfyJ plug-in for Eclipse.
  • Added the DllClassFactory class that allows obtaining an IClassFactory object directly from the type library file (DLL) without registering it in the system.

Improvements:

  • Improved performance of the Automation function calls (almost by two times).
  • Improved the Deciamal class: added the ability to create a Decimal object from a Java double value and convert a Decimal value to a double value respectively.
  • Added to ComfyJ Programmer's Guide step-by-step instructions guiding through the creation of Java COM wrappers from a COM Type Library.

Fixes:

  • Fixed the problem with returning out parameters from Java COM callbacks.
  • Fixed the problem with releasing all unused objects in the OleContainer.destroyObject() method.
  • Fixed a deadlock problem that occurs while adding/removing an OleContainer object to/from a container.
  • Fixed the problem in the Automation.invoke() method: now it correctly reverses the order of parameters for a dispinterface.
  • Fixed the Automation.invokeDispatch() method which did not cast the resulting value to some types, for instance, to ComEnumeration type.
  • Fixed a focus handling problem in the OleContainer class.
  • Fixed an access violation problem in the OleContainer class that appeared in JDK 1.4.2_12 and later.
  • Fixed the IUnknownImpl.release() method related to disposing of a COM object in a stopped OleMessageLoop thread.
  • Fixed implementation of the IUnknown.hashCode() method.
  • Fixed the problem in the SafeArray class: externally allocated SafeArray's are correctly freed now.
  • Fixed the problem in the BStr class: externally allocated BString's are correctly freed now.
  • Updated JavaDoc for ComToJava functionality.

Bug fixes in the CodegenForComfyJ:

Important note: In ComfyJ 2.3, there was a problem (incorrect reverse of parameters for wrappers to dispinterfaces) in code generation. So if you created Java wrappers for dispinterfaces using that version, we recommend you to re-generate them anew. Otherwise, they will not work correctly with ComfyJ 2.4. We are sorry for inconvenience.

  • Fixed generation of wrappers for pure dispinterfaces: the order of parameters is not reversed.
  • Fixed a naming issue for property getters/setters whose names may clash with existing methods of COM interfaces.
  • Fixed the problem with generation of wrong method names for Java COM event servers.
  • Fixed the problem when stubs were not generated properly for some types, like Pointer.Void[] /*[in,out]*/ or Int16[] /*[in,out]*/.
  • Fixed the problem when an incorrect wrapper was generated when a method of a COM interface expected a pointer to a primitive type (for example, in/out type* value).
  • Fixed several issues in the plug-in for IDEA.
0 Comments Permalink
Changes since version 2.2:
  • Added complete support of 64-bit Windows, which enables Java applications (running in 64-bit mode) to work with 64-bit COM and also to create and register 64-bit Java COM servers.
  • Added new Java and VB examples that demonstrate how to listen to events of a Java COM server in a native (VB) client.
  • Added new GUID.string2GUID method that allows to convert a string presentation of a GUID to the real GUID type.

Fixes:

  • Codegen: fixed the problem with wrappers generation in 64-bit mode.
  • Codegen: fixed code generation problem for Adobe InDesign Type Library.
  • Fixed incorrect IllegalStateException in IDispatchServer class when one of a COM callback parameters is NULL pointer to IUnknown interface.
  • Fixed problem in Variant class when working with ComEnumeration parameters.
  • Fixed the problem that caused CO_E_RELEASED COM exception in Java COM servers.
0 Comments Permalink
Changes since version 2.1:
  • Added IntelliJ IDEA plugin for ComfyJ Code Generator application.
  • CodeGen: Added processing of optional flag in the parameter specification.
  • IClassFactoryServer now searches for VTBL classes in classloaders for the interface and callback implementation class.
  • A proxy that is created by OleMessageLoop.bindObject(IUnknown) now provides full stack trace.
  • Added ability to handle user input in Yes/No/Cancel dialog in OleContainer.save(java.io.File) method if file already exists.
  • Added AddedAbstractOleControl class, which is the base implementation of OLE control. Also, SimpleSwingActiveX sample added demonstrating the usage of this new class.

Fixes:

  • Fixed the problem with reading BStr using Automation.
  • Fixed the problem with incorrect releasing Java COM objects of the same type.
  • Fixed the Java COM Server method returning SafeArray failure after aprox. 100 calls from client.
  • Fixed memory leaks when using PowerPoint in the OleContainer.
  • Fixed IllegalArgumentException when COM-to-Java method returns Variant.
  • Fixed failures reading BStr as return value of IDispatchServer.invoke() method.
  • CodeGen: Fixed wrong method name generation for event servers.
  • CodeGen: Fixed wrong method call generated for the methods accepting SafeArray* as [in] parameters.
  • CodeGen: Fixed the problem with generation of structures by ComfyJ generator.
  • CodeGen: Fixed javadoc generation.
  • CodeGen: Fixed the problem with CodeGen failing with no JDK installed, but only JRE.
  • Samples: Added LicensedActiveX component sample.
  • Samples: Added getSafeArray() method to all COM-to-Java samples.
  • Samples: Fixed Word Sample throwing ComException when trying to open a document second time.
  • Documentation: Updated documentation with more details about stubs generation and OleMessageLoop usage.
  • Documentation: Other minor documentation fixes and updates.

Known Issues:

  • In this version of ComfyJ, on 64 bit Windows XP, it is not possible to register Java COM servers using Server Manager application as 64-bit COM Servers. 32-bit mode works well as before. It is also possible to work with 64 bit COM objects in usual way. We are actively working on the issue and will try to fix it as soon as possible.
0 Comments Permalink
Changes since version 2.0:
  • ServerManager: Added the ability to specify some JVM settings individually for each JavaCOM server and for the shared JVM.
  • CodeGen: Added the ability to compile the generated sources.
  • CodeGen: Added the ability to JAR the compiled classes.
  • Documentation: Added information on how to create and register an application JAR file without the need to add all used JAR files into the class path.

Fixes:

  • Fixed the "java.lang.IllegalArgumentException: argument type mismatch" exception occurring when a COM callback method has the Date parameter.
  • Fixed the memory leak problem in the BStr class and incorrect value setting in the BStr.setValue() method.
  • Fixed the problem with returning SafeArray parameter from a JavaCOM object (incorrect type of return value).
  • Fixed the problem with host (shared) JVM failing to load JavaCOM classes with different class paths.
  • Fixed the problem with using BStr in SafeArray.
  • Fixed sporadic Access Violations during code generation in the CodeGen application.
0 Comments Permalink
New Features:
  • Added functionality for creating and registering Java COM servers.
  • Added the ServerManager tool for registering and managing Java COM servers.
  • Support for the IClassFactory2 COM interface.
  • New documentation for the ComfyJ library.
  • Added the ComfyJDemo application demonstrating ComfyJ's capability to integrate ActiveX controls into Java Swing applications and to interact with them using the Automation technology.
  • Added a new constructor to IUknownImpl that takes a Pointer.Void as a parameter for convenience.
  • New samples for the ComfyJ library.

Improvements:

  • Improved the Code Generation application, namely added the ability to generate Java wrappers for a type library as well as for a COM component.
  • Improved stability of the Variant and BStr classes.
  • Resolved several memory management issues in NativeResourceCollector.
  • Registration of a run-time COM server's interfaces is not required any more. Now IClassFactory automatically registers all interfaces implemented by the server class.

Fixed Bugs:

  • Fixed the problem with setting a BStr value in multi-dimensional SafeArrays.
  • Fixed the problem with reassigning a value in the BStr object.
  • Fixed the problem with showing modal OCX windows in OleContainer.
  • Fixed the problem with focus events in OleContainer.
  • Fixed the problem with processing keyboard events in OleContainer.
  • Fixed the Access violation problems in NativeResourceCollector.
  • Fixed the problem in SafeArray.release() method. It did not work when its AutoDelete property was set to false.
  • The Automation.release() method is deprecated since it is not necessary and confusing.
  • Removed the stack trace printing in the OleContainer.insertObject(IOleObject object) method if an object does not support the IPersistStorage interface.
  • Fixed the problem with reading a UInt value from Variant.
  • Fixed the problem with reading SafeArray (byRef) from Variant using the Varinat.getValue() method.
  • Fixed the memory leak problem when Variant contains a BStr.
  • Fixed the problem with releasing memory in theBStr class.
  • Fixed the problem with calling a dispatch method in IDispatchServer, whose DispID is 0.
  • Codegen: Added exception messages with clear error descriptions.
  • Codegen: Added a new option for handling non-labelled parameters in the Code Generation application.
  • Codegen: Fixed "FunctionExecutionException: c0000005" that occurs during Java wrappers generation .
  • Codegen: Fixed "Access violation: attempting to read memory at address 0000000A" that occurs during Java wrappers generation.
  • Codegen: Fixed the problem with generating CoClasses that have no default interface.
  • Codegen: Fixed various minor bugs.
0 Comments Permalink