DLL的小问题。在线急

thesuper 2009-11-16 10:34:44
为什么我写的一个DLL,就一台电脑AfxLoadLibrary失败,其他都行的,为什么啊?怎么查呢?
...全文
150 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
thesuper 2009-11-16
  • 打赏
  • 举报
回复
问题找到了,就是系统里少了几个DLL

谢谢各位
MoXiaoRab 2009-11-16
  • 打赏
  • 举报
回复
An (adjusted) quote:

"The specified file could be located, but could not be loaded. [...] The mentioned DLL is one that [Apache] attempts to load from [the 'modules' directory as specified by the LoadModule directives in your httpd.conf config file:

LoadModule bandwidth_module modules/mod_bandwidth.so
[...] The reason that the DLL could not be loaded is most often that it needs to load other DLL's it depends on to do its work. For example, the Oracle driver will want to load a number of Oracle DLL's. If these cannot be found at load time, this will result in error 1157. The official Windows description of this error code is:

ERROR_DLL_NOT_FOUND One of the library files needed to run this application cannot be found.
[...]Solution: Unfortunately, neither [Apache] nor Windows will tell you which DLL's could not be found. You will need to use some tool to find out. One possibility is to use a tool that traces the loading of DLL's or files. One such tool is NtFilmon, which is a shareware program that can be downloaded from http://www.sysinternals.com/. This site has a large number of high-quality troubleshooting tools that will come in handy with problems like these.

If you have Microsoft Visual Studio 6.0 installed, the easiest way however is to right-click on the offending DLL and choose the View Dependencies option, if you have that. If it's not in your menu, you may have to start this program from the Microsoft Visual Studio 6.0 Tools menu (the program is called 'Dependency Walker' or 'Depends': ). [...]"

For mod_bandwidth.so it looks like this on my system:



Despite the red line for ApacheCore.dll, I did never have any trouble on my system. Maybe because other modules already load ApacheCore.dll before mod_bandwidth.so tries to do so, I don't know.
liuchui2009 2009-11-16
  • 打赏
  • 举报
回复
liuchui2009 2009-11-16
  • 打赏
  • 举报
回复
ERROR_MOD_NOT_FOUND 这个貌似表示能找到dll文件但是没有加载成功
thesuper 2009-11-16
  • 打赏
  • 举报
回复
返回值是这个 ERROR_MOD_NOT_FOUND
但是其他电脑上都是可以的啊。晕了

帮帮忙分析一下
bragi523 2009-11-16
  • 打赏
  • 举报
回复
是否需要什么MFC的DLL之类的
ToperRay 2009-11-16
  • 打赏
  • 举报
回复
看是否所有的相关dll都被拷贝到机器里。

liuchui2009 2009-11-16
  • 打赏
  • 举报
回复
确定路径问题没错吗
fangchao918628 2009-11-16
  • 打赏
  • 举报
回复
GetLastError看下错误是啥!

16,550

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Creator Browser
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧