-
Nov 1st, 2009, 11:55 AM
#1
[RESOLVED] Determining Architecture of OS (x86 or x64)
When trying to determine the Architecture of an OS, I ran across IntPtr.
From reading the documentation, I saw this:
The IntPtr type is designed to be an integer whose size is platform-specific. That is, an instance of this type is expected to be 32-bits on 32-bit hardware and operating systems, and 64-bits on 64-bit hardware and operating systems.
Since the size of IntPtr is intended to be the size of the architecture, would it be feasible to test the size and determine the OS by that? Or is there a better way?
I was thinking there might also be a way via WMI, but I don't want to use that for compatibility reason.
CodeBank contributions: Process Manager, Temp File Cleaner
Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
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
|