Causes
DLL incompatibility has been caused by:
- Memory constraints, combined with lack of separation of process memory space in 16-bit versions of Windows
- Lack of enforced standard versioning, naming, and file system location schemata for DLLs;
- Lack of an enforced standard method for software installation and removing (package management);
- Centralized authoritative support for DLL application binary interface management and safeguards, allowing incompatible DLLs with the same file name and internal version numbers to be released;
- Overly simplified management tools, preventing the identification of changed or problematic DLLs by users and administrators.
- Developers breaking backward-compatibility of functions in shared modules;
- Microsoft releasing out-of-band updates to operating system runtime components;
- Inability of earlier versions of Windows to run side-by-side conflicting versions of the same library;
- Reliance on the current directory or %PATH% environment variable, both of which vary over time and from system to system, to find dependent DLLs (instead of loading them from an explicitly configured directory.)
- Developers re-using the ClassIDs from sample applications for the COM interfaces of their applications, rather than generating their own new GUIDs.
DLL Hell was a very common phenomenon on pre-Windows NT versions of Microsoft operating systems, the primary cause being that the 16-bit operating systems did not restrict processes to their own memory space, thereby not allowing them to load their own version of a shared module that they were compatible with. Application installers were expected to be good citizens and verify DLL version information before overwriting the existing system DLLs. Standard tools to simplify application deployment (which always involves shipping the dependent operating system DLLs) were provided by Microsoft and other 3rd party tools vendors. Microsoft even required application vendors to use a standard installer and have their installation program certified to work correctly, before being granted use of the Microsoft logo. The good citizen installer approach did not mitigate the problem, as the rise in popularity of the Internet provided more opportunities to obtain non-conforming applications.
Read more about this topic: DLL Hell