Microsoft KB Archive/190487

= Various errors occur when you run an MFC debug application with the MFC debug DLLs of another version =

Article ID: 190487

Article Last Modified on 11/21/2006

-

APPLIES TO

 Microsoft Foundation Class Library 4.2, when used with:  Microsoft Visual C++ 4.2 Enterprise Edition

 Microsoft Visual C++ 4.2 Professional Edition

 Microsoft Visual C++ 5.0 Enterprise Edition

 Microsoft Visual C++ 5.0 Professional Edition</li></ul>

 Microsoft Visual C++ 6.0 Enterprise Edition</li></ul>

 Microsoft Visual C++ 6.0 Professional Edition</li></ul>

 Microsoft Visual C++ 6.0 Standard Edition</li></ul> </li></ul>

-

<div class="notice_section">

This article was previously published under Q190487

<div class="symptoms_section">

SYMPTOMS
Various errors or asserts can occur when you attempt to run a debug version of an MFC application with the MFC debug DLLs of another version. Possible errors include:  

Ordinal could not be found.

Access violation.

</li></ul>

This occurs if you attempt to debug an MFC application built with Visual C++ 5.0 in Visual C++ 6.0 and vice versa. This can also occur if you run your MFC debug application on a machine that does not have the corresponding debug DLLs installed.

<div class="cause_section">

CAUSE
Debug versions of MFC are not binary compatible with previous versions. However, this problem does not occur with release builds because they are binary compatible between versions.

<div class="resolution_section">

RESOLUTION
To debug an MFC project built with Visual C++ 5.0 in Visual C++ 6.0, you must rebuild the project. To run a debug version of an MFC project on a machine that does not have Visual C++ installed, make sure the proper version of the MFC debug DLLs are installed. Note that redistribution of MFC debug DLLs is a violation of the Visual C++ license agreement.

<div class="status_section">

STATUS
This behavior is by design.

<div class="moreinformation_section">

Steps to reproduce the behavior
<ol> Build a DEBUG Build MFC application with Visual C++ 5.0.</li> Copy the .exe file to a machine with Visual C++ 6.0 installed.</li> Run the .exe file.

RESULT: Runtime errors such as:

The ordinal 3255 could not be located in the dynamic link library

MFCO42D.DLL

-or-

Unhandled exception in thisisatest.exe: 0xC0000005: Access Violation.

</li></ol>

(c) Microsoft Corporation 1998, All Rights Reserved. Contributions by Mike Francis, Microsoft Corporation.

Additional query words: 0xC0000005

Keywords: kbtshoot kbbug kbdebug kbdll kbprb KB190487

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.