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

相关文章
相关标签/搜索