943,712 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Marked Solved
  • Views: 2254
  • C++ RSS
Aug 13th, 2009
0

How to check COM1 port already open or not

Expand Post »
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.
Similar Threads
Reputation Points: 4
Solved Threads: 0
Light Poster
jp071 is offline Offline
26 posts
since Aug 2009
Aug 13th, 2009
-7

Re: How to check COM1 port already open or not

Just try to open it -- if open files then its probably already opened (assuming COM1 exists and there are no hardware problems)
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,950 posts
since Aug 2005
Aug 21st, 2009
0

Re: How to check COM1 port already open or not

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.
Reputation Points: 4
Solved Threads: 0
Light Poster
jp071 is offline Offline
26 posts
since Aug 2009
Aug 21st, 2009
0

Re: How to check COM1 port already open or not

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.
Reputation Points: 395
Solved Threads: 71
Posting Whiz
jencas is offline Offline
362 posts
since Dec 2007
Aug 21st, 2009
0

Re: How to check COM1 port already open or not

Thanks for your post. I could able to solve the problem.
Reputation Points: 4
Solved Threads: 0
Light Poster
jp071 is offline Offline
26 posts
since Aug 2009
Aug 21st, 2009
0

Re: How to check COM1 port already open or not

Then mark this thread as solved, please
Last edited by jencas; Aug 21st, 2009 at 9:49 am.
Reputation Points: 395
Solved Threads: 71
Posting Whiz
jencas is offline Offline
362 posts
since Dec 2007
Aug 21st, 2009
0

Re: How to check COM1 port already open or not

Better yet, tell US what you found out, how you solved it and then mark it closed.
Give something back.
Team Colleague
Reputation Points: 5862
Solved Threads: 950
Posting Sage
Salem is offline Offline
7,164 posts
since Dec 2005

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Urgent help in c++ please help me
Next Thread in C++ Forum Timeline: 2gb stl map performance





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC