jacob操作dll时,怎么取ref回调函数返回的值?如果有其他更好的方法操作DLL,求指导啊~~DLL方法:int BUSINESS_HANDLEAPI(string businessCode, string inputData, ref string outData);我现在是这样写的ActiveXComponent dotnetCom = null;dotnetCom = new ActiveXComponent("CInterface.Handler");String outData="";Variant var = Dispatch.call(dotnetCom,"BUSINESS_HANDLE","00","QXWEB",outData);System.out.println("执行结果:"+var.toString());System.out.println("返回的值:"+outData);
1 回答
天涯尽头无女友
TA贡献1831条经验 获得超9个赞
Variant outData = new Variant("value", true); //这样应该就是ref string了
Variant var = Dispatch.call(dotnetCom,"BUSINESS_HANDLE","00","QXWEB",outData);
System.out.println("返回的值:"+outData.getStringRef());
添加回答
举报
0/150
提交
取消