Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
How to search all system ports in C#.Net...
I have to list all ports names in the combobox, how to proceed with this...??vinaya.kumar

I honestly have no idea. If nothing in the System.IO.Ports Namespace works, then I'd probably look at the registry.
Apparently, the GUID for the ports class is {4D36E978-E325-11CE-BFC1-08002BE10318}, so you could use that as a kicking off point.
Also, this PC has one COM port, and it's listed in the registry as
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\ACPI\PNP0501\1I assume a second COM port would be listed as. . . \PNP0501\2It's not perfect (I'm not sure how Win9X saves its port information), but it might be your best bet.NOTE: C/C++ documentation I found suggests you let the user type it in, then attempt to open it. If the open fails, you inform the user to type in a new port.

![]() |
Saving the image in MS-Ac...
|
software help
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |