AutoItX运行报错"com.jacob.com.ComFailException: Can't co-create object"

在java调用AutoItx 时候 加载dll 总是出现下面错误:

com.jacob.com.ComFailException: Can't co-create object

at com.jacob.com.Dispatch.createInstanceNative(Native Method)

at com.jacob.com.Dispatch.<init>(Dispatch.java:99)
at com.jacob.samples.test.CallDll.JavaCallVbdll(CallDll.java:19)

at com.jacob.samples.test.CallDll.main(CallDll.java:13)

The tutorial says that I should run regsvr32 c:\install\autoitx\autoitx3_x64.dll in cmd but i keep getting the following error:

the module ".....\autoitx3_64.dll" was loaded but the call to DLLRegisterSerer failed with error code 0x80070005


从上的回答我看可以看到,需要在cmd下运行 regsvr32 来注册AutoItX.dll文件,当我运行发现出现 error code 0x80070005 

这时候发现因为注册dll都系统盘一般用户是没有权限直接去注册所以这里需要时用管理员的权限去注册。

正确方式:

以管理员的方式运行cmd 输入 regsvr32 c:\install\autoitx\autoitx3_x64.dll 回车即可。

当出现 success 说明dll 文件注册成功。

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值