windows - Visual Studio 相当于 Unix 'file' 命令

标签 windows visual-studio 32bit-64bit

我是 Windows 编程新手,我正在寻找相当于 Unix"file"命令的命令,我可以在编译对象(包括 .lib 文件和可执行文件)上运行该命令,以发现它们的编译位数。例如,在我的 Mac 上我可以运行:

    file /usr/bin/python
    /usr/bin/python: Mach-O universal binary with 3 architectures
    /usr/bin/python (for architecture x86_64):  Mach-O 64-bit executable x86_64
    /usr/bin/python (for architecture i386):    Mach-O executable i386
    /usr/bin/python (for architecture ppc7400): Mach-O executable ppc

我可以运行任何命令来检查 Windows 上的编译对象吗?也许是 Visual Studio 的一部分?

最佳答案

对于托管二进制文件,您可以使用 corflags command 。它将转储托管二进制文件的类似信息

C:\Users\jaredpar\winconfig> corflags .\Utils\Reflector\Reflector.exe
Microsoft (R) .NET Framework CorFlags Conversion Tool.  Version  4.0.30319.1
Copyright (c) Microsoft Corporation.  All rights reserved.

Version   : v1.0.3705
CLR Header: 2.0
PE        : PE32
CorFlags  : 9
ILONLY    : 1
32BIT     : 0
Signed    : 1

关于windows - Visual Studio 相当于 Unix 'file' 命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3411985/

相关文章:

qt - 使用 QMAKE 构建 32 位和 64 位版本的项目

ios - 32 位的应用程序可以在 64 位的 iPhone 5S 上运行吗?

c++ - 如何拖放文件?

visual-studio - 第二次运行脚本后,Powershell 无法覆盖持续错误?

visual-studio - Msbuild 15 包含未设置为 "do not copy"的配置文件

visual-studio - 如何在#light 模式下在 Visual Studio 2008 中缩进 F# 代码

windows - 以编程方式创建 Windows session

c# - 我有一个 C# Windows 窗体应用程序。能不能部署到web上,让用户通过web访问?

c - 如何在 C 中创建一个在父进程死亡后运行的进程?

c# - 有没有办法从托管 64 位代码加载 32 位 DLL,而不将托管代码降级到 32 位?