Author Topic: Need a way of finding the last comm ports added (via USB)  (Read 18245 times)

GlennP

  • Frequent Contributor
  • ****
  • Posts: 141
Need a way of finding the last comm ports added (via USB)
« on: February 24, 2012, 09:29:36 am »
Hi All,
The project I have been involved with for a few weeks is coming to a conclusion and I have a few issues.  Firstly with USB comm ports is it (easy) to tell if one has been added using GetPortNames() I can see a way of using the data that returned and comparing it to a previous list and seeing any change i.e. a list of COM1, COM3 & COM8 if I run the test again COM9 appears, is reasonable to assume this is the item or is there a betterway of doing it? Also should this question be in USB or Serial Ports? (it is about how USB emulates serial)

Glenn   

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Need a way of finding the last comm ports added (via USB)
« Reply #1 on: February 24, 2012, 10:14:01 am »
Yes, GetPortNames will show any new ports, and any previously existing ports will have the same numbers.

It's a Serial Port question.

Jan

GlennP

  • Frequent Contributor
  • ****
  • Posts: 141
Re: Need a way of finding the last comm ports added (via USB)
« Reply #2 on: February 24, 2012, 10:29:13 am »
Right Thanks for that