The information in this article applies to:
SYMPTOMSWhen using Regsvr32.exe to register one of the controls from the "MSDEV\REDIST\OCX" directory, you might get an error saying: Attempting to call LoadLibrary() on the OCX will also fail with the same error code. CAUSEMost of the controls in the "MSDEV\REDIST\OCX" directory were built using MFC 4.0 so they need Mfc40.dll and Msvcrt40.dll. There are two versions of Msvcrt40.dll: one in "MSDEV\REDIST," and another in "MSDEV\REDIST\ANSI." The version from "MSDEV\REDIST" needs Msvcirt.dll. If this file is not found, control registration will fail. RESOLUTION
MORE INFORMATION
Starting with Visual C++ 4.2, the shared DLL version of the C run time was
changed from Msvcrt40.dll to Msvcrt.dll. This prevents having to keep a
separate C run-time DLL for each version (for example, Msvcrt411.dll,
Msvcrt42.dll, and so on). However, if an MFC 4.2 application were using an
MFC 4.0 control, you would have two copies of the C run time loaded in
memory (Msvcrt.dll and Msvcrt40.dll). To save precious memory, Msvcrt40.dll
was converted to a "forwarder" DLL. All it does is forward calls to
Msvcrt.dll and Msvcirt.dll. Starting with Windows NT 4.0, Msvcrt40.dll,
Msvcrt.dll, and Msvcirt.dll ship with the operating system.
REFERENCESFor information about other possible reasons for ActiveX Control Registration failure, please see the following article in the Microsoft Knowledge Base: Q140346 Possible Reasons for OLE Control Registration Failure
Keywords : kbcode kbole kbMFC kbVC420 kbVC500 |
|
Last Reviewed: July 8, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |