Convert C Code to VB6
Posted on 2008-06-23
I got this code and was told this is how i need to convert it to readable data. I'm trying to find a way to convert the following to be used in vb6 and this is a sample string to decode 9318BC38..
1) Convert the number to IEEE.
2) Shift the highest 9 bit to the left 1 place, wrapping around.
Here's the C code:
int IEEEArray = BitConverter.GetBytes(myNumber));
//Shift most signifigant 9 bits to the left wrapping around.
//These are the high bytes because its little endian.
byte old3 = IEEEArray ;
IEEEArray  = (byte)((IEEEArray  << 1) | (IEEEArray  >> 7));
IEEEArray  = (byte)(IEEEArray  | (old3 & 0x80));