There are several ways to list serial ports under Windows but I'm not sure what is the proper way: the way that does detect all serial ports that are available.
One good code example is http://www.naughter.com/enumser.html - where there are 9 (nine!) ways of enumerating serial devices.
The question is: what is the optimal way of doing it.
Requirements:
- to not open ports in order to check if they are available.
- to be able to detect ports with different names than
COMx
. - to work on Windows XP SP2 or above