Convert C Code to VB6

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 [3];
IEEEArray [3] = (byte)((IEEEArray [3] << 1) | (IEEEArray [2] >> 7));
IEEEArray [2] = (byte)(IEEEArray [2] | (old3 & 0x80));
return (IEEEArray);
Who is Participating?
danaseamanConnect With a Mentor Commented:
See if this helps:

Function i3efp(num_in) 'convert a decimal number to IEEE floating point (32 bit; 8 hex characters) hex string
Function i3e2d(hstr)   ' And, of course, convert a 32-bit IEEE-formatted hex string to a decimal numbe
thaburnerAuthor Commented:
Thanks, It will take me a little while to test the code to see how it works....
thaburnerAuthor Commented:
Thanks for you help but I'm going to just compile into into a C dll and use that in VB, that should make simplify things.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.