Overview
A dynamic-link library, commonly called a DLL, is a binary module used by Microsoft Windows programs to share code, data and resources at run-time. The DLL model lets multiple applications load the same library into memory so common functions and routines need not be duplicated. This approach contrasts with static linking, where library code is embedded into each executable at build time. The DLL concept is part of Microsoft's implementation of shared libraries and is intrinsic to the Windows family of operating systems, including later versions of the OS platform described at operating-system documentation.
Common file types and extensions
DLLs and related modules are distributed in a few recognizable file forms. Typical examples include:
- .DLL — the standard extension for dynamic-link libraries.
- .OCX — used for libraries that expose ActiveX controls.
- .DRV — legacy driver modules used by older Windows components.
Other files that share the same internal format can be treated as resource DLLs; these data files are discussed in system documentation under data files and file format conventions. Examples include icon collections (often given an .ICL label) and font files that the system loads like resources.
Characteristics and internal structure
Under the hood, a DLL contains executable code, exported function tables, and resource sections (icons, dialogs, strings). The operating system loader resolves dependencies and links imported functions from other DLLs into a process's address space when a module is loaded. DLLs may be loaded implicitly at program start or explicitly at run-time by an application using load-time and run-time linking APIs.
History and development
Dynamic linking appears in early Windows development as a way to conserve memory and simplify updates: fixing a bug in a shared DLL can correct multiple programs without recompiling them. Over time the runtime linking APIs and module formats evolved to support versioning, security restrictions and address-space layout techniques used by modern Windows releases.
Uses, examples and importance
DLLs are widely used for system libraries (graphics, networking, file I/O), third-party extensions, plugins and COM/ActiveX components. They enable modular application design, permit smaller executable sizes, and can be replaced independently of client applications. Developers use DLLs to distribute shared utilities and to implement application plug-in architectures.
Notable issues and distinctions
While dynamic linking brings flexibility, it also creates challenges: version conflicts (sometimes called "DLL hell"), symbol compatibility issues, and security concerns when untrusted modules are loaded. Modern systems mitigate many problems with side-by-side assemblies, stronger signing requirements, and clearer installation and update practices. Distinguishing resource-only DLLs from code-bearing modules is important when troubleshooting or packaging applications.