title: How are COM ports derived and recorded on windows?
body: <p>I'm writing a device detection function for Windows (XP and greater) that needs to detect newly connected ports and return their VID/PID values.  But, I have absolutely no idea how COM ports on Windows are derived and recorded.  Looking through the system Registry it looks like Windows stores some information, such as the VID, PID and port ID (i.e. COM1 COM26).  Is that port unique to that device?  Or can multiple entries have the same port ID?</p>
  
  <p>Also, if anybody knows of a good and complete tutorial about windows COM ports it would be immensely appreciated.  thanks!!</p>