如何修复 COMException 错误 80040154? [英] How to repair COMException error 80040154?

查看:28
本文介绍了如何修复 COMException 错误 80040154?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将工作 C# 项目从 64 位 Windows 7 机器移动到 32 位 XP 机器导致以下错误:

Moving a working C# project from a 64-bit Windows 7 machine to a 32-bit XP machine caused the following error:

由于以下错误,检索具有 CLSID {681EF637-F129-4AE9-94BB-618937E3F6B6} 的组件的 COM 类工厂失败:80040154.

681EF637-F129-4AE9-94BB-618937E3F6B6 不在注册表中,因此未正确安装,但这与之前在 64 位 Windows 7 机器上出现问题的 ID 相同.

681EF637-F129-4AE9-94BB-618937E3F6B6 is not in the registry so it is not properly installed, but this is same ID that was previously a problem on the 64-bit Windows 7 machine.

在64位Windows 7机器上找到这个错误的解决方法此处(将平台目标更改为 x86)但这并不能解决 32 位 XP 机器上的问题.

The solution to this error on the 64-bit Windows 7 machine was found here (change Platform Target to x86) but this does not solve the problem on the 32-bit XP machine.

我如何找到与 681EF637-F129-4AE9-94BB-618937E3F6B6 关联的 DLL,或者更好的是,我如何修复此异常?

How do I find the DLL associated with 681EF637-F129-4AE9-94BB-618937E3F6B6, or, even better, how do I repair this exception?

推荐答案

要查找 DLL,请转到您的 64 位计算机并打开注册表.找到名为 HKEY_CLASSES_ROOTCLSID{681EF637-F129-4AE9-94BB-618937E3F6B6}InprocServer32 的键.该键将以 DLL 的文件名作为其默认值.

To find the DLL, go to your 64-bit machine and open the registry. Find the key called HKEY_CLASSES_ROOTCLSID{681EF637-F129-4AE9-94BB-618937E3F6B6}InprocServer32. This key will have the filename of the DLL as its default value.

如果您通过为 x86 重新编译项目解决了 64 位机器上的问题,那么您需要查看注册表的 32 位部分而不是正常位置.这是HKEY_LOCAL_MACHINESOFTWAREWow6432NodeClassesCLSID{681EF637-F129-4AE9-94BB-618937E3F6B6}InprocServer32.

If you solved the problem on your 64-bit machine by recompiling your project for x86, then you'll need to look in the 32-bit portion of the registry instead of in the normal place. This is HKEY_LOCAL_MACHINESOFTWAREWow6432NodeClassesCLSID{681EF637-F129-4AE9-94BB-618937E3F6B6}InprocServer32.

如果 DLL 是为 32 位构建的,那么您可以直接在您的 32 位机器上使用它.如果它是为 64 位构建的,那么您必须联系供应商并从他们那里获得 32 位版本.

If the DLL is built for 32 bits then you can use it directly on your 32-bit machine. If it's built for 64 bits then you'll have to contact the vendor and get a 32-bit version from them.

拥有 DLL 后,通过运行 c:windowssystem32 egsvr32.exe 来注册它.

When you have the DLL, register it by running c:windowssystem32 egsvr32.exe.

这篇关于如何修复 COMException 错误 80040154?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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