Bitness of windows binary




DumpBin is used to find out whether a binary is 32 bit or 64 bit.
DumpBin is to display binary file information, this tool is part of visual studio

dumpbin /headers secur32.dll
Output would contain
=======================
Microsoft (R) COFF/PE Dumper Version 12.00.30723.0
Copyright (C) Microsoft Corporation.  All rights reserved.

Dump of file secur32.dll
PE signature found

File Type: DLL

FILE HEADER VALUES
             14C machine (x86)      ( this is 32 binary)
               6 number of sections
        54503D8B time date stamp Tue Oct 28 21:06:19 2014
               0 file pointer to symbol table
               0 number of symbols
              E0 size of optional header
            2102 characteristics
                   Executable
                   32 bit word machine                  DLL
=========================================
For 64 bit output would be

========================================
Microsoft (R) COFF/PE Dumper Version 12.00.30723.0
Copyright (C) Microsoft Corporation.  All rights reserved.
Dump of file secur32.dll
PE signature found
File Type: DLL

FILE HEADER VALUES
            8664 machine (x64) ( this is 64 bit binary)
               7 number of sections
        54504306 time date stamp Tue Oct 28 21:29:42 2014
               0 file pointer to symbol table
               0 number of symbols
              F0 size of optional header
            2022 characteristics
                   Executable
                   Application can handle large (>2GB) addresses                    DLL
============================================================



Easy way to check bitness of binary in windows.

DownLoad dependency walker tool.
Open your binary in tool (File ->open option)
For 64 bit binary, you would see value as 64. which says the binary is 64 bit.