首页 > 解决方案 > 调试 DLL 加载失败,找不到指定的程序错误

问题描述

需要一些提示来调试 DLL。我有一些遗留项目,可以使用v141_xpWindows 10 上的工具集构建。

它有几个自己的依赖项,例如:

netsnmp.li
netsnmpagent.lib
netsnmpmibs.lib
netsnmptrapd.lib
netsnmphelpers.lib
Ws2_32.lib
snmpapi.lib
mgmtapi.lib
winmm.lib

并继承:

kernel32.lib
user32.lib
gdi32.lib
winspool.lib
comdlg32.lib
advapi32.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
odbc32.lib
odbccp32.lib

net-snmp-5.4.4 我从源代码构建并安装在C:\usr. 编译和链接似乎是成功的。

但是,尝试注册生成的 DLL 表明它毕竟不是那么成功。

regsvr32 C:\Users\kqmw64\ctt_tools\toolsprojects\ToolsObjects\Debug\networkmanager.dll

结果: The specified procedure could not be found消息。

我已经使用http://www.nirsoft.net/utils/dll_export_viewer.html检查了导出表

DllRegisterServer   0x6416c8c0  0x0006c8c0  3 (0x3) networkmanager.dll  C:\Users\kqmw64\ctt_tools\toolsprojects\ToolsObjects\Debug\networkmanager.dll   Exported Function   

添加MessageBox(0, "Dll Register Server", "caption", MB_OK);到它,但显然没有出现消息框。

非常感谢一些提示如何解决这个问题。

标签: visual-c++dllcomnet-snmp

解决方案


推荐阅读