tjeffryes
asked on
How do you read a REG_BINARY value from the registry using VB?
In all my VBA work, I generally only retrieve string values from the registry or simple REG_DWORD values. I really don't know how to decode the binary values. Does it require a Windows API call if I'm not using .NET?
Please note: This question has already been answered by BlueDevilFan and I'm posting here so that other people can find it and so that I can award him/her the points.
Please don't bother answering this unless you are BlueDevilFan.
Thanks!!!!
Tim Jeffryes
Please note: This question has already been answered by BlueDevilFan and I'm posting here so that other people can find it and so that I can award him/her the points.
Please don't bother answering this unless you are BlueDevilFan.
Thanks!!!!
Tim Jeffryes
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks, Ark, for your response. It looks nearly identical to BlueDevilFan's, but as I noted in my positing, I had already "pre-rewarded" him the points.
thanks everybody.
Tim Jeffryes
thanks everybody.
Tim Jeffryes
Dim wshShell As Object
Dim arrData, i, sData
Set wshShell = CreateObject("WScript.Shel
arrData = wshShell.RegRead("HKLM\SOF
'Now arrData contains a VBArray of integers with members equal to byte sequence in registry key
For i = 0 To UBound(arrData)
If sData <> "" Then sData = sData & " "
sData = sData & Right("0" & Hex(arrData(i)), 2)
Next i
Debug.Print sData
Set wshShell = Nothing
End Sub