02-20-2007 05:53 PM
02-21-2007 12:54 AM
Hello jorgeluis…
I do not know a "direct" solution to your question. But I have my own way of doing it.
You can -in a loop for example- call OpenComConfig for ports from 1 to 32 (or another limit that gives you confidence that you covered all possible port numbers). Then, record the port numbers for which the function returned successfully. These are ports that you have on your system.
You may want to call CloseCom after successfully opened port if your code opens them later when needed.
Hope this helps.
02-21-2007 01:45 AM
02-21-2007 01:58 AM
Thanks to Roberto and Bilal for the "real" solution.
I do not need my workaround anymore 🙂
02-21-2007 09:10 AM