Java调用第三方dll文件的使用方法
public class OtherAdapter {
static
{
//System.loadLibrary("Connector");//载入需要调用的dll Connector.dll
System.load("d://Connector.dll");//载入dll Connector.dll
}
//用native关键字修饰将被其它语言实现的方法
//dll文件中对应的函数声明
public native static int _PWLogon(String lpszDS,String lpszUser,String lpszPWD);
//函数声明
public native static void _PWLogout();
public native static String _GetPWLastError();
public native static String _GetPWFolders(long lParentFolderno);
public native static String _GetPWDocuments(long lFolderno);
public native static String _GetPWFiles(long lFolderno,long lDocno);
//public native static String pirntStr(String msg);//函数声明
public static void main(String[] args){
//本地方法的调用
int rs=_PWLogon("服务器","账号","密码")