Navigation
Related Post
Dynamic Link Library – DLL
Microsoft Windows systems use a “divide and conquer” approach to break software into smaller modules that are each called a Dynamic Link Library, or DLL. These are individual programs that can be used by multiple programs simultaneously, which benefits memory usage and system resource consumption.
This modularization is also an effective way to create consistency across the software.
For example, every Windows program with a “File Dialog” box to let the user select files, store files, etc., will use the same standard dialog box for file management-related functions.
On This Page
Divide and Conquer
This modular approach is an efficient way to run programs because many functions are only loaded when needed, thus making the core software smaller and faster to load.
Similarly, when an update or change is made to a process provided by a DLL, like the Dialog Box example, that change will benefit all programs that use that DLL.
With Windows software being used worldwide, using DLLs also makes it easier to support multiple languages in software.
A quick search on a Windows 11 PC with relatively little installed software showed about 40,000 DLL files on the machine. That gives you an idea of the importance of all these functions for the programs that run on a typical Windows PC.
Types of Linking
DLL files can be used in two ways, known as load-time dynamic linking and run-time dynamic linking.
In load-time dynamic linking, an application makes explicit calls to exported DLL functions like local functions. This is the more common method.
With run-time dynamic linking, an application can use a DLL function even if it didn’t know about the function at compile time.
Dynamic Link Library and Modularity
The modularity of DLLs also makes it easier to update functionality. When a function within a DLL needs an update or a bug fix, only the DLL file needs to be replaced rather than the whole application.
This can significantly simplify the process of updating software.
DLL Hell
This term refers to problems that arise when multiple applications require different versions of the same DLL. As a result, one application might install a newer version of a DLL, breaking another application that relied on the older version.
Microsoft has worked to mitigate DLL Hell issues by introducing side-by-side assembly and .NET.
Versioning and Side-by-Side Assemblies
Windows XP and later versions of Windows use side-by-side assemblies to alleviate the issues related to DLL hell.
In this system, Windows can support loading multiple versions of the same DLL within the same process, allowing each application to use the specific version of a DLL it requires.
Conclusion
DLLs play a role in software development for Windows-based computer systems.
Understanding our general overview here is helpful since they’re an integral part of Windows software architecture.