Dynamic Link Library (DLL)

A DLL is MICROSOFT's implementation of the shared library concept in the WINDOWS and OS-2 operating systems. These files usually have the file extension .dll, .ocx (for libraries containing ACTIVEX controls), or .drv (for legacy system drivers). The file format for DLL files is the same as for WINDOWS EXE files — that is, PORTABLE-EXECUTABLE (PE) for 32-bit and 64-bit Windows.

The use of DLL files helps promote code modularity, code reuse, efficient memory usage, and reduced disk space. By using dynamic linking, the OPERATING-SYSTEM loads the library into memory once, and multiple PROCESSES can map that same memory space into their own address space. This is managed by the MEMORY-MANAGEMENT-UNIT. Developers often create DLL files using languages like C-PLUS-PLUS, DELPHI, or VISUAL-BASIC.

However, managing DLL versions can be complex, leading to a phenomenon known as DLL-HELL, where installing a new program overwrites a shared library required by another program with an incompatible version. Modern versions of WINDOWS mitigate this using SIDE-BY-SIDE-ASSEMBLY and the WINDOWS-SIDE-BY-SIDE (WinSxS) folder.

External resources for further reading include the Windows Dev Center and the Wikipedia DLL page.