Microsoft KB Archive/192535

= Regsvr32 may fail when you use it to register a debug build of an MFC Server =

Article ID: 192535

Article Last Modified on 10/3/2005

-

APPLIES TO

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

 Microsoft Visual C++ 5.0 Professional Edition

 Microsoft Visual C++ 6.0 Enterprise Edition

 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 Q192535

<div class="symptoms_section">

SYMPTOMS
Regsvr32 may fail when you register a debug build of an MFC Server, and you may receive an error message that is similar to the following:

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

MFCO42D.DLL.

The ordinal number may vary.

If you click OK, you receive the following error message:

RegSvr32: LoadLibrary(" ") failed.

GetLastError returns 0x000000b6.

<div class="cause_section">

CAUSE
This problem occurs because the Debug MFC DLLs are not binary-compatible between Visual C++ 5.0 and Visual C++ 6.0. If you have written a debug build DLL in Visual C++ 5.0 and then you try to register the DLL on a computer that has Visual C++ 6.0 installed, you receive the error message.

<div class="workaround_section">

WORKAROUND
The following are three possible workarounds:
 * Build a release version of the server in Visual C++ 5.0. Then, run the server on the target Visual C++ 6.0 computer.
 * Rebuild the server by using Visual C++ 6.0.
 * Copy the MFC debug DLLs from Visual C++ 5.0 to the same directory on the target computer as the MFC ActiveX server.

Warning This workaround is for diagnostic purposes only because redistribution violates the Visual C++ license agreement.

<div class="status_section">

STATUS
This behavior is by design.

<div class="references_section">