Hi there!

Once again I'm in need of professional skill:

I want to read a value from the registry. This value is in hex. For example
the value '300.000' is displayed as '0x000493e0' (and stored as '000493e0').
No problem so far, but when I read this value from my vb-app, I receive the
value '' (= crap).
I changed the value to 34343434 ('cause 34 in hex is '4' in ASCII) and I
received '4444' (just as I expected).

So, here is the problem:
Why does the code (typed below) read each single byte from the registry-value
and convert it as if it was an ASCII code??
And how to fix??

Here's the code I used:

...
rc = RegOpenKeyEx(&H80000002, pathName(i), 0, &H1, hKey)

If rc = 0 Then
rc = RegQueryInfoKey(hKey, 0, 0, 0, 0, 0, 0, 0, 0, ValueLen, 0, 0)
ValueLen = ValueLen + 1
ValueData = Space(ValueLen)
rc = RegQueryValueEx(hKey, ValueName, 0, REG_BINARY, ByVal ValueData,
ValueLen)
Select Case ValueType
Case 1, 2, 7:
ValueLen = ValueLen - 1
End Select
lblMax(i).Caption = Left(ValueData, ValueLen)
rc = RegCloseKey(hKey)
...

Instead of REG_BINARY I also used REG_DWORD, REG_SZ, REG_NONE, REG_DWORD_BIG_ENDIAN,
REG_EXPAND_SZ and REG_MULTI_SZ, but nothing seemed to work.

Now, have a go!!

10 print "Thank you"
20 goto 10

;-)