using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using System.Management;
namespace MyProcessor
{
static class Processor
{
static ManagementObjectSearcher MOS = new ManagementObjectSearcher("SELECT * FROM Win32_Processor");
public static string GetProcessID()
{
string id="";
foreach (ManagementObject MO in MOS.Get())
{
id = MO["ProcessorID"].ToString();
break;
}
return id;
}
public static string GetProcessAddress()
{
string id="";
foreach (ManagementObject MO in MOS.Get())
{
id = MO["ProcessAddress"].ToString();
break;
}
return id;
}
}
}