开发者

Visual Studio equivalent of Unix 'file' command

I'm new to Windows programming, and I'm looking for an equivalent of the Unix 'file' command that I can run on compiled objects (including .lib files and exec开发者_JS百科utables) to discover with what bitness they were compiled. For example, on my Mac I can run:

    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

Is there any command I can run to inspect compiled objects on Windows? Maybe part of Visual Studio?


For managed binaries you can use the corflags command. It will dump out similar information for managed binaries

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


As Luke suggested, dumpbin was the right command. Specifically, dumpbin /headers will show a bunch of information about the binary.

Thanks, Luke!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜