运行时错误429尝试创建ActiveX组件时

时间:2016-02-06 01:48:09

标签: vb6 windows-8.1 activex dcom

  

运行时错误429 -ActiveX组件无法创建对象

当我的程序执行以下行时会出现此错误。

Private WithEvents CommClient As XXcommClient

Private Sub Class_Initialize()
    'Initializes the CommClient object.
    Set CommClient = CreateObject("COMMLIBXLibCtl.XXcommClient") 'errors here

缺少什么? > _< 我已经在这个项目中添加了XXCommLibX.dll作为参考(它包含了XXcommClient和XXcommServer的类定义(我认为这就是他们所称的)

我在win8.1上运行它。我已经在mmc comexp.msc / 32中为“XXCom.XxInfo”(包含上面的代码)更改了访问权限和内容。设置btw为none,每个人都可以编辑,以及交互式用户。

有人可以指点我正确的方向吗?过去几天我一直在圈子里胡胡胡胡

2 个答案:

答案 0 :(得分:0)

@ Bob77说得对。 它实际上是a)我没有正确注册dll。

XXCommLibX.dll实际上依赖于其他三个.dll和两个.exes。手册中实际提到了这个细节。真的很尴尬。

正确注册dll之后,我又回到了这一行:

Set CommClient = new XXcommClient

......它奏效了。 >。<

答案 1 :(得分:0)

@Aj Godinez, can you guide me with your answer

I am a newbie to vb6 and microsoft technologies. I am trying to run a vb6 application. When i open the app and try running the app, I get the following error in a dialog box "Runtime error 429: Active X component cannot create an object" and gives me two options "debug" and "end". Environment: windows 8.1 64bit, vb6

When i click on end/debug it highlights the following code in yellow "Set m_oSNTPCtrl = CreateObject("SNTPWizard.SNTPWizardCtrl2")"..

What could be the error, any missing DLL's/OCX files????

The class looks like this:

Private Sub Class_Initialize()
On Error GoTo ErrHndlr
Set m_oSNTPCtrl = CreateObject("SNTPWizard.SNTPWizardCtrl2")
m_oSNTPCtrl.UnlockSNTPWizard "SNTPWIZ-0200002100230152"
Exit Sub
ErrHndlr:
Call LogError(Err.Description, "Class_Initialize()")
End Sub