Archive

Posts Tagged ‘64 bit’

How to determine programmatically whether your application and OS are 32 or 64-bit

September 22, 2012 1 comment

First of all, we must clear up a misconception. Some people want to programmatically determine whether the underlying processor in use is 32 or 64 bit. This is a misnomer, as modern Intel and AMD processors can and do run in both 32 and 64 bit modes, in addition there are considerations of cache width, bus width and so on. There is no “true, pure” 64-bit processor, therefore trying to determine this information is non-sensical.

You can, however, determine if you are running a 32 or 64 bit Windows environment, and whether your application is built as a 32-bit or 64-bit executable. Obviously, you should know the latter at compile time, but it can occasionally be able to know at run time too. Here is the code:

Read more…

Advertisements
Categories: Windows Development Tags: , ,
%d bloggers like this: