Home » Microsoft TechnologiesRSS

Serial Port Conflict


I have an issue related to serial port opening. when i run my software it gives me an error "serial port does not exit or already opened".

I have two questions. 1.can i check which program is using com port.

And how can i close serial port that is already being used.Using Windows7



2 Answers Found


Answer 1

Assuming that you are using the .NET SerialPort class in your application, think about instantiating the class in a try block, so failures can be handled by your applcation.

Check here for useful properties and methods:


As far as closing a serial  port is concerned, unless your application successfully opened  it, don't. In a multitasking OS, an application that tries to take resources in use will not be well received.


Answer 2

Thanx a lot for your guide......


Junaid Manzoor


<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter