The information in this article applies to:
SYMPTOMSAn ASSERT can occur when a non-MFC application tries to load, free, and again load an MFC Regular DLL. The assert occurs in the Auxdata.cpp file as a result of a failed call to GetSysColorBrush. The specific code is:
The ASSERT statement is at line 139 of Auxdata.cpp in MFC version 4.2 that
ships with Visual C++ 5.0.
CAUSEUser32.dll leaks resources, which causes ::GetSysColorBrush to fail. RESOLUTIONIf a non-MFC application intends to load and free a Regular DLL, make sure that User32.dll is not also being unloaded when FreeLibrary is used to free the DLL. To do so, you can call LoadLibrary to load User32.dll once in the application, before the application loads and frees the Regular DLL. STATUSMicrosoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATION
In its initialization process, MFC loads User32.dll. The ASSERT occurs when
the Regular DLL is the only module in an application that uses User32.dll
(including the application). If this application loads, frees, and again
loads this DLL, the ASSERT occurs because User32.dll does not free all of
its resources when it is unloaded.
REFERENCESFor additional information, please see the following articles in the Microsoft Knowledge Base: Q184807 BUG: User32.dll Leaks Memory Q171145 PRB: Resource Leaks in System Components © Microsoft Corporation 1998, All Rights Reserved. Additional query words: GDI kbDLL kbKernBase kbMFC kbVC500
Keywords : |
Last Reviewed: January 19, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |