I am trying to copy two 32bit values into one 64bit address. One DWORD is the high 32 bits and the second is the low 32 bits. I tried the following but the shift operand in the 64bit values doesn't work:
UINT64 a = 0x12341234;
UINT64 b = 0x00003800;
The value I need is: 0x0000380012341234
So I did:
printf("b 0x%016x\n", b);
b = ((UINT64)b) << 20;
printf("b 0x%016x\n", b);
and the prints I get:
b 0x0000000000003800
b 0x0000000080000000
I tried to shift to different numbers (10 and 10 again, or 32, or 0x20) but nothing worked for me.
Why the shift to the high 32bit of the UINT64 doesn't work, and how else can I do it?