C#中通过WMI的Win32_MemoryDevice对象获取内存信息简介

1、简介
      在WMI中,通过Win32_Processor对象可以获取磁盘驱动器的相关信息:
      ManagementClass mc = new ManagementClass("Win32_MemoryDevice");
      ManagementObjectCollection moc = mc.GetInstances();
      foreach (ManagementObject mo in moc)
      {
            propertyInfo = mo.Properties[PropertyName].Value.ToString();

      }


2、属性

       在WMI中Win32_MemoryDevice对象的属性如下:

    Access
    AdditionalErrorData
    Availability
    BlockSize
    Caption
    ConfigManagerErrorCode
    ConfigManagerUserConfig
    CorrectableError
    CreationClassName
    Description
    DeviceID
    EndingAddress
    ErrorAccess
    ErrorAddress
    ErrorCleared
    ErrorData
    ErrorDataOrder
    ErrorDescription
    ErrorGranularity
    ErrorInfo
    ErrorMethodology
    ErrorResolution
    ErrorTime
    ErrorTransferSize
    InstallDate
    LastErrorCode
    Name
    NumberOfBlocks
    OtherErrorDescription
    PNPDeviceID
    PowerManagementCapabilities
    PowerManagementSupported
    Purpose
    StartingAddress
    Status
    StatusInfo
    SystemCreationClassName
    SystemLevelAddress
    SystemName


你可能感兴趣的:(Windows学习,C#学习)