VBA中出现运行时错误429,但是类已注册 [英] Runtime error 429 in VBA, but class is registered

查看:662
本文介绍了VBA中出现运行时错误429,但是类已注册的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试重新创建一个使用javascript打开与PLC的连接,然后在网页上显示各种信息的程序.由于各种原因,我宁愿以MS Access的形式使用它,并且花了很多时间试图找到要使用的正确dll(如果有人好奇,请使用Jet32X.dll).最后,我将javascript中调用的CLSID追溯到PLC的注册类,然后尝试用VB代码创建该对象.它不会超出"Dim As New"这一行,但是会引发运行时错误429:"Active X组件无法创建对象".真的希望我有更多关于为什么的信息.
我知道该课程已注册,因为这是我首先找到它的方式.我知道DLL文件没有损坏,因为该程序可以从JS版本正常运行.我暗中怀疑这里发生了某种不兼容,因为PLC和支持软件已经很老了,而我正在使用Microsoft Access 2013(及其关联的VBA).但是,我真的想不出一种验证这一点的好方法.还有其他想法吗?还有其他原因导致此问题吗?

I'm trying to recreate a program that uses javascript to open a connection to a PLC and then display all sorts of information on a web page. I'd rather have it in a form in MS Access for various reasons, and have spent forever trying to find the right dll to use (Jet32X.dll, if anyone is curious). I finally tracked the CLSID called out in the javascript back to a registered class for the PLC, and I'm trying to create that object in VB code. It won't get any further than the Dim As New line, however, throwing runtime error 429: "Active X Component Cannot Create Object." Really wish I had some more information about why.
I know the class is registered, since that's how I found it in the first place. I know the DLL file isn't corrupted, since the program runs fine from the JS version. I have a sneaky suspicion that there's some sort of incompatibility going on here, since the PLC and supporting software is pretty old, and I'm working in Microsoft Access 2013 (and its associated VBA). I can't really think of a good way to verify this, however. Does anyone have any other ideas? Could anything else be causing this problem?

推荐答案

弄清楚了;以防其他人遇到此类问题:
32位COM dll将无法在64位应用程序中运行.如果您不想返回并重新安装正在使用的任何应用程序的32位版本,最简单的解决方法之一就是使用dllhost.exe作为替代. 您可以阅读一些有关它的信息

Figured it out; in case anyone else runs into this sort of issue:
32bit COM dlls will not run in 64bit applications. If you don't want to go back and reinstall 32bit versions of whichever application you're using, one of the easiest workarounds is using dllhost.exe as a surrogate. You can read a little about it here, but I found this tutorial easier to follow.

这篇关于VBA中出现运行时错误429,但是类已注册的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆