Creating and Using DLLs
- The DLL is associated with a main project during execution, not during linking. Unlike a static library where routines are included in the base executable image during linking, the routines in a DLL are loaded when an application that references that DLL is loaded (run time).
- You can change the functions in a DLL without recompiling or relinking the applications that use them, as long as the functions' arguments and return types do not change.This allows you to upgrade your applications easily. For example, a display driver DLL can be modified to support a display that was not available when your application was created.
- When general functions are placed in DLLs, the applications that share the DLLs can have smaller executables.
- Multiple applications can access the same DLL. This reduces the overall amount of memory needed in the system, which results in fewer memory swaps to disk and improves performance.
- Common blocks or module data placed in a DLL can be shared across multiple processes.