The information in this article applies to:
SYMPTOMSWhen you use MFC, the following assert can occur: Program: e:\test\app.exe File: wincore.cpp Line: 879The following example calls CDatabase::OpenEx() from inside an MFC regular DLL and shows the resulting assert. The problem is not limited to the MFC Database classes. If you expose an OLE automation method in an MFC regular DLL and have code like:
the assertion dialog appears.
This doesn't happen in an application built with Visual C++, version 5.0. Also this problem only occurs in debug builds. The release build runs correctly. CAUSECode has been added to the GetSafeOwner_() call that calls GetRoutingFrame_(). In the GetRoutingFrame_() function, you can see the following code:
This assertion is not correct. This assertion assumes that there is a
handle map and that the pFrame CWnd * is in either the temporary or
permanent CWnd handle map. Neither of these situations is true in the
scenario described in the Symptoms section.
RESOLUTIONTo get rid of the failed asserts, you can add the following code to debug builds:
If you need to add this code in many places, you may want to write a macro
such as the following:
So you can do the following:
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.
Keywords : kbDatabase kbMFC kbVC600bug |
Last Reviewed: July 15, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |