

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
6 messages in net.java.dev.jna.usersProblem with JNA to access vb DLL| From | Sent On | Attachments |
|---|---|---|
| Kay W | Aug 20, 2007 11:19 am | |
| Kay W | Aug 21, 2007 8:23 am | |
| Wayne Meissner | Aug 22, 2007 9:30 pm | |
| Kay W | Aug 23, 2007 6:37 am | |
| Timothy Wall | Aug 27, 2007 12:30 pm | |
| Timothy Wall | Aug 27, 2007 12:51 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Problem with JNA to access vb DLL | Actions... |
|---|---|---|
| From: | Kay W (drgn...@hotmail.com) | |
| Date: | Aug 20, 2007 11:19:54 am | |
| List: | net.java.dev.jna.users | |
I am a newbie at JNA and need some assistance. First let me explain what I am trying to do:
I have an unmanaged DLL (I do not have the source code). I would like to create a Java wrapper around this DLL. After several days of intense frustration I have given up on implementing the wrapper using JNI, due to an exception that I cannot resolve. I have thus turned to JNA.
The problem is, I cannot get my JNA code to compile. I am sure that I must be missing something simple. I have include my code below as well as the build error.
Java Code
------------------------------------------------------- Rda2Server.java
--- package rda2;
import com.sun.jna.*;
public interface Rda2Server extends Library { Rda2Server INSTANCE = (Rda2Server)Native.loadLibrary("RDA2", Rda2Server.class);
public void Connect(String DataPath, long Workstation, String Username, String Password); public void Disconnect(); public boolean Connected(); }
rda2.java
--- package rda2;
import com.sun.jna.*;
public class rda2 { public static void main(String[] args) { boolean connected = false; Rda2Server serverLib = Rda2Server.INSTANCE; serverLib.Connect("C:\\database", 7, "", ""); connected = serverLib.Connected();
if (connected) { serverLib.Disconnect(); connected = serverLib.Connected(); } } }
Compilation Error
--------------------------------------------------- C:\j2sdk1.4.2_14\bin>javac D:\WS\DSDProjects\Utility\rda2\rda2.java D:\WS\DSDProjects\Utility\rda2\rda2.java:21: cannot resolve symbol symbol : class Rda2Server location: class rda2.rda2 Rda2Server serverLib = Rda2Server.INSTANCE; ^ D:\WS\DSDProjects\Utility\rda2\rda2.java:21: cannot resolve symbol symbol : variable Rda2Server location: class rda2.rda2 Rda2Server serverLib = Rda2Server.INSTANCE; ^ 2 errors
Any assistance would be helpful.
Thanks,
born2Java
_________________________________________________________________ Tease your brain--play Clink! Win cool prizes! http://club.live.com/clink.aspx?icid=clink_hotmailtextlink2







