DLL初始化失败 [英] DLL initialization failed

查看:533
本文介绍了DLL初始化失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们,我有一个问题:

当程序运行到:

Dear friends, I have a problem:
When the program runs to:

>_di_IXMLNodeList list = LoadXMLDocument ( " XML\\xx.xml " ) ->DocumentElement->ChildNodes->FindNode ( " XXX " ) ->ChildNodes;



注意:项目XX.exe引发异常类EOleSysError,消息''动态链接库DLL初始化例程失败。 ''进程停止了。

如何解决?

这也是一个C ++ Builder项目


Note: Project XX.exe raised exception class EOleSysError with message '' dynamic link library DLL initialization routine failed. '' Process stopped.
How to solve?
Also that is a C++ Builder Project

推荐答案

如果这段代码是你的DLL加载的地方,你可能会得到那个错误,因为MSXML.DLL无法在加载另一个DLL(在这种情况下你自己的DLL)的同时加载到你的进程中。



这对新开发人员来说发生了很多 - 一切都以dll加载时间结束,然后他们发现在Windows中只能加载一个DLL,因为DLL加载程序锁定。你可能不得不尝试重构你的代码,如果是这样的话,让你的DLL加载,然后调用你从处理XML数据的DLL中公开的其他函数。
If this code is where your DLL is loading, you probably get that error because the MSXML.DLL cannot load into your process at the same time as another DLL (in this case your own DLL) is loading.

This happens a lot with new developers - everything ends up at ''dll load time'' and then they discover that only a single DLL can load at a time in Windows, because of the DLL loader lock. You might have to try refactoring your code, if that is the case, and let your DLL load and THEN call some other function you expose from the DLL which is processing the XML data.


这篇关于DLL初始化失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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