Problem

How can one test if a .dll is 32 bits (x86) or 64 bits (x64)?

Solution

Provide steps that the user can take to solve the problem. For example "The level 7 printer will flash red when it is out of paper. Add paper to tray 1".

Using Dependency Walker:
  1. Download DW from http://www.dependencywalker.com/ (no installation required).
  2. Launch depends.exe, go to File, click Open... and open the desired DLL file.
  3. In the Module section find the Module with the name of the DLL that you opened.
  4. The CPU column tells if the file was compiled for 32 bits or 64 bits.

Example with x64 libmysql.dll:

 

Using dumpbin (Visual Studio Tools):

  1. Start VS2013 x64 Native Tools Command Prompt or VS2013 x86 Native Tools Command Prompt.
  2. Execute dumpbin /headers filename.dll.
  3. Machine is displayed after FILE HEADER VALUES

Example with 32 bit libmysql.dll:

>dumpbin /headers libmysql.dll
...

FILE HEADER VALUES
14C machine (x86)

...

Related articles

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.

Related issues