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.