DLL Files

Windows Help  > DLL Files
Windows Help

.DLL - Dynamic Link Libraries

The problem of reusable, common code has always challenged developers. Likewise, developing software for older small-memory machines often required many tricks to allow multiple processes to share available RAM and other resources. Originally, library files could only be linked into a program on a "static" basis at compilation time, which made for larger program files as well as more difficult code management.

UNIX and other operating systems began the use of shared libraries containing routines common to more than one application, thus providing common interfaces and (potentially) a smaller code base. Shared libraries also remove the need to statically link libraries into individual programs at compile time. This feature can make software upgrades easier, since if a static library is changed, it must be recompiled into the existing program's code all over again. Shared libraries can be built and deployed without recompiling the program, since the new library is loaded at runtime rather than compile time.

DLL files, or Dynamic Link Libraries, are Microsoft's implementation of the shared library concept. They were originally implemented in the days when Windows was a 16-bit application using shared address space for all running programs. It allowed developers to save both memory and disk space, since a library was loaded only once into the shared address space. All applications then had access to it.

In newer 32-bit Windows implementations with private address space for each process (Win32), libraries can be written to utilize the concept of sections. This allows large libraries to load only individual sections of code, rather than the entire library at once. This saves memory and time, since sections are loaded and unloaded on an as-needed basis. Various routines in a library can be either private or shared. The latter option allows inter-process communications (IPCs) to occur, while the private option prohibits applications from accessing data and routines previously invoked and retained in memory by other running programs.

DLL files are still heavily used by the Windows OS. One common DLL is Kernel32.dll, which implements many Windows base functions related to memory and process management. Microsoft's .NET implementation may eventually supplant the existing technology for some applications.


Copyright © 2008 WindowsHelp.net All rights reserved | Privacy Policy | Contact us at infowindowshelp.net