C#中通过WMI的Win32_CDROMDrive对象获取光驱信息简介

1、简介

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


2、属性

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

    Availability
    Capabilities
    CapabilityDescriptions
    Caption
    CompressionMethod
    ConfigManagerErrorCode
    ConfigManagerUserConfig
    CreationClassName
    DefaultBlockSize
    Description
    DeviceID
    Drive
    DriveIntegrity
    ErrorCleared
    ErrorDescription
    ErrorMethodology
    FileSystemFlags
    FileSystemFlagsEx
    Id
    InstallDate
    LastErrorCode
    Manufacturer
    MaxBlockSize
    MaximumComponentLength
    MaxMediaSize
    MediaLoaded
    MediaType
    MfrAssignedRevisionLevel
    MinBlockSize
    Name
    NeedsCleaning
    NumberOfMediaSupported
    PNPDeviceID
    PowerManagementCapabilities
    PowerManagementSupported
    RevisionLevel
    SCSIBus
    SCSILogicalUnit
    SCSIPort
    SCSITargetId
    SerialNumber
    Size
    Status
    StatusInfo
    SystemCreationClassName
    SystemName
    TransferRate
    VolumeName
    VolumeSerialNumber

阅读更多
个人分类: C#
上一篇C#获取当前主机硬件信息
下一篇Win32_VideoController 显卡 参数说明
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭