import com.jacob.com.*;
import com.jacob.activeX.*;
public class VbdllCall
{
public static String md5CallVbdll(String str){
String res="";
try {
ActiveXComponent pp = new ActiveXComponent("md5.Class1");
Dispatch myCom = (Dispatch) pp.getObject(); //生成一個(gè)對(duì)象
Variant result = Dispatch.call( myCom, "MD5", str) ;
res=result.toString();
}catch (Exception e) {
res="";
e.printStackTrace();
}
return res;
}
}
import com.jacob.activeX.*;
public class VbdllCall
{
public static String md5CallVbdll(String str){
String res="";
try {
ActiveXComponent pp = new ActiveXComponent("md5.Class1");
Dispatch myCom = (Dispatch) pp.getObject(); //生成一個(gè)對(duì)象
Variant result = Dispatch.call( myCom, "MD5", str) ;
res=result.toString();
}catch (Exception e) {
res="";
e.printStackTrace();
}
return res;
}
}