vb.net 由于以下错误,检索具有 CLSID 的组件的 COM 类工厂失败:8007045a

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20067783/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-17 15:52:59  来源:igfitidea点击:

Retrieving the COM class factory for component with CLSID failed due to the following error: 8007045a

vb.netcomponentone

提问by kishan

I am new to VB Dot Net. I am using ComponentOne True OLE DbGrid in my form. Now I need to add Value Items to my column.So i tried this: TDBGrid1.Columns(14).ValueItems.Add(New TrueOleDBGrid80.ValueItem()) TDBGrid1.Columns(14).ValueItems(2).Value = 2 My code is compiling and running well. But when i try to run my exe on client machine it gives me Error: "Retrieving the COM class factory for component with CLSID failed due to the following error: 8007045a " for the above ValueItems.Add() line. Please, help me. Thanks

我是 VB 点网的新手。我在我的表单中使用 ComponentOne True OLE DbGrid。现在我需要将值项添加到我的列中。所以我尝试了这个: TDBGrid1.Columns(14).ValueItems.Add(New TrueOleDBGrid80.ValueItem()) TDBGrid1.Columns(14).ValueItems(2).Value = 2 My代码编译运行良好。但是,当我尝试在客户端计算机上运行我的 exe 时,它​​给了我错误:“由于以下错误,检索具有 CLSID 的组件的 COM 类工厂失败:8007045a”对于上述 ValueItems.Add() 行。请帮我。谢谢

回答by Mohita

The issue seems to be due to difference in the processor on which the application was created and is being run on. You might look for the respective dll in the following locations, use it in your project and see if it solves your issue: 64 bit machine : HKEY_CLASSES_ROOT\CLSID{###}\InprocServer32 32 bit machine : HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID{###}\InprocServer32.

该问题似乎是由于创建和运行应用程序的处理器不同所致。您可能会在以下位置查找相应的 dll,在您的项目中使用它并查看它是否能解决您的问题:64 位机器:HKEY_CLASSES_ROOT\CLSID{###}\InprocServer32 32 位机器:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes \CLSID{###}\InprocServer32。

A few more suggetions can be found at the following links :

可以在以下链接中找到更多建议:

How to repair COMException error 80040154?

如何修复 COMException 错误 80040154?

Retrieving the COM class factory for component with CLSID {XXXX} failed due to the following error: 80040154 VB.net

由于以下错误,检索具有 CLSID {XXXX} 的组件的 COM 类工厂失败:80040154 VB.net

Regards, Mohita

问候,莫希塔

回答by Richa

Try reregistering TdbGrid8 from command line : regsvr32 c:pathtdbg8.ocx Thanks, Richa

尝试从命令行重新注册 TdbGrid8:regsvr32 c:pathtdbg8.ocx 谢谢,Richa