jacob调用ocx的问题
代码就两句:
ActiveXComponent ax=new ActiveXComponent("USBPHONE.USBPHONECtrl.1");
Variant variant=Dispatch.call((Dispatch)ax,"AllGetMICVolume");
报错如下:
com.jacob.com.ComFailException: A COM exception has been encountered:
At Invoke of: AllGetMICVolume
Description: 灾难性故障
at com.jacob.com.Dispatch.invokev(Native Method)
at com.jacob.com.Dispatch.invokev(Dispatch.java:983)
at com.jacob.com.Dispatch.callN(Dispatch.java:583)
at com.jacob.com.Dispatch.call(Dispatch.java:658)
at test.Test.main(Test.java:26)
高人给看一下?????