运行时错误 440 VB6 [英] Run-time error 440 VB6
问题描述
我已经创建了一个基于 ocx 文件的 exe 程序,并且我使用了 VB Package &在非vb环境下将exe文件作为程序安装的部署向导,问题是我在运行程序时出现这个错误
I have created an exe program based on ocx file and I used VB Package & Deployment wizard to install the exe file as a program on a non vb environment, the problem is I am getting this error when running the program
运行时间错误‘440’自动化错误.
"RUN TIME ERROR '440' AUTOMATION ERROR.
您认为问题出在哪里?
谢谢
推荐答案
440 自动化错误通常表示一个(或多个)COM 对象加载失败.
The 440 Automation error usually indicates that one (or more) COM object failed to load.
这可能是 ActiveX exe、ocx 或您项目中包含的外部依赖项之一.
This might be an ActiveX exe, ocx, or maybe one of the external dependencies you included in your project.
确保您使用的所有外部库都在出现错误的系统上正确注册.
Make sure all the external libraries you use are registered correctly on the system that's giving the error.
您可以通过手动注册 ActiveX(.ocx、.exe)和 COM 组件(通常为 .dll)来测试这一点.
You can test this by registering the ActiveX (.ocx, .exe), and COM components (usually .dll) manually.
ATL/COM、ActiveX EXE、OCX、DLL
如果目标程序集是 COM/ATL 程序集,您可以使用 regsvr32.exe
(位于 windows\system32 目录中)作为 ocx
文件和 COM-dll
s.您可以通过使用选项 /regserver
运行来注册 ActiveX-exe
,请参阅:http://support.microsoft.com/kb/297279 和 http://support.microsoft.com/kb/146219
If the target assembly is a COM/ATL assembly, you can use regsvr32.exe
(located in windows\system32 directory) for the ocx
files and the COM- dll
s. You can register an ActiveX-exe
by running it with the option /regserver
see: http://support.microsoft.com/kb/297279 and http://support.microsoft.com/kb/146219
.NET ComVisible
如果目标程序集是使用 ComVisible
的 .net 程序集,您可以使用 regasm.exe
注册它,它位于.NET 框架目录.请参阅:如何将 .NET 程序集注册为 COM?
If the target assembly is a .net assembly which uses ComVisible
, you can register it with regasm.exe
, it is somewhere in the .NET framework directory. see: How to register a .NET assembly as COM?
否则
您可能想使用 dependency walker
之类的工具来检查系统中缺少哪些注册和 dll.您可以从这里下载,http://dependencywalker.com/ 当心,运行下载的 exe 的风险自负.
You might want to use a tool like dependency walker
to check which registration and dll's are missing from your system.You can download it from here, http://dependencywalker.com/ beware, run downloaded exe's at your own risk.
这篇关于运行时错误 440 VB6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!