JNA调用c#的DLL
1:C#中代码:因为我的JDK是64位,所以vs2013中release也要用x64编译 namespace cSharpDLLforJNA { public class Main { public struct user { public int id; public string name; public int age; } public void sayuser(user user) { Console.WriteLine(user.name + ":id=" + user.id + " age=" + user.age); } } } 2:JnaDemo.java中 public class User extends Structure { public class ByReference extends User implements Structure.ByReference{} public class ByValue extends User implements Structure.ByValue{} public int id; public String name; public int age; } public interface CSharpDLLforJNA extends Library{ //总是出现找不到dll库文件异常,参考https:/