Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Testing the validity of a Com Port
Message
From
20/08/2008 09:36:01
 
 
To
19/08/2008 18:49:12
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01340243
Message ID:
01340359
Views:
9
Hi,

What do you mean by 'tries to connect'? The port is valid it should open OK whether or not a device is connected. AFAIK SerialPort.Open() throws an exception if the specified port is not valid.
Regards,
Viv

>I have a windows app that connects to devices via a com port. (Actually I use a serial emulator but it shows up as com 5). If I don't have the device plugged in or turned on when the application starts and tries to connect the application just appears to hang. Is there a way to test if the com port is a valid port before attempting to connect?
>Thanks
>Tim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform