--
Ciao, Paul D. DeRocco
Paul mailto:pder...@ix.netcom.com
You can use QueryDosDevice to retrieve the device paths for each COMn
ports as well as LPTn ports. Check it one at a time. For COM ports,
there can be up to 256 ports (COM1 to COM256). Each can be in any COM
port number, so three COM ports can be COM4, COM11 and COM200.
Then use the names got from SetupDiGetDeviceInterfaceDetail, instead of the ancient-style COM%d names. You can also get the human-readable description for each port, which IIRC contains the sacred "COM1" string.
--
Maxim S. Shatskih
Windows DDK MVP
ma...@storagecraft.com
http://www.storagecraft.com
"Paul D. DeRocco" <pder...@ix.netcom.com> wrote in message news:O4OJBAG$JHA....@TK2MSFTNGP03.phx.gbl...
That seems to do it, although I seem to have a mysterious permanent COM3
that isn't listed in Device Manager. But HyperTerminal sees it too, so I
guess it's some virtual device and not a bug. Thanks.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Paul D. DeRocco" <pder...@ix.netcom.com> wrote in message
news:eBpCZQm$JHA....@TK2MSFTNGP02.phx.gbl...