Unfortunately, that is not really the 'whole story'.
 
VB DLLs are not just ordinary Windows DLLs ( dynamicly
bound executables ), but rather COM based objects wrapped
in a DLL package.  Their functionallity is only accessable via
a COM Client.
 
As suggest, a C based wrapper could interface between the
java client and the VB COM DLL, but the C wrapper would
need some extra coding, to become a proper COM based
client to the VB DLL, and the VB DLL would need to be
registered on the machine it was used on (which is no
trick, because all VB based COM DLLs support self
registration).
 
-aa-
-----Original Message-----
From: Janco Tanis <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, January 06, 2000 1:29 AM
Subject: Re: JNI Question

 
Hi Reeta,

If you have a 3rd party dll you have to write a wrapper for it.
What you have to do is to model the vb dll functionality with a java class like:

public class VbDllWrapper {
   public native String stringFunc( String s ) ;
   public native void simpleProcFunc( ) ;
   static {
      // Load the library
      System.loadLibrary( "VbDllWrapper.dll" );
   }
}

Compile this class and use javah to generate a C header file. This header file shows you how to implement the wrapper dll in C. This wrapper can acces your VB dll methods.

If you have the source of the VB dll you can code the additional methods in the dll itself.

regards,
janco

Reeta Mittal wrote:

Hello,

It can a be a very premilinary question.
I have a VB dll. Now I want to use this in Java. How can I do this ?

Thanx and Regards,
Reeta
 
 

------------------------------------------------------------
      COAS, Your partner in computer aided services

   Nijverheidsweg 34        Tel:   +31 (0) 187 49 3222
   Postbus 44               Fax:   +31 (0) 187 49 2912
   3250 AA Stellendam       Email: [EMAIL PROTECTED]
 

Reply via email to