日期:2014-05-17 浏览次数:20752 次
package com.df.ljh;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.xvolks.jnative.JNative;
import org.xvolks.jnative.Type;
public class CallDllTest {
public static void main(String[] args)
{
System.load("D:/BwBillNetSupport.dll"); //加载dll
try {
JNative openCamera = new JNative("D:/BwBillNetSupport.dll", "BillAPI_OpenProjectFile"); //加载函数
openCamera.setRetVal(Type.INT); //设置返回值类型
openCamera.invoke(); //执行
System.out.println(openCamera.getRetValAsInt());
} catch (Exception ex) {
Logger.getLogger(CallDllTest.class.getName()).log(Level.SEVERE, null, ex);
}
}
}