PRB: Cannot Exit Windows with DLL-Instanced Windows OpenLast reviewed: April 4, 1995Article ID: Q68552 |
The information in this article applies to:
SYMPTOMSWhen the user closes the Windows Program Manager and chooses the OK button in the Exit Windows dialog box, Windows does not close.
CAUSEA window was created in a window class registered by a dynamic-link library (DLL), and the DLL was unloaded from the system before the window was destroyed.
RESOLUTIONBefore the DLL is unloaded from the system, explicitly destroy all windows created in a window class registered by the DLL.
MORE INFORMATIONWhen a DLL is unloaded from memory, all window classes registered by that DLL are purged. Any windows that have been created with a DLL- registered window class become invalid when the window class is purged; however, these windows are not destroyed. Sending any message to an invalid window returns zero. When Windows sends a WM_QUERYENDSESSION message to an invalid window, the window returns zero and Windows does not shut down. Under the debugging version of Windows, this action creates Fatal Exit code 0x0007 messages. This problem does not occur under Windows 3.1. When a DLL is unloaded, before its window classes are purged, any windows created using a DLL- registered window class are destroyed. When the debugging version of Windows 3.1 destroys a window in this manner, it produces one of the following four messages:
|
Additional reference words: 3.00 3.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |