DLL

DLLs are Microsoft's implementation of. Shared libraries allow common code to be bundled into a wrapper, the DLL, and used by any application software on the system without loading multiple copies into memory. A simple example might be the text editor, which is widely used by many programs. By placing this code in a DLL, all the applications on the system can use it without using more memory. This contrasts with, which are functionally similar but copy the code directly into the application. In this case, every application grows by the size of all the libraries it uses, and this can be quite large for modern programs.

DLLs provide the standard benefits of, such as. Modularity allows changes to be made to code and data in a single self-contained DLL shared by several applications without any change to the applications themselves.

Another benefit of modularity is the use of generic interfaces for plug-ins. A single interface may be developed which allows old as well as new modules to be integrated seamlessly at run-time into pre-existing applications, without any modification to the application itself. This concept of dynamic extensibility is taken to the extreme with the, the underpinnings of.

In Windows 1.x, 2.x and 3.x, all Windows applications shared the same address space as well as the same memory. A DLL was only loaded once into this address space; from then on, all programs using the library accessed it. The library's data was shared across all the programs. This could be used as an indirect form of, or it could accidentally corrupt the different programs. With the introduction of 32-bit libraries in every process ran in its own address space. While the DLL code may be shared, the data is private except where shared data is explicitly requested by the library. That said, large swathes of, and  were built from 16-bit libraries, which limited the performance of the  microprocessor when launched, and ultimately limited the stability and scalability of the DOS-based versions of Windows.

Although DLLs are the core of the Windows architecture, they have several drawbacks, collectively called "". Microsoft promotes as one solution to the problems of DLL hell, although they now promote virtualization-based solutions such as  and, because they offer superior isolation between applications. An alternative mitigating solution to DLL hell has been to implement.