PRB: One Cause of Fatal Exit 0x001A

Last reviewed: July 23, 1997
Article ID: Q75737
3.00 3.10 MS-DOS kbprg kbprb

The information in this article applies to:

  • Microsoft Windows Software Development Kit (SDK) for Windows versions 3.0 and 3.1

SYMPTOMS

Closing an application or dynamic-link library (DLL) causes Windows to issue the undocumented fatal exit 0x001A.

CAUSE

The application or DLL has registered a window class with the CS_GLOBALCLASS style. The fatal exit is issued when Windows terminates the application or DLL that registered the class, when a window of that class is still open.

RESOLUTION

Ensure that all windows of any classes registered by an application or DLL are closed before the application or DLL is terminated.

MORE INFORMATION

Applications and DLLs can register window classes that are visible to all applications by using the class style CS_GLOBALCLASS. This style is most commonly used in custom-control DLLs that are meant to be shared by multiple applications.

When a task (that is, an application) terminates, all classes registered by that application are unregistered. In addition, DLLs that were implicitly loaded by the terminating application are freed if only the terminating application is using the DLL. In a similar fashion, during the unload sequence of a DLL, any classes that it registered are also unregistered.

Windows keeps an internal count of windows created with a specific class. If this count is not zero when a class is unregistered, Windows reports fatal exit 0x001A.


Additional reference words: 3.00 3.10
KBCategory: kbprg kbprb
KBSubcategory: KrDebug
Keywords : kb16bitonly


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 23, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.