I need to write an application which would be able to distinguish between physical and virtual serial ports present on a system.
I have the following questions :
- Do all physical serial ports use serial as their functional driver?
- Is it possible for a virtual serial port to use serial?
- I read that PNP0500 and PNP0501 are the PNP ID/Hardware Id for standard COM port assigned by Microsoft. With this I assumed that all physical serial ports will have this as their PNP ID/Hardware ID. But when I checked the msport.inf file I found this:
; Drivers
;----------------------------------------------------------
[Manufacturer]
%Std%=Std
%HP%=HP
%TDC%=TDC
%Socket%=Socket
%DBC%=DBC
%Rockwell%=Rockwell
%Trimble%=Trimble
%Smart%=Smart
%SIIG%=SIIG
%Lava%=Lava
%Ericsson%=Ericsson
%Compaq%=Compaq
%Quatech%=Quatech
[Std]
%*PNP0400.DeviceDesc% = LptPort, *PNP0400 ; Printer Port
%*PNP0401.DeviceDesc% = EcpPort, *PNP0401 ; ECP Printer Port
%*PNP0500.DeviceDesc% = ComPort, *PNP0500, *PNP0501 ; Communications Port
%*PNP0501.DeviceDesc% = ComPort, *PNP0501, *PNP0500 ; Communications Port
%*PNP0502.DeviceDesc% = MultiComPort, *PNP0502 ; Multi Communications Port
; Compaq devices
%*CPQA0E0.DeviceDesc% = EcpPort, *CPQA0E0 ; ECP Printer Port
%*CPQA0D9.DeviceDesc% = ComPort, *CPQA0D9 ; Communications Port
[HP] ; Hewlett Packard devices
%MF\EISA_HWP1C10_DEV0.DeviceDesc% = ComPort, MF\EISA_HWP1C10_DEV0
%MF\EISA_HWP1C10_DEV1.DeviceDesc% = LptPort, MF\EISA_HWP1C10_DEV1
[TDC]
%TDC-37D0.DeviceDesc% = LptPort, “PCMCIA\TDC-TRANS_PC_CARD-37D0”
[Socket]
%Socket-0484.DeviceDesc% = ComPort, “PCMCIA\SOCKET_COMMUNICATIONS_INC-SOCKET_IO_PCMCIA_SERIAL_PORT_ADAPTER_REVISION_A-0484”
%Socket-12F8.DeviceDesc% = ComPort, “PCMCIA\SOCKET_COMMUNICATIONS_INC-SOCKET_IO_PCMCIA_SERIAL_PORT_ADAPTER_REVISION_B-12F8”
%Socket-5E3E.DeviceDesc% = ComPort, “PCMCIA\Socket_Communications_Inc-Serial_Port_Adapter_Revision_B-5E3E”
%SocketDual.DeviceDesc% = ComPort, MF\SOCKETDUAL_DEV0
%SocketDual.DeviceDesc% = ComPort, MF\SOCKETDUAL_DEV1
%Socket-0104-0001.DeviceDesc% = ComPort, “PCMCIA\socket-serial_port_card_rev_2.3-e88f”
%Socket-FA29.DeviceDesc% = NonPort, “PCMCIA\SOCKET_COMMUNICATIONS_INC-PAGECARD_REVISION_A-FA29”
%Socket-AF8A.DeviceDesc% = NonPort, “PCMCIA\SOCKET_COMMUNICATIONS_INC-SOCKET_GPS_PCMCIA_GLOBAL_POSITIONING_SYSTEM_REVISION_B-AF8A”
%Socket-66D0.DeviceDesc% = NonPort, “PCMCIA\SOCKET_COMMUNICATIONS_INC-MOBILE_GPS_REVISION_C-66D0”
Does this mean that standard physical serial ports have PNP ID as *PNP0500 and *PNP0501 and serial ports manufactured by compaq or HP will have a different PNP ID (something like *CPQA0D9 or MF\EISA_HWP1C10_DEV0)?
Are there any other properties that I could use to distinguish between a physical and virtual serial ports?
I have been stuck with this problem for a long long time and any help would be greatly appreciated!!
Thanks
Vaishnav