在我的机器上,您请求的大部分信息都可以通过WMI获得。看看吧 Win32_PhysicalMemory 和相关的课程。
Win32_PhysicalMemory
例如,输出 wmic memorychip 在我的机器上是:
wmic memorychip
C:\>wmic memorychip Attributes BankLabel Capacity Caption ConfiguredClockSpeed ConfiguredVoltage CreationClassName DataWidth Description DeviceLocator FormFactor HotSwappable InstallDate InterleaveDataDepth InterleavePosition Manufacturer MaxVoltage MemoryType MinVoltage Model Name OtherIdentifyingInfo PartNumber PositionInRow PoweredOn Removable Replaceable SerialNumber SKU SMBIOSMemoryType Speed Status Tag TotalWidth TypeDetail Version 2 BANK 0 17179869184 Physical Memory 2133 1200 Win32_PhysicalMemory 64 Physical Memory ChannelA-DIMM0 12 Samsung 0 0 0 Physical Memory M471A2K43BB1-CPB 15741117 26 2133 Physical Memory 0 64 128 2 BANK 2 17179869184 Physical Memory 2133 1200 Win32_PhysicalMemory 64 Physical Memory ChannelB-DIMM0 12 Samsung 0 0 0 Physical Memory M471A2K43BB1-CPB 21251413 26 2133 Physical Memory 2 64 128
如上面的链接所示, FormFactor 12是SODIMM。
FormFactor
值得注意的是电压(你没有要求,但通常是有意义的)和电压 MemoryType ,其文档在MSDN上已经过时,而最近来自DMTF的SMBIOS文档包含DDR4枚举中的值。等等
MemoryType
因此,您可能不得不采用手动或多或少的方式查看SMBIOS表。看到: 如何使用WMI / C ++获取内存信息(RAM类型,例如DDR,DDR2,DDR3?)