|
-
Dec 3rd, 2003, 01:19 PM
#1
Thread Starter
Member
How to determine if in Windows 64bit version?
Hi,
I'm writing an app that deals with very large numbers. Now for one method, I would like to use the unsigned long (UInt64). But as this datatype is 64bits, it cannot be used when the CPU is in 32bits mode (like 32bits operating systems do). The maximum value (which is approx. 18,400,000,000,000,000,000) is too large for 32bits processors to compute with. (However the maximum value of the signed long (Int64) is half that of the UInt64 and therefore 32bits processors can deal with them.)
So now I would like to build a sort of 'check' that can tell the app if the processor is in 32bits or in 64bits mode or a smart check that can tell the app if the current OS is 32bits or 64bits.
I first thought that it could be usefull to get the Windows version that is running on the machine, but this is not, as Microsoft has 32bits and 64bits versions of the same Windows version.
For example: Windows XP (32bits) and Windows XP 64-bit use the same major-minor versions: 5.1. So that's not an option.
If anyone can tell me how to do this, I will be very thankfull!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|