Hi,
I'm using com4j to use a COM dll written in C# from java. Using the COM
interface in the main method of a java application works. If I'm using
the same com4j methods in an eclipse plugin the following exception in
the native C++ code of the com4j dll occurs: "80040154 CoCreateInstance
failed : Class not registered" (com4j.cpp line 135).
What I have tryed so far:
Using the C# COM interface in a java main class using com4j->works
Using other existing COM interfaces written in C++ via com4j in an
eclipse plugin->works
Placing the dll that implements the COM interface in the root path of
the plugin-> does not work
Using Bundle-NativeCode in the manifest to include the com4j and COM
interface dll-> does not work
I have also tryed another java<->com bridge JACOB that showed the same
behaviour. Works in a java main but not in an eclipse plugin.
Why does it work in a java application but not in an eclipse plugin?
What is the differences using jni in a java application and in an
eclipse plugin? Why does the com4j native code finds the COM interface
in the registry and the eclipse plugin does not?
Thanks a lot for your help!