Click here to Skip to main content
15,912,205 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Can anybody tell me how to capture the available port in my local machine, which should match with my device manager.
Posted

You can use SerialPort.GetPortNames[^] which returns array of serial port names for the current computer.
 
Share this answer
 
Comments
Espen Harlinn 24-Feb-11 4:04am    
Nice and simple - my 5
Do you mean scan for open ports? If so you'd have to try connecting to each port one by one.

I am not sure what you mean by "match with device manager".
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900