You are on page 1of 1

A dynamic link library (or DLL) is a library of prewritten code that can be

shared by multiple programs. At the time a program using a DLL is loaded or


executed, the relevant DLL is linked in so that the code can be used within the
program. This linking is usually done by the operating system, meaning the
programmer does not have to worry about how it works. The name 'dynamic
link library' is specific to Microsoft's implementation of this concept in
Windows, but other operating systems have similar implementations.

A benefit of this dynamic linking is that the code from the DLL only needs to
be loaded into memory once, and then it can be used by multiple different
programs. DLLs reduce duplication within main memory, provide more space,
and reduce the amount of swapping in and out required, all of which results in
faster execution.

Since the routines within the DLL are prewritten, they have been carefully
debugged and optimised. This means that a developer can take advantage of
efficient code to perform a function, rather than each programmer having to
rewrite that code themself from scratch.

DLLs make it possible for a program to support multiple, different types of


hardware. For example, when a program makes a call to print a document, a
DLL might be used to load in the relevant drivers for the specific printer you
own, so that the print instruction can be translated into commands that your
printer can understand.

You might also like