检查文件是 32 位还是 64 位 - 在 Windows 上
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2689168/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Checking if file is 32bit or 64bit - on Windows
提问by stiank81
I'm compiling a program on my 64bit machine, but I'm not sure if it produces 32-bit or 64-bit output.. How can I check if a file is 32bit or 64bit on Windows?
我正在我的 64 位机器上编译一个程序,但我不确定它是生成 32 位还是 64 位输出。如何在 Windows 上检查文件是 32 位还是 64 位?
采纳答案by Jim B
You can use GNUfilefor windows.
You can run the app thru PEIDLastly (and preferred- less room for error)
With either Visual Studio C++ (at least express edition minimum) or the Platform SDKinstalled you can use dumpbin /headers to look at the PE header values.
您可以将GNUfile用于 Windows。
您可以通过PEID最后运行应用程序(和首选的错误空间) 使用 Visual Studio C++(至少是 Express 版本最低)或安装了Platform SDK,您可以使用 dumpbin /headers 查看 PE 标头值。
The first value in the file header tells you the architecture: either 0x14C for x86 or 0x8664 for x64
文件头中的第一个值告诉您架构:x86 为 0x14C 或 x64 为 0x8664
回答by Stefan Schultze
Just run it and have a look at the Processes tab in Windows Task Manager. If there is a *32 suffix after the process name, it's 32-bit, otherwise it's 64-bit (provided you're on a 64-bit OS).
只需运行它并查看 Windows 任务管理器中的进程选项卡。如果进程名称后有 *32 后缀,则为 32 位,否则为 64 位(前提是您使用的是 64 位操作系统)。
回答by Frank Meulenaar
You could run the 'file' command from linux in a cygwin environment to test.
您可以在 cygwin 环境中从 linux 运行“文件”命令进行测试。
You could also place some debug statement like 'print sizeof(int)' (schematically) to check.
您还可以放置一些调试语句,例如“print sizeof(int)”(示意性地)进行检查。
回答by drkh
You may use EXE Explorerby MiTec, a small free tool. It also displays many other properites of the binary file it checks.
您可以使用MiTec 的EXE Explorer,这是一个免费的小工具。它还显示它检查的二进制文件的许多其他属性。
I had the same question as the original poster and the EXE Explorerworks for me quite well.
我和原来的海报有同样的问题,EXE Explorer对我来说效果很好。
回答by gavenkoa
http://ntinfo.biz/- Detect It Easy.
http://ntinfo.biz/- 轻松检测。
Or just GNU Binutils objdump -f my.exe
或者只是 GNU Binutils objdump -f my.exe