|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Clear/Reset com port?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 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 -- 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. |
|||||||||||||||||||||||