954,492 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to check COM1 port already open or not

Hello,
Anybody can give me idea, How can i check COM port? I want to check, is it already open or not? if it is already open, just avoid to open the port.

Thanks.

jp071
Light Poster
29 posts since Aug 2009
Reputation Points: 4
Solved Threads: 0
 

Just try to open it -- if open files then its probably already opened (assuming COM1 exists and there are no hardware problems)

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

My problem is not exactly that. I have another software that run semultaniously. The software also can open the COM1 port. If it opened, my program do not need to open COM1 port. Then Just i want to read data from the port.

jp071
Light Poster
29 posts since Aug 2009
Reputation Points: 4
Solved Threads: 0
 

If the COM1 port is in use by an other process, this resource is locked by the OS and subsequent tries to open the COM1 port will fail.

jencas
Posting Whiz
366 posts since Dec 2007
Reputation Points: 395
Solved Threads: 71
 

Thanks for your post. I could able to solve the problem.

jp071
Light Poster
29 posts since Aug 2009
Reputation Points: 4
Solved Threads: 0
 

Then mark this thread as solved, please

jencas
Posting Whiz
366 posts since Dec 2007
Reputation Points: 395
Solved Threads: 71
 

Better yet, tell US what you found out, how you solved it and then mark it closed.
Give something back.

Salem
Posting Sage
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You