Redistributing MFC, ATL, and OLE DB Templates Applications
Redistribution issues covered in this topic relate to how the application was built.
If you dynamically link your application to the MFC library, you will, at a minimum, need to redistribute MFC71.dll and MSVCR71.dll. All MFC DLLs use the shared version of the C run-time library (CRT); thus, MSVCR71.dll is required. Also, you need to make sure that the target computer for an MFC71.dll-based application has at a minimum Internet Explorer 4.0 installed, since MFC 7.1 makes use of components shipped with Internet Explorer. See Redistributing Web Applications for information on how you can install minimal Internet Explorer components.
MFC71.dll does not need to be redistributed with MFC applications if you statically linked to the MFC DLL (that is, unless you specified Use MFC in a Static Library on the General tab in the Project Settings dialog box).
If your application uses the MFC database classes, such as CRecordset and CRecordView, you will need to redistribute ODBC and any ODBC drivers that your application uses. See Redistributing Database Support Files for more information.
If you redistribute an MFC DLL, be sure you redistribute the retail version rather than the debug version. Debug versions of the DLLs are not redistributable. Debug versions of the MFC DLLs have a trailing "d" in their file names, such as in MFC71d.dll.
If you modify MFC in any way, you must rename the modified MFC DLL so it will not conflict with the MFC DLL that might be installed by other MFC applications on the target computer. Rebuilding and renaming the MFC DLL is not a recommended procedure. For more information, see MFC Technical Note 33.
For more information on redistributing an MFC application, see Deployment and Dependencies.
ATL and OLE DB Templates
An Active Template Library (ATL) or OLE DB Templates project can be built for a MinDependency or a MinSize configuration.
- MinDependency configuration is when you set the Use of ATL property to Static Link to ATL on the General property page and set the Runtime Library property to Single-threaded (/ML) or Multi-threaded (/MT) on the Code Generation property page (C/C++ folder).
- MinSize configuration is when you set the Use of ATL property to Dynamic Link to ATL and the Minimize CRT Use in ATL to Yes on the General property page or set the Runtime Library property to Multi-threaded DLL (/MD) on the Code Generation property page (C/C++ folder).
MinSize makes the output file as small as possible but requires that ATL71.dll and MSVCR71.dll (if you selected the Multi-threaded DLL (/MD) option) to be on the target computer. ATL71.dll should be registered on the target computer to ensure all ATL functionality is present. Be aware that the ANSI and Unicode versions of the ATL DLL have the same name: ATL71.dll. You cannot redistribute the Unicode version on a Windows 98 or Windows Me computer; you need the ANSI version (available in the Win\System\Ansi folder on the product CD or DVD).
If you build your ATL or OLE DB Templates project for a MinDependency target, you do not need to install and register ATL71.dll on the target computer, although you may get a larger program image.
If you redistribute an ATL executable application, you must register the .exe file (and any controls inside it) by issuing the following command:
where filename is the name of the executable file.
For OLE DB Templates applications, ensure the target computer has the latest versions of Microsoft Data Access Components (MDAC) files. See Redistributing Database Support Files for more information.