Microsoft KB Archive/163454

= PRB: Problem Using Visual C++ v4.2b OLE Controls in VB v4.0 =

Article ID: 163454

Article Last Modified on 12/1/2003

-

APPLIES TO


 * Microsoft Visual C++ 4.2 Enterprise Edition
 * Microsoft Visual C++ 5.0 Enterprise Edition
 * Microsoft Visual C++ 4.2 Professional Edition
 * Microsoft Visual C++ 5.0 Professional Edition

-



This article was previously published under Q163454



SYMPTOMS
If you create an Appwizard-generated control using Visual C++ version 4.2b or 5.0, you may not be able to use that control on some Windows 95 or Windows NT 3.51 machines. Two problems may occur: problems registering the control with the system registry, or problems loading the control for use in the Visual Basic 4.0 development environment. If you try to load the control using the Custom Controls dialog box in Visual Basic 4.0, you may see the error message "Error in loading DLL."



CAUSE
ActiveX controls built with the Visual C++ 4.2b technology update or Visual C++ 5.0, have dependencies to the newer version of Oleaut32.dll. If that DLL is missing, you may have problems registering and using the control. With Visual Basic, the type information generated for an ocx control implicitly imports type information that is contained in a file called Stdole2.tlb. If that type information is not on the target machine, Visual Basic reports an error loading the DLL into the Visual Basic development environment.



RESOLUTION
The Help topic called "OLE Controls, Distributing OLE Controls" lists the following files that you should redistribute with an MFC ActiveX control:   Mfcx0.dll      MFC DLL (ANSI) Mfcx0u.dll    MFC DLL (Unicode) Msvcrtx0.dll  C run-time libraries Olepro32.dll  OLE property frame and standard types support Regsvr32.exe  Control registration utility In addition to these files, you should also redistribute Stdole2.tlb and Oleaut32.dll. Both of these files are version 2.20.4054 and were installed by the Visual C++ 4.2b technology update. You should install these files in the target machine's system directory. This allows the control to function correctly on Windows 95 and Windows NT 3.51. Note that the Oleaut32.dll and Stdole2.tlb can be distributed per the Visual C++ 5.0 redistribution license agreement. (c)Microsoft Corporation 1996, All Rights Reserved. Contributions by Michael Dice, Microsoft Corporation

Keywords: kbprb kbctrl KB163454

-

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

© Microsoft Corporation. All rights reserved.