com4J on Win64 connecting to a Win32 application

309 Views Asked by At

I have a 3rd-party Windows application that is 32-bit; it provides typelibs so I can connect to it from VBS, but only using the WScript.exe from %WINDIR%\SysWOW64.

I can generate the Java classes to access the COM objects with tlbimp.jar without any error, but when I run a program that uses these classes, I get

80040154 CoCreateInstance failed : Klasse nicht registriert : .\com4j.cpp:153

("Klasse nicht registriert" translates to "Class not registered").

Running the test sample from the com4J homepage (that one connecting to WSH) works fine.

Getting a 64-bit version of the 3rd-party application is not possible (at least not within the given timeframe).

I am using Java 8 64-bit from Oracle on Win7/64-bit for this task.

Is there any chance to get this running?

0

There are 0 best solutions below