exe/dll 文件依赖查询工具

介绍

windows下开发exe后,本机运行正常,一旦准备部署到其他机器上,就会出现一堆问题。其中主要问题就是不知道自己缺了哪些库。一般的做法是使用depend.exe工具查看PE文件的依赖库,并进行打包。
但有时因为本机多个目录都存在相同名字的库,也不知道应该用哪个版本…等等一些问题。
因此基于个人的经验,完善了一个简易的查看库依赖的工具。

原理

  • 通过分析PE文件所有的依赖库(同depend工具)
  • 按照windows默认的dll加载顺序查找dll路径
The directory from which the application loaded.
The system directory. Use the GetSystemDirectory function to get the path of this directory. The name of this directory is System32.
The 16-bit system directory. There is no function that obtains the path of this directory, but it is searched. The name of this directory is System.
The Windows directory. Use the GetWindowsDirectory function to get the path of this directory.
The directories that are listed in the PATH environment variable.
  • 比对dll库类型,分为
'ignor' : 可忽略的,默认都是system32目录;但有些开发库安装时也会默认安装到system32路径,导致误判为‘ignor’
'runtime':运行时库。主要是使用virtual studio 开发的应用程序,不同的vs版本对应不同的vs runtime库。最好的方法是官网下载安装。
'depend':依赖库。这部分dll是PE文件的静态依赖库,如果PE文件使用loadlibray方式显示加载的dll,工具无法检测。

效果

  • 橙色:表示库需要copy到PE目录
  • 灰色:表示已经在PE目录

双击某个dll,可继续查看dll的依赖,右键‘返回’上级库。

在这里插入图片描述

下载

https://download.csdn.net/download/corrupt/87437292

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

睡在床板下_

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值