I do it by iterating through each possible COM port attempting to open each
one in turn. Something like this:
FOR nPort = 1 to MaxPorts
Attempt to open COM<nPort>
IF (it succeeded)
Add nPort to list of available ports
Close COM<nPort>
ENDIF
ENDFOR
"rollasoc" <ho*****@hotmail.com> wrote in message
news:uV**************@TK2MSFTNGP10.phx.gbl...
Hi,
I've worked out how to find the 2 COM Ports on my motherboard ok, using
System.Management namespace and looking for Win32_SerialPort.
Problem now, is I have 3 COM Ports on USB connections, but can't seem to
find a way to query for them.
Any suggestions?
rollasoc