Home » Microsoft TechnologiesRSS

Serial Port Conflict

Hi....

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:

http://msdn.microsoft.com/en-us/library/system.io.ports.serialport_members(v=VS.90).aspx

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......

Regards,

Junaid Manzoor

 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter