Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / October 2006

Tip: Looking for answers? Try searching our database.

Clear/Reset com port?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rico - 24 Oct 2006 16:21 GMT
Hi Everyone,
Thanks for reading my post.  I have a .net application written in C# that
uses RAS to create a dial up connection.  My problem is once in a while, the
dial-up connection may drop, and I will receive an error,

Opening Port...
Error 633: the modem (or other connecting device) is already in use or is
not configured properly.

Can someone tell me how to clear or reset the com port?

Thanks

Rico
Dick Grier - 24 Oct 2006 17:13 GMT
Hi,

Usually (though not always, perhaps) this error is cause by a Virtual Serial
Port driver (used by USB and software modems).  The driver fails to release
the port.  If this is the case, I know of no way to clear it up.  An updated
driver may be the only solution.  I have not seen this when using a modem
that has a hardware UART, and does not employ a virtual serial port.

It is possible that you can P/Invoke the RasHangUp function in rasapi32.dll
to force the release of the port.  I have not tried this.

Dick

Signature

Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.