Home

DLLs

Dynamic Link Library, or DLL, is a module that contains code and data that can be used by multiple programs concurrently. In Windows, DLLs enable code reuse and modularization by allowing common functionality—such as file I/O, graphics, or utility routines—to reside in a single file that several applications can load as needed. A DLL can also contain resources such as icons or strings.

How it works: Executables that use a DLL declare imports. At load time, the operating system resolves

Usage and benefits: DLLs reduce memory usage and disk space by sharing a single copy of code

Dynamic loading and flexibility: Programs can delay loading a DLL until its functionality is needed, using

Security and portability: Windows supports features like side-by-side assemblies, ASLR, and code signing to mitigate risks.

these
imports
by
mapping
the
DLL
into
the
process
address
space
and
resolving
symbol
addresses
via
the
DLL's
export
table.
A
DLL
exports
functions
and
data;
other
code
obtains
pointers
to
these
using
the
import
table
and,
optionally,
GetProcAddress
when
loading
dynamically.
between
processes,
simplify
updates,
and
support
modular
architectures.
However,
they
introduce
dependency
management
challenges,
often
referred
to
as
DLL
Hell,
where
applications
require
different
versions
of
shared
components.
LoadLibrary
or
equivalent,
and
can
obtain
function
pointers
with
GetProcAddress.
This
enables
plugin
systems
and
optional
features.
In
cross-platform
terms,
similar
concepts
exist
as
shared
libraries
(.so
on
Linux,
.dylib
on
macOS).