Dynamic Link Libraries

Dynamic Link Library A dynamic link library or more commonly DLL ( dynamic acronym for dynamic-link library) is the term by which refers to files with executable code that are loaded on demand by a program by the operating system . This name is exclusive to Windows operating systems, being “.dll” the extension with which these files are identified, although the concept exists in practically all modern operating systems.

Summary

[ hide ]

  • 1 Advantages
  • 2 DLL hell
  • 3 More information
  • 4 External links

Advantage

DLLs are or can be seen as the evolution of static libraries (on various systems) and similarly contain functionality or resources that other applications use. However, its use provides some advantages:

  • Reduce the size of executable files: Much of the code may be stored in libraries and not in the executable itself, which results in better modularization.
  • They can be shared between several applications: If the code is generic enough, it can be useful for multiple applications (for example, the MFCis a dynamic library with generic classes that cover the Windows graphical API and are used by a large part of the applications) .
  • Facilitate the management and use of system memory: Dynamic loading allows the operating system to apply algorithms that improve system performance when these libraries are loaded. Also, since they are shared, it is enough to keep a copy in memory for all the programs that use it.
  • They provide greater flexibility in the face of changes: You can improve performance or fix small bugs by distributing only a new version of the dynamic library. Again, this correction or improvement will be taken advantage of by all the applications that share the library.

DLL Hell

However, not all benefits. DLLs are very common on Windows systems and many programs use the same dynamic link libraries. But due to the evolution, each one of the libraries evolves incorporating improvements but modifying them in such a way that they are no longer compatible. This can produce two unwanted effects:

  • That the installation of a program replace a DLL with a new incompatible version.
  • Uninstalling the program will erase a shared DLL.

In both cases, the result is that programs that used the old version stop working. These problems were called DLL hell.

Modern versions of Windows and new MSI installation scripts (especially its resident installations feature) address and resolve this problem. However, the problem persists when other installers (older versions) are used or manual modifications are made.

More information

Normally Dynamic Link Libraries appear with the extension “.dll”; however, they may also have the “.exe” extension or another extension. For example, Shell .dll contains routines drag and drop OLE – ( “Object Linking and Embedding” – Linking and Embedding Objects ) that can be used by Windows and other programs.

Kernel.exe, User.exe, and Gdi.exe are an example of DLLs with the .exe extension. These files contain code, data, or routines that run on Windows. For example, ino of these files contain the “CreateWindow” function that is used when a program wants to create a new window on the screen.

In ccc Windows a driver that we install is also a DLL. A program can open, enable, query, disable, and close a driver based on instructions written to a .DLL file.
DLLs can be found in the Windows directory, the Windows \ System directory, or the “Program Files” directory.

 

by Abdullah Sam
I’m a teacher, researcher and writer. I write about study subjects to improve the learning of college and university students. I write top Quality study notes Mostly, Tech, Games, Education, And Solutions/Tips and Tricks. I am a person who helps students to acquire knowledge, competence or virtue.

Leave a Comment