DLL definition and how does it works
DLL files have the distinctiveness to end with .dll. DLL is the acronym for Dynamic Link Library, inside Microsoft Windows Operating System. Generally, a DLL file is composed of code and features shared for other Windows applications, it eases developers’ tasks an coding process.
When an application need a DLL file, it is first searched in the very directory used by this application, then in the active windows directory "SetDllDirectory() function" such as c:\windows et c:\windows\system32. for instance.
If your operating system is installed in the C hard drive, when a dll is missing, you will have to copy all your files in your windows directories to be serene once for all.
Code and functions contained in a DLL are loaded only once in memory. This way, when an application uses and wishes to load a DLL which is already used somewhere else, it doesn’t need to load a second time the dll, the existing code is mapped in the application’s memory. Not only a dll eases developers’ tasks, but is also a way to save memory.
Therefore, when an application uses and downloads a DLL which is already used by the computer, it doesn’t need to download it twice, the existing code is mapped in the application’s memory. As a result not only does it ease the developer’s work but it allows saving memory. Once all processes using a DLL file are closed, depending on which DLL was used and Windows configuration, the attributed memory can be freed or put aside so that next applications don’t have to reload the DLL.

A DLL file can be linked statically or dynamically to a program. When it is static, the program clearly shows its need to have access to a certain content situated in a library and links are established by the program editor when it is time for compilation. The program then includes directly in its structure the list of necessary libraries for its running in the exportation table.
The Windows program loader then verifies when running that all DLLs required are available, if not, cancels the loading and a message pops up saying that some files needed to run the executable couldn’t be found. This is the moment when the error message indicates that a DLL file is missing.

On the other hand, it can be directly the program asking for the loading of a library during its execution with the API LoadLibrary in order to obtain a timekeeper for the wished function.
Languages like Delphi, C and C++ are able to generate DLLs which can be exploited by other applications. Many development tools suggest execution libraries, for instance, MFC or Borland VCL recommend either a static liaison (direct integration of the code inside the executable file) or a dynamic liaison (the library can then be distributed as DLL files).
Using a DLL permits to have code available and make the application more separable. The application’s update can also be performed only by replacing old DLL files.
Nevertheless, using several versions of DLL creates a problem for Windows and can lead to incompatibilities, generally known as “DLL Hell”.
