Hang or Exception 0E After Unplugging a USB Modem with an Active Connection (324537)
The information in this article applies to:
- Microsoft Windows Millennium Edition
- Microsoft Windows 98 Second Edition
- Microsoft Windows 98
- Microsoft Platform Software Development Kit (SDK) 1.0, when used with:
- the operating system: Microsoft Windows 98
- the operating system: Microsoft Windows 98 Second Edition
- the operating system: Microsoft Windows Millennium Edition
This article was previously published under Q324537 SYMPTOMS
If a program is communicating with a Universal Serial Bus (USB) modem and you unplug the modem, the program may stop responding (hang) or you may receive an "Exception 0E" error message on a blue screen some time afterward (such as when you end the program's communication session with the USB modem).
NOTE: A USB modem in this context may also be a wide-area network (WAN) device, such as a digital subscriber line (DSL) or integrated services digital network (ISDN) terminal adapter.
CAUSE
If you physically disconnect a USB modem (such as by unplugging or turning off the modem) while a program is communicating with the modem through the virtual serial port, the USB serial communications driver stack does not indicate to the program that the modem has been disconnected. Depending on how the program is written to communicate with the virtual serial port, the program may hang, or it may trigger an exception 0E ("Invalid Page Fault") error when the program releases its connection to the virtual serial port.
WORKAROUND
To work around this problem, do not physically disconnect the USB modem while a communications session is active. Close the connection by using the software that is communicating with the USB modem, and then disconnect the USB modem.
STATUSMicrosoft has confirmed that this is a problem in the versions of Windows that are listed at the beginning of this article. MORE INFORMATION
If program opens a handle to the virtual serial port and tries to write to the port while the modem is disconnected, the write operation does not complete successfully. If the program blocks while it waits for the write operation to complete, the program hangs when it tries to write to the port. If the program does not block on the write operation but instead times out and abandons the write operation, the "Exception 0E" error message may appear on a blue screen when the program closes the handle to the virtual serial port.
This problem is aggravated by the fact that the Windows Application Programming Interfaces (APIs) that are used to communicate through the virtual serial port return the same error codes when the modem is disconnected as when it is connected. For example, when you use overlapped I/O, a WriteFile call returns a Win32 error of ERROR_IO_PENDING when the modem is connected and when it is disconnected. In contrast, these APIs on Microsoft Windows 2000 and Microsoft Windows XP return a different error (ERROR_IO_INCOMPLETE) when the modem is disconnected. This permits the program to easily determine when the modem has been disconnected and to take appropriate action.
Developers who write programs to communicate with USB modems on Windows 98, Windows 98 Second Edition, and Windows Millennium Edition (Me) can work around this problem by making API calls to register the program to receive Plug and Play notifications that pertain to the USB modem. This permits the program to detect when the modem has been disconnected and to take appropriate action (such as to immediately close the connection with the virtual serial port without performing any additional writes to the port).
Modification Type: | Minor | Last Reviewed: | 7/11/2005 |
---|
Keywords: | kberrmsg kbprb KB324537 |
---|
|