From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.



错误429发生于为在LabVIEW中创建的ActiveX Server创建引用



主要软件:
主要软件版本: 7.0
主要软件修正版本: N/A
次要软件: N/A

问题:

我在LabVIEW中创建了一个ActiveX  server. 现在,在Visual Basic中,我试图为刚新建的ActiveX server打开一个引用,但是我不断得到下列错误信息:

Run-time error '429':
ActiveX component can't create object

on the following line:

Set lvapp = CreateObject("MyActiveXServer.Application")

运行时错误:“429”:

ActiveX 成员在下列行不能创建对象:

Set lvapp = CreateObject("MyActiveXServer.Application")

为什么会发生这个错误?



解答:

该错误发生的原因是操作系统不能识别该ActiveX server。 有两个办法可以在OS中注册ActiveX server

1. 在command命令行中,运行您的ActiveX server应用程序,将语句\regserver跟随在ActiveX server后面。

例如:假设我的ActiveX server 应用程序在根目录下面,我将打开命令行并输入:

C:\MyActiveXServer.exe \regserver

或者:

2. 在Windows Explorer(Windows 资源管理器)中运行 ActiveX server 应用程序。在这里运行将启动该应用程序并同时注册。

一旦您尝试这些方案,回到Visual Basic中您将能够运行其代码,不会再出现之前的错误。

 



相关链接: KnowledgeBase 3PE6B3DW: Can I Manually Set the CLS-ID for My ActiveX Server Enabled Executable?



附件:


activex.GIF - activex.GIF


报告日期: 11/10/2003
最近更新: 09/16/2011
文档编号: 3397NJB9