`

JNative调用DLL

    博客分类:
  • JAVA
阅读更多
import org.xvolks.jnative.JNative;
import org.xvolks.jnative.Type;
import org.xvolks.jnative.exceptions.NativeException;

public class DllPicture  {


public static void main(String[] args) throws Exception {

try{

JNative jnative = new JNative("Vcode.dll","GetVcode");


jnative.setParameter(0, Type.STRING , "d:\\soft\\hardware\\nihao.jpg");


jnative.setRetVal(Type.STRING);

//System.out.println("----------------1");
jnative.invoke();
//System.out.println("----------------2");
String returnStr = jnative.getRetVal();
// 打印函数返回值
System.out.println(returnStr);
}catch(NativeException e){
e.printStackTrace();
}

}
}



下面下载文件的密码是:20050516
分享到:
评论
4 楼 welss 2017-11-26  
博主,JNative怎么调用dll中的这种方法:
  int  CManagerInterface::Connect(

   LPCSTR   server                // Server address

   )

请不吝赐教!!谢谢
3 楼 stevenjohn 2011-09-29  
stevenjohn 写道
daixu2008 写道
......还加密!!人才!

我忘记了,呵呵,不好意思,啊,密码我直接发你就好了。

密码发到你的JavaEYE信箱了,注意查收。
2 楼 stevenjohn 2011-09-29  
daixu2008 写道
......还加密!!人才!

我忘记了,呵呵,不好意思,啊,密码我直接发你就好了。
1 楼 daixu2008 2011-09-20  
......还加密!!人才!

相关推荐

Global site tag (gtag.js) - Google Analytics