DLL Introduction - Dynamic Link Library (DLL)

What is DLL Introduction?

Dynamic linking is a device that links applications to libraries at run time. The libraries endure in their individual files and are not copied into the executable files of the applications. DLLs link to an application when the application is run, rather than when it is created. DLLs may contain links to other DLLs.

Many times, DLLs are placed in files with different extensions such as .exe, .drv or .dll.

Advantages of DLL

Assumed underneath are a few benefits of having DLL files.

Uses fewer resources

DLL files don't get loaded into the RAM at once with the main program; they don't inhabit space without necessary. When a DLL file is wanted, it is loaded and run. For instance, as long as a user of Microsoft Word is editing a document, the printer DLL file is not required in RAM. If the user chooses to print the document, then the Word application origins the printer DLL file to be loaded and run.

Promotes modular architecture

A DLL benefits promote developing modular programs. It comforts you develop big programs that need multiple language versions or a program that needs modular architecture. An instance of a modular program is an accounting program taking many modules that can be dynamically loaded at run-time.

Aid easy deployment and installation

When a function inside a DLL wants an update or a fix, the deployment and installation of the DLL does not need the program to be relinked with the DLL. Moreover, if numerous programs use the same DLL, then all of them get helped from the update or the fix. This problem may occur more repeatedly when you use a third-party DLL that is frequently updated or fixed.

Applications and DLLs can link to other DLLs spontaneously, if the DLL linkage is stated in the IMPORTS section of the module definition file as a part of the compile. Otherwise, you can openly load them using the Windows LoadLibrary function.

Important DLL Files

Mentioned below are some important dll files which user should know for programming −

  • COMDLG32.DLL − Controls the dialog boxes.
  • GDI32.DLL − Comprises numerous functions for drawing graphics, displaying text, and managing fonts.
  • KERNEL32.DLL − Comprises hundreds of functions for the management of memory and various processes.
  • USER32.DLL − Comprises numerous user interface functions. Involved in the creation of program windows and their interactions with each other.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Dynamic Link Library (DLL) Topics