How to determine whether a file is 32 bit or 64 bit

    On Unix/Linux platform, 'file' instruction can be used.


    On Windows platform,  four methods are introduced as follows:

1) View exe/dll/ocx type file with CFF Explorer

    CFF Explorer is a Windows PE format file editor. Its web site is : http://www.ntcore.com/exsuite.php . Open the file with CFF Explorer, find 'File Type' line in right sub-window, the digital 32 or 64 in column 'Value' denotes the bits of the file.

Example: view a 32 bit exe file with CFF Explorer



Example: view a 64 bit exe file with CFF Explorer



2) View exe/ocx type file with the hex editor embedded in CFF Explorer

    A hex editor is embedded in CFF Explorer. Open a file with it, and view the file with the hex editor. If 'PE..L' is found (its corresponding hex value is '50 45 00 00 4C'), the file is 32 bit type. 

Example: view a 32 bit exe file with the hex editor embedded in CFF Explorer



    If 'PE..d' is found (its corresponding hex value is '50 45 00 00 64'), the file is 64 bit type. 

Example: view a 64 bit exe file with the hex editor embedded in CFF Explorer



3) View exe/dll/ocx type file with Dependency Walker

    Dependency Walker is a powerful tool. Its web site is : http://dependencywalker.com . Note that you must use the 64 bit version of Dependency Walker on 64 bit Windows OS.  The 64 bit version of Dependency Walker can be downloaded from its web site.



    Open a file with Dependency Walker, the value in column 'CPU' denotes the bit number of the file. 'x86' means the file is 32 bit type. 'x64' means the file is 64 bit type.

Example: view a 32 bit dll file in 64-bit Windows 7 (C:\Windows\SysWOW64\aaclient.dll) with Dependency Walker



Example: view a 64 bit dll file in 64-bit Windows 7 (C:\Windows\System32\aaclient.dll) with Dependency Walker



4) View lib/exe/dll/ocx type file with dumpbin.exe
    CFF Explorer and Dependency Walke cannot be used to view a lib type file. Only 'dumpbin.exe' can do this. 'dumpbin.exe' is a command line tool included in Visual Studio. To view the bit version of a file, use the instruction: 
    dumpbin /headers filename
    In 'FILE HEADER VALUES' section, '14C machine (x86)' denotes the file is 32 bit version, and '8664 machine (x64)' denotes the file is 64 bit version.
Example: view a 32 bit lib file with dumpbin



Example: view a 64 bit lib file with dumpbin


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值