DLL中的被调函数有两个参数,第二个参数是int64类型的引用类型,因此创建8byte的MemoryBlock;
JNative n = null;
try {
n = new JNative("AAAA.dll", "sss");
n.setRetVal(Type.VOID);
int i = 0;
n.setParameter(i++, Type.INT, level);
Pointer pp = new Pointer(MemoryBlockFactory.createMemoryBlock(8));
n.setParameter(i++, pp);
System.out.println(pp.getAsLong(0));
n.invoke();
System.out.println(pp.getAsLong(0));
return 0;
} finally {
if (n != null)
JNative.unLoadLibrary("GeoSOT32.dll");
}