//
CPU个数
m_ProcessorCount = Environment.ProcessorCount;
m_ProcessorCount = Environment.ProcessorCount;
// 获得物理内存
ManagementClass mc = new ManagementClass( " Win32_ComputerSystem ");
ManagementObjectCollection moc = mc.GetInstances();
foreach (ManagementObject mo in moc)
{
if (mo[ " TotalPhysicalMemory "] != null)
{
m_PhysicalMemory = long.Parse(mo[ " TotalPhysicalMemory "].ToString());
}
}