Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / March 2006

Tip: Looking for answers? Try searching our database.

Finding Processor

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
source - 16 Mar 2006 20:41 GMT
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
Chris Mullins - 17 Mar 2006 00:39 GMT
> 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.

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

Signature

Chris Mullins

Phil Wilson - 17 Mar 2006 00:59 GMT
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.
Signature

Phil Wilson [MVP Windows Installer]
----

> 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.
[quoted text clipped - 3 lines]
> thank you,
> source
source - 17 Mar 2006 10:11 GMT
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

> 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
[quoted text clipped - 9 lines]
>> thank you,
>> source

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.