Home

DWORD

DWORD, short for double word, is a data type used in Windows programming to store a 32-bit unsigned integer. The term double word comes from the historical convention that a word is 16 bits, so a double word is 32 bits.

In Windows header files such as Windef.h or WinNT.h, DWORD is defined as typedef unsigned long DWORD.

DWORD is widely used in the Windows API to hold counts, sizes, bit flags, and identifiers. It

Related types include WORD, which is 16-bit unsigned, and BYTE, which is 8-bit. For larger values, Windows

Examples of usage include representing ARGB color values in graphics APIs, numeric IDs, and flag sets in

On
modern
Windows
platforms,
including
64-bit
editions,
DWORD
remains
32
bits
long
because
Windows
uses
the
LLP64
model
where
long
is
32
bits.
The
numeric
range
is
0
through
4294967295.
is
commonly
seen
as
parameters
to
functions,
fields
in
structures,
and
return
values.
It
often
represents
IDs
and
non-pointer
values
rather
than
handles
or
objects.
provides
types
such
as
DWORDLONG
or
ULONGLONG
(64-bit)
and
pointer-sized
variants
like
DWORD_PTR,
which
adapt
to
the
target
architecture.
various
API
calls.
The
exact
in-memory
representation
of
a
DWORD
follows
standard
unsigned
integer
conventions;
on
Windows
x86
systems
it
is
stored
in
little-endian
order,
but
the
logical
value
is
independent
of
endianness
for
typical
programming
tasks.