views:

84

answers:

4

In windows,how do we identify whether a file is 64 bit or 32 bit?

A: 

You can open it with Dependancy Walker, it displays a "64" sign on the icon if it is a 64 bit dll/exe:

alt text

CharlesB
And you want to run this and screenscrape the result? Sounds like a bad solution.
leppie
It is not mentioned that the OP wanted a programmatic solution, and no language is specified, so I assume it is a satisfying solution
CharlesB
A: 

Check out this link: http://support.microsoft.com/kb/827218

harishtps
This KB is for determining wether the OS is 32 bit or 64 bit, not an exe/dll
CharlesB
A: 

TrID is what you're looking for.

Gaius
+1  A: 

[serverfault.com]This might help, which points [stackoverflow.com] to this. Second link is probably of more use - the accepted answer looks to be a C# solution to your problem.

Kogitsune