0
Im新的JNA。我試圖訪問一個DLL中的方法。我收到以下錯誤JNA - DLL中的訪問方法
Exception in thread "main" java.lang.UnsatisfiedLinkError: Error looking up function 'GetACSStatus': The specified procedure could not be found.
at com.sun.jna.Function.<init>(Function.java:179)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:347)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:327)
at com.sun.jna.Library$Handler.invoke(Library.java:203)
at com.sun.proxy.$Proxy0.GetACSStatus(Unknown Source)
at TestJNA.main(TestJNA.java:17)
下面是代碼:
public class TestJNA {
public interface simpleDLLTest extends Library {
simpleDLLTest INSTANCE = (simpleDLLTest) Native.loadLibrary("IMV1", simpleDLLTest.class);
public NativeLong GetACSStatus();
}
public static void main(String[] args) {
simpleDLLTest sdll = simpleDLLTest.INSTANCE;
NativeLong result1 = sdll.GetACSStatus(); // calling function
System.out.println("GetACSStatus(): " + result1);
}
}
請幫助。
[depend.exe](http://depenencywalker.com)說你的函數名是什麼? – technomage
在Dependency Walker中,函數名稱爲'?GetACSStatus @ IMV_CameraInterface @@ QAEKXZ' – Nini