6 messages in net.java.dev.jna.usersRe: [jna-users] Re: Problem with JNA ...
FromSent OnAttachments
Kay WAug 20, 2007 11:19 am 
Kay WAug 21, 2007 8:23 am 
Wayne MeissnerAug 22, 2007 9:30 pm 
Kay WAug 23, 2007 6:37 am 
Timothy WallAug 27, 2007 12:30 pm 
Timothy WallAug 27, 2007 12:51 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] Re: Problem with JNA to access vb DLLActions...
From:Timothy Wall (twal@dev.java.net)
Date:Aug 27, 2007 12:51:16 pm
List:net.java.dev.jna.users

The symbol exported by the DLL is probably "Connect@16", not "Connect". If you pass an instance of StdCallFunctionMapper (StdCallLibrary.FUNCTION_MAPPER) to your library init options, that should fix the link error, e.g.

Map options = new HashMap(); options.put(Library.OPTION_FUNCTION_MAPPER, StdCallLibrary.FUNCTION_MAPPER); MyLib lib = (MyLib)Native.loadLibrary("mylib", MyLib.class, options);

On Aug 21, 2007, at 11:24 AM, Kay W wrote:

I was able to solve my initial problem by making the INSTANCE variable static.

However, I have encountered a new problem (this is the same exception I ran into while attempting a JNI implementation). Any assistance would be helpful!

Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot locate function 'Connect' at com.sun.jna.NativeLibrary.getFunctionAddress (NativeLibrary.java:191) at com.sun.jna.Function.<init>(Function.java:103) at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java: 178) at com.sun.jna.Library$Handler.invoke(Library.java:140) at $Proxy0.Connect(Unknown Source) at rda2.rda2.main(rda2.java:24)

Thanks!

born2Java

_________________________________________________________________ See what you’re getting into before you go there http://newlivehotmail.com/? ocid=TXT_TAGHM_migration_HM_viral_preview_0507