问题描述
ICkReadWriteick=ICkReadWrite.getInstance();ComThread.InitSTA();ActiveXComponentxl=newActiveXComponent("ProductGoBackCPU9632.ProductGoBackCPU9632Ctrl.1");try{Dispatchdd=xl.getObject();System.out.println(Dispatch.call(dd,"GetDeviceVersion"));}catch(Exceptione){e.printStackTrace();}finally{ComThread.Release();}
这个错是怎么回事啊com.jacob.com.ComFailException:ACOMexceptionhasbeenencountered:AtInvokeof:GetDeviceVersionDescription:AnunknownCOMerrorhasoccured.atcom.jacob.com.Dispatch.invokev(NativeMethod)atcom.jacob.com.Dispatch.invokev(Dispatch.java:804)atcom.jacob.com.Dispatch.callN(Dispatch.java:440)atcom.jacob.com.Dispatch.call(Dispatch.java:510)atcom.xm.fxr.ocx.ICkReadWrite.main(ICkReadWrite.java:57)
解决方案
解决方案二:
ProductGoBackCPU9632.ProductGoBackCPU9632Ctrl.1与GetDeviceVersion都确认没有写错吗?
解决方案三:
是啊,都没写错
解决方案四:
用js,都能成功调用的