Determining Which DLLs to Redistribute
To determine which DLLs you have to redistribute with your application, collect a list of the DLLs that your application depends on. One way to collect the list is to run Dependency Walker (depends.exe) as described in Understanding Dependencies of a Visual C++ Application.
When you have the list of dependencies, compare it to the "REDIST list" that is referenced in the "Distributable Code" section of the Microsoft Software License Terms for your copy of Visual Studio. For the list of redistributable DLLs, see License Extensions for Visual Studio 2012 and Visual Studio 2012 SDK on the Microsoft website. You cannot redistribute all of the files that are included in Visual Studio; you are only permitted to redistribute the files that are specified in the list. Debug versions of applications and the various Visual C++ DLLs are not redistributable. For more information, see Choosing a Deployment Method.
The following table describes some of the Visual C++ DLLs that your application might depend on. To determine whether a DLL is redistributable, check the list in License Extensions for Visual Studio 2012 and Visual Studio 2012 SDK.
Visual C++ Library
Active Template Library (ATL).
Applications that use ATL.
C Runtime Library (CRT) for native code.
Applications that use the CRT Library Features.
Standard C++ Library for native code.
Applications that use the Standard C++ Library.
Microsoft Foundation Classes (MFC) Library.
Applications that use the MFC Library.
MFC Library with Unicode support.
Applications that use the MFC Library and require Unicode support.
MFC Managed Interfaces Library.
MFC Managed Library.
MFC Managed Library with Unicode support.
Typically, you do not have to redistribute system DLLs (for example, Kernel32.dll, User32.dll, Ole32.dll, or ShDocVW.dll) because they are part of the operating system and are present on any computer that has the same version of the operating system. However, there might be exceptions, for example, when your application will run on several versions of Microsoft operating systems. In this case, be sure to read the corresponding license terms. Also, try to get the system DLLs upgraded either through service packs or by small redistributable packages made available by Microsoft. You may be able to locate available packages by searching on the Microsoft Support website.