检察EXE、DLL、SYS等文件是32位还是64位的

检查EXE、DLL、SYS等文件是32位还是64位的

非.NET文件用:dumpbin.exe /headers file.exe(C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin)

.NET文件用:corflags.exe file.exe(C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin)

Any CPU                     PE32 with 32BIT = 0
x86                             PE32 with 32BIT = 1
x64/Itanium (IA-64)      PE32+ with 32BIT = 0

最简单的办法是用任意文本编辑器如:记事本程序打开要检查的文件看到 PE  L为x86、PE  d†为x64

推荐软件:

EXE 64bit Detector v1.0(http://securityxploded.com/exe-64bit-detector.php)

检察EXE、DLL、SYS等文件是32位还是64位的

一些参考网站:

http://www.it165.net/pro/html/201403/10417.html

http://blog.****.net/wangwenjing90/article/details/8737279

http://stackoverflow.com/questions/1001404/check-if-unmanaged-dll-is-32-bit-or-64-bit

http://stackoverflow.com/questions/495244/how-can-i-test-a-windows-dll-to-determine-if-it-is-32bit-or-64bit

http://stackoverflow.com/questions/480696/how-to-find-if-a-native-dll-file-is-compiled-as-x64-or-x86

http://superuser.com/questions/358434/how-to-check-if-a-binary-is-32-or-64-bit-on-windows

https://msdn.microsoft.com/en-us/windows/hardware/gg463119.aspx  微软PE和COFF规范8.3  更新:2013年2月6日

 

2楼XiaoFaye
可以直接用LoadLibrary读取吗?应该会有相关信息返回的。
1楼AlanWang
net的程序可以用reflactor看,framework版本都能看到
Re: 中国蓝天
@AlanWang,只是想判断一下是否是32位和64位,用记事本就可以不用安装其他任何软件。,就是.NET的麻烦点,不清楚anycpu和X86唯一区别的32BIT = 1存在那个位置。,@XiaoFaye,没有试过。