Checking COM Port Availability in C#
Posted
by Jim Fell
on Stack Overflow
See other posts from Stack Overflow
or by Jim Fell
Published on 2010-05-20T14:08:50Z
Indexed on
2010/05/20
14:10 UTC
Read the original article
Hit count: 297
Hello. My C# application populates a comboBox
with the COM ports found on the system. I would like the mark the COM ports that are in use as such. I know that I can use try
/ catch
blocks to attempt to open every COM port, but I was wondering if there is a more graceful way to do this. Perhaps using a WMI query? I am using Microsoft Visual C# 2008 Express Edition (.NET 2.0). Any thoughts or suggestions you may have would be appreciated. Thanks.
© Stack Overflow or respective owner