简体   繁体   English

在不同的操作系统中使用vb.net应用程序时出现错误

[英]Having error when vb.net application is used in different OS

A .net application is used at XP OS and everything is working fine until the OS is changed to Windows 7. At first have an error "Retrieving the COM class factory for component with CLSID {4E084A82-8FE7-11D0-9125-0004AC3617E1} failed due to the following error: 80040154". 在XP操作系统上使用的是.net应用程序,并且一切正常,直到将操作系统更改为Windows7。首先出现错误“为具有CLSID {4E084A82-8FE7-11D0-9125-0004AC3617E1}的组件检索COM类工厂失败由于以下错误:80040154“。 I checked the registry and the reg file is missing so i input the file. 我检查了注册表,缺少​​reg文件,所以我输入了文件。

But now had a new error again which is "System.Runtime.InteropServices.COMException (0x80020009): Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))". 但是现在又有一个新错误,是“ System.Runtime.InteropServices.COMException(0x80020009):发生异常。(HRESULT异常:0x80020009(DISP_E_EXCEPTION))”。

The application is to connect to an IBM peak system and run some Macros from there. 该应用程序将连接到IBM Peak系统并从那里运行一些Macros。

Please advise me on this as I have been digging in this for quite long already and giving me headache. 请为我提供建议,因为我已经在此方面进行了很长时间的挖掘,并且让我头疼。

You sure there was not some kind of pre-requisite install for this to run on the XP machine? 您确定没有某种先决条件安装程序才能在XP计算机上运行吗? It looks like maybe the application has a reference for a COM iterop that does not exist on the Windows 7 machine. 看起来该应用程序可能具有Windows 7计算机上不存在的COM iterop的引用。 I would recommend firing up Visual Studio and examining what references are included in the project. 我建议启动Visual Studio并检查项目中包含哪些引用。 Possibly you installed something to support the IBM peak system that deploys the necessary COM component. 可能您已经安装了一些东西来支持部署必要的COM组件的IBM Peak系统。

Is your application compiling as 'Any CPU'? 您的应用程序被编译为“任何CPU”吗? It's a possibility that your Windows 7 64bit and your XP is running 32bit, which can cause havoc with COM objects. Windows 7 64位和XP运行32位的可能性很大,这可能会导致COM对象损坏。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM