|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
Redistributing Visual C++ ActiveX Controls
Visual C++ 6.0 supplies ActiveX controls you can use in applications that you then redistribute. These controls are not included in Visual C++ .NET. Per the licensing agreements of Visual C++ 6.0, you can redistribute these controls with applications developed in Visual C++ .NET.
For a list of the redistributable Visual C++ 6.0 ActiveX controls, see Common\Redist\Redist.txt on Disc 1 of the Visual C++ 6.0 product CD.
When distributing applications, you must install and register (using Regsvr32.exe) the .ocx for the ActiveX control. In addition, you should make sure the target computer has current versions of the following system files (an asterisk indicates the file needs to be registered):
- Comcat.dll *
- Oleaut32.dll *
- Olepro32.dll *
If these DLLs are not available in the target system, you need to get them updated through the prescribed mechanism for updating the corresponding operating system. You can download the latest service packs for Windows Operating Systems from http://windowsupdate.microsoft.com.
If your application uses one of the ActiveX controls that connect to a database, you will need the Microsoft Data Access Components (MDAC) installed on the target system. See Redistributing Database Support Files for more information.
When using an ActiveX control that connects to a database, you also need to replicate the data source name on the target computer. You can do this programmatically with functions such as ConfigDSN.
Some redistributable ActiveX controls have additional dependencies. For each .ocx file in the Os\System folder on the Visual C++ 6.0 product CD, there is also a .dep file. For each .ocx file that you want to redistribute, look for one or more USES entries in the corresponding .dep file. If a file is listed, you must ensure that the file will be on the target computer. Any DLLs directly supporting an .ocx file need to be registered. (For Regsvr32.exe to succeed, the target computer must first contain all of the DLLs the control statically loads.) Further, if a DLL that is listed as a dependency also has a .dep file in the Os\System folder on the Visual C++ 6.0 CD, you must also investigate that .dep file for USES entries.
Redistributing a Native C++ Application