The information in this article applies to:
SYMPTOMSThe error below may occur in an MFC application where one of the following is assigned a value by the programmer: The following error is displayed in a message box: In Visual C++ 6.0, the following error is displayed in a message box: You may see this error when you upgrade from an earlier version of Visual C++ to Visual C++ versions 4.2 or later. CAUSEThe CWinApp destructor in MFC included with Visual C++ 4.2 and later now frees the data assigned to the member variables shown above by passing the pointer to the free() function. Doing this prevents memory leaks, which would occur if an MFC regular DLL were dynamically loaded and unloaded. RESOLUTION
This behavior is by design. If you assign a value to m_pszAppName,
m_pszRegistryKey, m_pszExeName, m_pszHelpFilePath, or m_pszProfileName, the
data must be dynamically allocated on the heap. You may want to use the
_tcsdup() run-time library function to do this.
Additional query words: 4.10 port porting strdup
Keywords : kberrmsg kbMFC kbVC420 kbVC500 kbVC600 |
Last Reviewed: August 3, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |