由于以下错误,检索具有CLSID {97EDD412-0626-4EB9-A344-3F344F00E93D}的组件的COM类工厂失败:80040154未注册类(HRESULT异常:... [英] Retrieving the COM class factory for component with CLSID {97EDD412-0626-4EB9-A344-3F344F00E93D} failed due to the following error: 80040154 Class not registered (Exception from HRESULT:...

查看:101
本文介绍了由于以下错误,检索具有CLSID {97EDD412-0626-4EB9-A344-3F344F00E93D}的组件的COM类工厂失败:80040154未注册类(HRESULT异常:...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在另一台机器上执行窗口应用程序时出现异常。



发生了'System.Runtime.InteropServices.COMException'类型的异常抓住了。



I got an exception when i try to execute window application on another machine.

An exception of type 'System.Runtime.InteropServices.COMException' occurred and was caught.

System.Runtime.InteropServices.COMException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Retrieving the COM class factory for component with CLSID {97EDD412-0626-4EB9-A344-3F344F00E93D} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).





我被困在这里。请帮助我。



I am stuck here.Please help me.

推荐答案

如果您的COM界面即时通讯以32位编写,只需启动控制台(cmd.exe),然后键入
If your COM-interface implemented in 32 bit, just launch the console (cmd.exe), then type
%windir%\System32\regsvr32.exe yourlib.dll





如果你有一些安装脚本,可以考虑使用autoregisration功能(如果有的话)



如果你的库是32位架构和目标系统是x64,你应该使用 DllSurrogate [ ^ ]。



有关DllSurrogate的更多信息,请参阅以下链接:

注册DLL服务器以进行代理激活 [ ^ ] <无线电通信/>


更新

请参考以下链接在64位操作系统上注册32位COM对象:

使用64位的32位COM对象位申请 [ ^ ]



If you have some installation script, consider to use autoregisration feature (if its available)

If your library is for 32 bit architecture and target system is x64, you should use then DllSurrogate[^].

For more information about DllSurrogate, please refer the following link:
Registering the DLL Server for Surrogate Activation[^]

Upd
Please refer to the following link to register your 32-bit COM object on 64-bit OS:
Using a 32-bit COM Object from a 64-bit Application[^]


我只是将目标机器设置为x86然后构建应用程序,它适用于32/64位操作系统。

感谢大家的宝贵答案。
I just set target machine to x86 then build the application and it worked for 32/64 bit OS.
Thanks to everyone for their valuable answers.


这篇关于由于以下错误,检索具有CLSID {97EDD412-0626-4EB9-A344-3F344F00E93D}的组件的COM类工厂失败:80040154未注册类(HRESULT异常:...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆