all groups > dotnet clr > march 2006 >
You're in the

dotnet clr

group:

Finding Processor


Finding Processor source
3/16/2006 11:41:55 AM
dotnet clr:
Is there a way I can find what CPU family my application is running on?
I am trying to find if the processor is a 64bit or 32bit.
Is there an API exposed in the framework?
Any help will be helpful.

thank you,
source

Re: Finding Processor Chris Mullins
3/16/2006 3:39:52 PM
[quoted text, click to view]

There's nothing out of the box, but Mentalis has a nice wrapper around the
Win32 interfaces.

http://www.mentalis.org/soft/class.qpx?id=13

--
Chris Mullins

Re: Finding Processor Phil Wilson
3/16/2006 3:59:07 PM
Do you want your app or the processor? Could be different. You can use
Marshal.Sizeof(IntPtr) to fnd out if your app is 32 bit or 64-bit. I thought
they were adding a NET class property someplace in 2.0 but I can't find it.
You can see if the processor is 32-bit or 64-bit by using the
ManagementObject and related classes to get to the WMI Win32_Processor
class, where the AddressWidth property is either 32 or 64.
--
Phil Wilson [MVP Windows Installer]
----
[quoted text, click to view]

Re: Finding Processor source
3/17/2006 1:11:59 AM
thanks Phil
System.Management solved my problem crudely.

Apprently I could not use Address width for my problem as I cannot
completely reply on Address Width
my guess is because as WOW processes are created on x64 machines if the OS
installed on a x64 machine is 32 bit.... the address width will be 32 and
not 64.(correct me if I am wrong)
So I had to go with the Name and find the value 64 within the name of the
processor.
If there is a better way please do let me know.

source

here is a WMI VBscript I found on the net
http://www.microsoft.com/technet/scriptcenter/scripts/hardware/basic/hwbavb03.mspx


[quoted text, click to view]

AddThis Social Bookmark Button