c# 获取内存信息

 ManagementObjectSearcher s = new ManagementObjectSearcher(" SELECT * FROM Win32_MemoryDevice");
            foreach (ManagementObject mm in s.Get())
            {
                foreach (PropertyData pd in mm.Properties)
                {
                 //
                };

            }

-*-----------------------------------

instance of Win32_MemoryDevice
{
Caption = "Memory Device";
CreationClassName = "Win32_MemoryDevice";
Description = "Memory Device";
DeviceID = "Memory Device 0";
EndingAddress = "2097151";
Name = "Memory Device";
StartingAddress = "0";
SystemCreationClassName = "Win32_ComputerSystem";
SystemName = " ";
};



instance of Win32_MemoryDevice
{
Caption = "Memory Device";
CreationClassName = "Win32_MemoryDevice";
Description = "Memory Device";
DeviceID = "Memory Device 1";
EndingAddress = "4194303";
Name = "Memory Device";
StartingAddress = "2097152";
SystemCreationClassName = "Win32_ComputerSystem";
SystemName = " ";
};


**********************************************

 SELECT * FROM  Win32_PhysicalMemory 



instance of Win32_PhysicalMemory
{
BankLabel = "BANK 1";
Capacity = "2147483648";
Caption = "Physical Memory";
CreationClassName = "Win32_PhysicalMemory";
DataWidth = 64;
Description = "Physical Memory";
DeviceLocator = "DIMM1";
FormFactor = 8;
InterleaveDataDepth = 1;
InterleavePosition = 2;
Manufacturer = "0000";
MemoryType = 0;
Name = "Physical Memory";
PartNumber = "SHARETRONIC           ";
SerialNumber = "E5EE0401";
Speed = 1333;
Tag = "Physical Memory 0";
TotalWidth = 64;
TypeDetail = 128;
};



instance of Win32_PhysicalMemory
{
BankLabel = "BANK 2";
Capacity = "2147483648";
Caption = "Physical Memory";
CreationClassName = "Win32_PhysicalMemory";
DataWidth = 64;
Description = "Physical Memory";
DeviceLocator = "DIMM2";
FormFactor = 8;
InterleaveDataDepth = 1;
InterleavePosition = 1;
Manufacturer = "Kingston";
MemoryType = 0;
Name = "Physical Memory";
PartNumber = "ACR256X64D3U13C9G     ";
SerialNumber = "611C4377";
Speed = 1333;
Tag = "Physical Memory 1";
TotalWidth = 64;
TypeDetail = 128;
};


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值