如何找出可执行文件将加载哪些 dll?
如果我有 Windows 可执行文件,如何找出它将加载哪些 dll?
我只是讨论哪些将静态加载,而不是那些可能使用 LoadLibrary 之类的东西动态加载的。
If I have a Windows executable, how can I find out which dlls it will load?
I'm just talking about which ones that will be loaded statically, not ones it might load dynamically with something like LoadLibrary.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(10)
dumpbin 是一个附带的工具VC++。
要查看程序将导入哪些 DLL:
要查看它将导入哪些函数(和 DLL),请使用
dumpbin is a tool that comes with VC++.
To see what DLLs a program will import:
To see what functions (and DLLs) it will import, use
有一些实用程序可以为您执行此操作。
过去我使用过(我认为)VB 附带的 MS 工具(depends.exe):
VS2010
VS2012
VS2013
VS2015
当前
还有这个:
http://dependencywalker.com/
可能还有其他。
There are utilities that will do this for you.
In the past I've used the MS tool (depends.exe) that came with (I think) VB.:
VS2010
VS2012
VS2013
VS2015
Current
and there's this as well:
http://dependencywalker.com/
and probably others as well.
打开命令提示符,然后键入以下命令
tasklist /m /fi "imagename eq netbeans.exe"
键入 netbeans.exe,无论您的 exe 文件名是什么。
Open the command prompt and then type below command
tasklist /m /fi "imagename eq netbeans.exe"
Type instead netbeans.exe whatever name your exe file name.
Dependency Walker 可以帮助您确定将加载哪个.dll。
Dependency Walker can help you determine which .dll will be loaded.
只需进入命令提示符并输入
tasklist /m
,您将看到特定程序使用的dll文件列表。Just go to the command prompt and type
tasklist /m
, you will see the list of dll files used by specific program.Microsoft .Net 的解决方案:
Solution for Microsoft .Net:
有一个名为 NDepend 的方便工具,可以为您提供所有 DLL 依赖项。
There is a handy tool called NDepend that will give you all DLL dependencies.
progfr 简单又有用:
[http://members.fortunecity.com/michaelmoser/tip11.htm]
progfr is simple and useful:
[http://members.fortunecity.com/michaelmoser/tip11.htm]
依赖项 - 一个开源的现代 Dependency Walker 显示 Windows 可执行文件将加载哪些 DLL,并且它在其中运行良好现代 Windows 10。
它的功能比 Dependency Walker 稍弱,但后者可能会或可能不会在Windows 10 的最新更新是在 2006 年。(较新版本的 Dependency Walker 与某些版本的 Windows 10 Windows 开发工具包捆绑在一起,但现在不再捆绑了。)
Dependencies - An open-source modern Dependency Walker shows which DLLs a Windows executable will load and it works well in modern Windows 10.
It is a little less powerful than Dependency Walker, but the latter may or may not work in Windows 10 as it was last updated in 2006. (Newer versions of Dependency Walker were bundled with some versions of Windows Development Kit for Windows 10, but not any more.)
流程浏览器
附带 SysInternals 套件
https://learn.microsoft.com/en-us/sysinternals/ downloads/sysinternals-suite
优点:允许探索已经在运行的进程(我还没有找到将依赖项walker附加到现有进程的方法)
Process Explorer
Comes with SysInternals Suite
https://learn.microsoft.com/en-us/sysinternals/downloads/sysinternals-suite
Benefits: allows to explore the process that is already running (I have not found a was to attach the dependency walker to the existing process)