Subscribe to Subscribers

Online Members

Kapil
More...

Forums » .NET » .NET »

How to release COm Port


Posted Date: 08 Jun 2012      Posted By:: Mona Rai     Member Level: Gold    Member Rank: 549     Points: 2   Responses: 3



Dear All

I have an aplication in Dot net where I communicate with the Com port , But some times it remains locked , How can i solve the problem, Please send me the code

Mona Rai




Responses

#674574    Author: Ajatshatru Upadhyay      Member Level: Gold      Member Rank: 17     Date: 08/Jun/2012   Rating: 2 out of 52 out of 5     Points: 0

Hi,

You should use SerialPort.Close method
http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.close.aspx

Hope it'll help you.
Regards
Ajatshatru


 
#674604    Author: Asheej T K        Member Level: Diamond      Member Rank: 2     Date: 08/Jun/2012   Rating: 2 out of 52 out of 5     Points: 2

Hi,
It seems you are not closing the port properly. If you can post the code you are using we will be able to amend the same.


Regards,
Asheej T K
Microsoft MVP[ASP.NET/IIS]
DotNetSpider MVM

Dotnet Galaxy


 
#674715    Author: Pawan Awasthi        Member Level: Diamond      Member Rank: 4     Date: 10/Jun/2012   Rating: 2 out of 52 out of 5     Points: 2

Hai Mona,
You need to check first whther the port is opened or not. If it is not opened then open it.
You can go through the below link for the code in details. Also you cna add the check jusy before opening the port.

http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.close.aspx

Hoep it will be helpful to you.

Regards,
Pawan Awasthi(DNS MVM)
+91 8143683708 (pawansoftit@gmail.com)
Outstanding Contribution Award..NTT Data Inc





 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : How to restrict cursor placed inside the datagridview?
Previous : On installing visual studio 2008 or sql server 2005 internet and intranet is being blocked
Return to Discussion Forum
Post New Message
Category:

Related Messages

Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Talk to Webmaster Tony John
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
2005 - 2013 All Rights Reserved.
.NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
Articles, tutorials and all other content offered here is for educational purpose only.
We are not associated with Microsoft or its partners.