msxml .dll 的奇怪行为

发布于 2024-10-17 05:44:02 字数 514 浏览 1 评论 0原文

突然间,当程序尝试实例化 MSXML2.DOMDocument 时,我们的一些客户遇到了 ActiveX 组件无法创建对象错误。我们在这里讨论的是在计算机上编写的 VB6 应用程序,该应用程序设置对 msxml2.dll 的引用,而不是其他 xml-dll。当我们发布部署时,我们每次都会部署 msxml2.dll、msxml2a.dll 和 msxml2r.dll,并且从未出现过任何问题。

这次不行!就好像windows环境本身已经改变并拒绝注销/重新注册过程一样。 无论我做什么,我都无法让客户端计算机成功实例化 MSXML2.DOMDocument。 更奇怪的是:当我重命名/取消注册/删除 system32 文件夹中的所有 msxml2* 文件时,没有遇到问题的客户端会继续运行,因此它们似乎不需要 .dll!通常,此客户端会混合安装 msxml3、4 和 6。我搜索了硬盘驱动器,没有发现其他 msxml2 副本。

有人可以帮助开始解决这个令人困惑的问题吗?

编辑:只需简单设置 doc=new MSXML2.DOMDocument 就足以导致错误。

All of a sudden some of our clients experience the ActiveX component can't create object error when the program tries to instantiate a MSXML2.DOMDocument. We are talking about a VB6 app here that is written on a computer that sets a reference to msxml2.dll and no other xml-dll. When we issue a deployment we deploy msxml2.dll msxml2a.dll and msxml2r.dll every time and have never had any issues.

Not this time! It is as if the windows environment itself has changed and rejects the unregistering/reregistering process.
Whatever I do I am unable to get the client computer to succesfully instantiate the MSXML2.DOMDocument.
To make things even more strange: When I rename/unregister/delete all msxml2* files from the system32 folder, clients that do not experience the problem keep functioning, so they do not seem to need the .dll's! Usually this clients will have a mix of msxml3, 4 and 6 installed. I searched the hard drive and there are no other copies of msxml2 lurking around.

Can someone please help to get a start of a grip on this baffling problem?

EDIT: just a simple set doc=new MSXML2.DOMDocument is enough to cause the error.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

怼怹恏 2024-10-24 05:44:02

现在很多图书馆都是系统管理的。将内容转储到 System32 只能让您到目前为止,因为“真正的”库位于 SxS 缓存中。

这就是为什么您想要为它们使用经过批准的部署技术的原因之一,而对于 MSXML,这会变得有点复杂,除非您只是使用 Microsoft 规定的 MSI 包(或包装在 EXE 中的包)。每次更新时,MSXML 4 还提供 MSM 和 CAB 格式,这与仅受 MSXML 4 支持的“SxS 安装”有关(在 MSXML 6 中作为坏主意而被放弃)。

好消息是,除 Server 2003 之外的所有受支持的操作系统都已包含 MSXML 6,因此您可以轻松地在家中使用 MSXML 6,无需部署:

MSXML6 现在是带内的,MSI 设置现在,头痛应该(几乎)消失了。

MSXML 3 可在大多数 Windows 版本上使用,并且至少可以部署回 Win98:Microsoft XML Parser (MSXML) 3.0

安装、组件注册和服务未按您的方式进行可能认为它已经存在很长一段时间了。将应用程序打包为 MSI 包比使用旧的脚本化安装工具要安全得多。不要尝试部署复杂包的零碎部分,例如 MDAC 和 MSXML。

您正在对哪个特定的 MSXML 版本进行早期绑定?请记住,如果您使用 MSXML 4,则这是特定于子版本的(并非所有接口在服务包之间都是二进制兼容的)。

Lots of libraries are system-managed now. Dumping things into System32 only gets you so far, since the "real" libraries live in the SxS Cache.

This is one reason why you want to use an approved deployment technique for them, and for MSXML this gets a little complicated unless you simply use the prescribed MSI packages (or those wrapped in an EXE) from Microsoft. MSXML 4 was also available in MSM and CAB formats for each update, which had more to do with the "SxS install" that was only supported for MSXML 4 (dropped as a bad idea in MSXML 6).

The good news is that all supported OSs except Server 2003 already include MSXML 6, so target that and you're home free with no deployment requirement:

MSXML6 is now in-band, MSI setup headaches should now (almost) be gone..

MSXML 3 is available on most Windows versions going back further, and can be deployed back to at least Win98: Microsoft XML Parser (MSXML) 3.0

Installation and component registration and servicing hasn't worked as you might think it does for a long time now. It is much safer to package your applications as MSI packages rather than using legacy scripted setup tools. Don't try to deploy bits and pieces of complex packages like MDAC and MSXML.

Which specific MSXML version are you doing early binding to? Keep in mind that if you use MSXML 4 this is sub-version specific (not all interfaces were binary compatible from service pack to service pack).

故乡的云 2024-10-24 05:44:02

最好始终使用版本相关的 ProgID,而不是版本无关的 ProgID。例如,我建议您改用 Msxml2.DOMDocument.6.0。请参阅在 Internet Explorer 中使用正确版本的 MSXML 了解更多信息。

It is a good idea to always use version dependent ProgIDs instead of version independent ones. For example, I would suggest you to use Msxml2.DOMDocument.6.0 instead. Please refer to Using the right version of MSXML in Internet Explorer for more information.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文