Active port
1. If, by "active", you mean that the com port exists, then one simple way (without resorting to low-level code) to determine the active com ports of a system is to call CreateFile() using "COMn" as the name of the file to create (where n is an integer from 1 through the max number of com ports you anticipate is available on that machine). 2.