Virtual vs Physical Serial Port

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 :

  1. Do all physical serial ports use serial as their functional driver?
  2. Is it possible for a virtual serial port to use serial?
  3. 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

Why does it matter? One way to distinguish between a virtual and
physical port would be to see if there are any i/o resources assigned to
the device, but do you consider a usb serial port virtual? Also for
certain multiport serial cards like rocket, they enumerate (at least
they used to) a PDO for each COM port, but each PDO does not have any hw
resources assigned to it, they use the parent’s resources which means
that this would fail the “is physical” test if you check for hw
resources being assigned…which leads me back to my first
question…why do you care?

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Tuesday, July 31, 2007 5:07 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Virtual vs Physical Serial Port

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 :

  1. Do all physical serial ports use serial as their functional driver?
  2. Is it possible for a virtual serial port to use serial?
  3. 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_R
EVISION_A-0484”
%Socket-12F8.DeviceDesc% = ComPort,
“PCMCIA\SOCKET_COMMUNICATIONS_INC-SOCKET_IO_PCMCIA_SERIAL_PORT_ADAPTER_R
EVISION_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_S
YSTEM_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


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

If virtual serial port is properly implemented - then the task is
impossible.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

wrote in message news:xxxxx@ntdev…
>
> 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 :
>
> 1. Do all physical serial ports use serial as their functional driver?
> 2. Is it possible for a virtual serial port to use serial?
> 3. 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_R
EVISION_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
>
>
>

You cannot determine that a port *is not* physical by looking at the
resources assigned to the DevNode (as Doron pointed out).

But really, a serial port is an attachment interface for something else.
Perhaps you ought to be asking ‘is the thing attached’ what you are
expecting?

What is the reason you are trying to distinguish the nature of the port? Is
it to filter out ports that cannot be used for some specific attachment
purpose?

You say your have been “stuck with this problem” but perhaps you have not
really said what the problem actually is. As Maxim has pointed out, a
(properly implemented) virtual port is indistinguishable from a non-virtual
serial port (whatever that is!). Perhaps if you describe the real problem
and not how you have tried to solve it (distinguish serial ports based on
percieved real/virtual) then there may be another approach.

David R. Cattley
Consulting Engineer
Systems Software Development

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Wednesday, August 01, 2007 6:08 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Virtual vs Physical Serial Port

If virtual serial port is properly implemented - then the task is
impossible.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

wrote in message news:xxxxx@ntdev…
>
> 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 :
>
> 1. Do all physical serial ports use serial as their functional driver?
> 2. Is it possible for a virtual serial port to use serial?
> 3. 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_REVIS
ION
_A-0484”
> %Socket-12F8.DeviceDesc% = ComPort,
“PCMCIA\SOCKET_COMMUNICATIONS_INC-SOCKET_IO_PCMCIA_SERIAL_PORT_ADAPTER_REVIS
ION
_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_SYSTE
M_R
EVISION_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
>
>
>


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

First I would like to thank you all for the replies.

A usb serial would be considered to be physical. What i meant by virtual is - serials ports that are emulated by software and that have no corresponding physical hardware.

Reason why i want to do this:
I am working on a product which would clone a physical machine to a virtual machine. Now during the cloning process only the physically present serial ports need to be considered.

I am trying to figure out a way to distinguish between them with a good probability. What I mean by good probability is that - Its okay to sometimes assume a virtual serial port as physical, but not the other way around. Is there any method to do this?

Thanks
Vaishnav

What about a list of PnP device IDs that match either known ‘physical’ (by
your definition) or known ‘virtual’ coupled with the suggestion (I think
from Doron) to look at the resources allocated to the devnode. You might
extend that to look at resources allocated to the parent (grand-parent) etc.
to try to determine if the device was enumerated from something that looks
like hardware.

There as still some, however, that will be problematic. Do you, for
instance, consider a Bluetooth COM port virtual or physical? Depending on
the vendor of the Bluetooth stack, it might be enumerated from a parent with
hardware resources or not.

And what about a controllerless modem? Is that a ‘virtual’ or ‘physical’
serial port?

You still have not really said what the rational is for assigning a port to
either virtual or physical. You did surely explain what process is going on
(scraping a real machine into a VM) but what is the ultimate goal of the
serial port handling? What is the reason you have such a criteria in the
first place. You are trying to ‘replicate’ some quality of the original
(real) machine in the VM but that is still not very clear.

-dave

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Wednesday, August 01, 2007 6:03 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Virtual vs Physical Serial Port

First I would like to thank you all for the replies.

A usb serial would be considered to be physical. What i meant by virtual is

  • serials ports that are emulated by software and that have no corresponding
    physical hardware.

Reason why i want to do this:
I am working on a product which would clone a physical machine to a virtual
machine. Now during the cloning process only the physically present serial
ports need to be considered.

I am trying to figure out a way to distinguish between them with a good
probability. What I mean by good probability is that - Its okay to sometimes
assume a virtual serial port as physical, but not the other way around. Is
there any method to do this?

Thanks
Vaishnav


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

OMG!!! There are so many devices that I dint know of. I had to look up what a controllerless modem meant after you mentioned it. Let me rephrase my definition of virtual and physical a bit so that it would be easier to explain. All the serial ports are listed under the registry key “HKLM\Hardware\DeviceMap\SerialComm”. I believe all serial ports present make an entry under this. If any of the devices you mentioned do not, then I can just ignore that. Of these ports listed under the key, the one which has a physical hardware associated with it are “Physical Serial Port” and the ones emulated by software are “Virtual Serial Port”. The serial ports on the Virtual machine after cloning could be used for any purpose. Similar to the serial ports present on a real machine. I have been learning about all these for the past 2-3 weeks only. So please correct me if I am wrong anywhere.

Thanks
Vaishnav

I feel like I am interogating you!

I mentioned a specific case, Bluetooth. Clearly, it has hardware associated
with it just (as was pointed out) a USB Serial Port has ‘hardware’
associated with it. However, the hardware assocation may be indirect (and
undetectable)in some cases. The point of me asking *why* the VM migration
is sensitive to these operations was to determine just what quality of the
serial port you are trying to detect/preseve.

For instance: Clearly, a PCI modem card that exposes a serial port and
registers in HKLM.…\SerialCom (as all of them do) is of no interest to the
virtual machine if you were thinking that it could have a (insert seriallly
attached device of choice, scanner? Voltmeter? Serial controlled toaster?)
connected to it. It can only ever have the modem controller attached to it.
That does not make it any less of a serial port nor does it make it virtual.
Indeed, some PCI modems have SERIAL.SYS creating the FDO and some older (ok,
wicked old ISA devices) might just look like *PNP50x serial ports. But you
can not attach anything to them other than the modem controller that is
soldered onto the card next to the serial port ASIC.

The same situation is true of a USB modem, a Bluetooth Modem, a Cell Phone
that is attached via Bluetooth, a PDA attached via USB emulating a serial
port, an IRDA device, the list goes on and on and on. Heck, there are all
sorts of crazy things that enumerate as serial ports - with and without
hardware.

So let me ask one more time (really, only one more time): What is it the VM
expects to do with the serial port after you migrate it into the VM? I can
only think of two possible things:

  1. Connect to the same device attached to the original serial port in the
    phyiscal machine.
  2. Allow the VM to connect to a serial port resource so that an attached
    device can be used by the VM.

Case (1) is hard since duplicating the other qualities of the port (as in a
modem or other embedded serial port) could be quite challenging.

Case (2) is blisteringly simple. It does not matter. The assumption is
that it is just a serial port and the VM does not (should not?) care what is
attached.

Maybe what you are asking is simply achieved in the trivial case by looling
for *PNP50x and only mapping those ports. Do you care about multiport
serial cards that act as virtual bus enumerators or are you only trying to
solve the simple case of BIOS enumerated (aka, legacy) serial ports?

Cheers,
-dave

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Wednesday, August 01, 2007 6:59 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Virtual vs Physical Serial Port

OMG!!! There are so many devices that I dint know of. I had to look up what
a controllerless modem meant after you mentioned it. Let me rephrase my
definition of virtual and physical a bit so that it would be easier to
explain. All the serial ports are listed under the registry key
“HKLM\Hardware\DeviceMap\SerialComm”. I believe all serial ports present
make an entry under this. If any of the devices you mentioned do not, then I
can just ignore that. Of these ports listed under the key, the one which has
a physical hardware associated with it are “Physical Serial Port” and the
ones emulated by software are “Virtual Serial Port”. The serial ports on the
Virtual machine after cloning could be used for any purpose. Similar to the
serial ports present on a real machine. I have been learning about all these
for the past 2-3 weeks only. So please correct me if I am wrong anywhere.

Thanks
Vaishnav


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

David,

Thank you for your patience in explaining things in such detail to me. I get the point now.

Coming to the point to what the VM does with the serial port, its the second case you mentioned.
“It does not matter. The assumption is that it is just a serial port and the VM does not care what is attached.”

My only task is to find serial ports that are physical and not the one emulated by software. If its a impossible, then any solution that would be as close as possible. My only constraint is that if i am not sure then i can pass a virtual as a physical serial port, but not the other way. ie. I have to be 100% that a port is virtual. If i am not, I will have to consider it as physical.

When a real machine contains a multi port serial card, it creates the same number of individual serial ports in the VM instead of a multi port serial port. Hence yes, I do care about multi port serial card.

Thank for your help and patience.

Vaishnav

Well then it is perhaps most accurate and straightforward to simply compile
a list of PnP IDs for known Virtual Ports that you are *sure* of and
discriminate based on the PnP ID being in the list. Because of your
constraint, it would not be possible to consider a port with no assigned
resources as ‘virtual’ since there physical ports that are enumerated
without resources (some multiport cards).

Good Luck,
Dave Cattley
Consulting Engineer
System Software Development

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Thursday, August 02, 2007 2:50 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Virtual vs Physical Serial Port

David,

Thank you for your patience in explaining things in such detail to me. I get
the point now.

Coming to the point to what the VM does with the serial port, its the second
case you mentioned.
“It does not matter. The assumption is that it is just a serial port and the
VM does not care what is attached.”

My only task is to find serial ports that are physical and not the one
emulated by software. If its a impossible, then any solution that would be
as close as possible. My only constraint is that if i am not sure then i can
pass a virtual as a physical serial port, but not the other way. ie. I have
to be 100% that a port is virtual. If i am not, I will have to consider it
as physical.

When a real machine contains a multi port serial card, it creates the same
number of individual serial ports in the VM instead of a multi port serial
port. Hence yes, I do care about multi port serial card.

Thank for your help and patience.

Vaishnav


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer