Let me translate the reg key for you to see if you can see where your going wrong:
41 = 0x41 = 65 - in other words the first byte = 41 which is hexadecimal for decimal 65 which is character A
00 = 0x0 = 0 which is the null character; empty space - it is ignored in your output when your doing it right.
30 = 0x30 = 48 - in other words the third byte = 30 which is hexadecimal for decimal 48 which is character 0
00 = 0x0 = 0 which is the null character; empty space - it is ignored in your output when your doing it right.
32 = 0x32 = 50 - in other words the fifth byte = 32 which is hexadecial for decimal 50 which is character 2
this would give you the A02 your looking for.
You get the output of 6505805000 because each byte is converted to string which is just its value. Its working exactly like you told it to.
What you want is
stringbytes += char[bytes];
or something close to that - cant remember the exact procedure to get the value character out and I dont a VS on me right now.
Knowing the diferance between Hex (0-F), and Decimal (0-9), how to convert them, and having a ASCII character code chart to compare it all for letters is essential - get yourself one. Also study up on binary. That wasnt binary data you were looking at. That was a hexadecimal; its very easy to convert hex to binary though, that is why computers use it, it is displayed in hexadecimal to make it easier to read as you will see below.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.