aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes VB ActiveX DLL and Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "VB ActiveX DLL and Java" Watch "VB ActiveX DLL and Java" New topic
Author

VB ActiveX DLL and Java

somin bhuvan
Greenhorn

Joined: Jun 01, 2005
Posts: 22
Is it possible to call VB ActiveX DLL Function from Java. If yes, how to do that. could you please explain in steps; that will be grateful.

Regards
Bhuvanesh
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42608
    
  65
Is this question any different from this one?

The generic way to call DLLs is to use JNI. There are libraries that make this easier if it's a COM DLL, e.g. Jacob. I'm not sure if the process is any different for VB DLLs than it is for C/C++ DLLs.
[ May 22, 2006: Message edited by: Ulf Dittmer ]

Ping & DNS - my free Android networking tools app
somin bhuvan
Greenhorn

Joined: Jun 01, 2005
Posts: 22
Am trying to call VB ActiveX DLL Function thru JNI. The steps which i done so far:-
1) Written the Java Class to load DLL using System.loadLibrary or System.load method
2) Written the Simple VB Function and build into dll

Till this when i tried to call the function, am getting UnsatisfiedLinkedError.

After this by reading some websites i came to know tat VB Function can be called via VC++ DLL.
3) Wrote VC++ DLL and made a dll build.

The above steps can be seen in the below link
http://forum.java.sun.com/thread.jspa?threadID=348424&messageID=3016546#3016546

After this too am still getting runtime error (UnsatisfiedLinkedError)

Could you please provide some alternate Solutions.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42608
    
  65
The solution is not to find an alternate solution - the solution is to fix the problem which prevents this from working. This page may be helpful in that regard.
somin bhuvan
Greenhorn

Joined: Jun 01, 2005
Posts: 22
I read the document given in the below link

http://www.inonit.com/cygwin/jni/helloWorld/load.html

But the same steps which given here will be applicable for calling VB ActiveX DLL methods too. In C/C++, the native methods are implemented but how come we are going to implement the native method in VB ActiveX DLL. Could you clarify this doubt.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: VB ActiveX DLL and Java