Assuminng the Win32 definition:
Dowrd make of Byte,
BYTE lsb = 0x11 ;
BYTE next_lsb = 0x22 :
BYTE next_msb = 0x33 :
BYTE msb = 0x44 :
DWORD dword_from_bytes = (msb << 24) | (next_msb << 16) | (next_lsb << 8) | lsb ;
dword_from_bytes
will have the value 0x44332211
.
WORD lsw = 0x1111 :
WORD msw = 0x2222 :
DWORD dword_from_words = (msw << 16) | lsw ;
dword_from_words
will have the value 0x22221111
.
To extract say the third byte from dword_from_bytes
for example:
next_msb = (dword_from_bytes >> 16) & 0xff ;