The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,442 other followers

How to check if a binary is 32 or 64 bit on Windows? – Super User

Posted by jpluimers on 2018/08/17

It seems there are a few, but only loading the binary is the sure method to know what the process will be using: [WayBackHow to check if a binary is 32 or 64 bit on Windows? – Super User and [WayBack] How do I determine if a .NET application is 32 or 64 bit? – Stack Overflow.

Details in the answers of these questions, here are a few highlights:

  • The first few characters in the binary header reveal what it was originally designed for.
  • A .NET executable might still have an x64 header for bootstrapping.
  • The Windows SDK has a tool dumpbin.exe with the /headers option.
  • You can use sigcheck.exe from SysInternals.
  • The file utility (e.g. from cygwin, which comes with msysgit) will distinguish between 32- and 64-bit executables.
  • Use the command line 7z.exe on the PE file (Exe or DLL) in question which gives you a CPU line.
  • Virustotal File detail is a way to find out if a binary is 32 bit or 64 bit.
  • Even an executable marked as 32-bit can run as 64-bit if, for example, it’s a .NET executable that can run as 32- or 64-bit. For more information see https://stackoverflow.com/questions/3782191/how-do-i-determine-if-a-net-application-is-32-or-64-bit, which has an answer that says that the CORFLAGS utility can be used to determine how a .NET application will run.

–jeroen

Search terms: win64, win32, x64, x86_64, x86

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

 
%d bloggers like this: