I want to add 0x9E3779B9
and 0xB7E15163
inside a 32-bit variable but it is overflowing because the result, 0x15618CB1C
, is 36 bit . I want the result to be 0x5618CB1C
, it works fine in c++ but not in Visual Basic.
I tried to combine Uint32 and int32 variables in Visual Basic and it's working somehow:
Dim Q As UInt32
Dim R As Int32
Q = &H9E3779B9UI
R = &HB7E15163
R + Q
But is there any way to add those with one type variable only?