How I can get informaiton about CPU

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using VC++.NE
How I can get information about CPU in the local machine and in remote

thank yo
 
You can use WMI - the System.Management namespace in .NET framework

Try the following code

using System
using System.Management

namespace ConsoleApplication

class Class

[STAThread
static void Main(string[] args

string ConfigNamespace = @"\\.\root\cimv2"
string query = "select * from Win32_Processor"

ManagementObjectSearcher searcher = ne
ManagementObjectSearcher( ConfigNamespace, query );

ManagementObjectCollection collection = searcher.Get()

foreach (ManagementObject item in collection

foreach (PropertyData property in item.Properties

tr

Console.WriteLine(property.Name + ":" + property.Value.ToString())

catch (Exception
 
Back
Top