List of SerialPorts queried using WMI differs from devicemanager?

后端 未结 4 1038
深忆病人
深忆病人 2020-12-17 19:37

I have the following serial ports listed in my devicemanager:

  • COM3
  • COM4 (BT)
  • COM5 (BT)
  • COM6 (GlobeTrotter MO67xx - Control Interface
4条回答
  •  旧巷少年郎
    2020-12-17 19:49

    The Win32_SerialPort class used in this article reports the physical com ports, if you wanna enumerate all the serial ports including the USB-Serial/COM ports, you must use the MSSerial_PortName class located in the root\wmi namespace.

    Also try these classes located in the same namespace

    • MSSerial_CommInfo
    • MSSerial_CommProperties
    • MSSerial_HardwareConfiguration
    • MSSerial_PerformanceInformation

    Note : If you want to know the properties and methods of this class you can use the WMI Delphi Code Creator.

提交回复
热议问题