PORTS Forum

Ports and Interfaces => Serial Ports => Topic started by: GlennP on February 24, 2012, 09:29:36 am

Title: Need a way of finding the last comm ports added (via USB)
Post by: GlennP 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   
Title: Re: Need a way of finding the last comm ports added (via USB)
Post by: Jan Axelson 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
Title: Re: Need a way of finding the last comm ports added (via USB)
Post by: GlennP on February 24, 2012, 10:29:13 am
Right Thanks for that