by Angsuman Banerji (23 Submissions)
Category: Registry
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 4th January 2008
Date Added: Mon 8th February 2021
Rating: (1 Votes)
To Read BINARY values from the registry
API Declarations
Dim iByte As Long
Dim vR as Variant
.ClassKey = HKEY_CURRENT_USER
.SectionKey = "Control Panel\Appearance"
.ValueKey = "CustomColors"
vR = .Value
If .ValueType = REG_BINARY Then
' Read through the byte array and output it as a series of hex values:
For iByte = LBound(vR) To UBound(vR)
sOut = sOut & "&H"
If (iByte<&H10) Then
sOut = sOut & "0"
End If
sOut = sOut & Hex$(vR(iByte)) & " "
Next iByte
Else
sOut = vR
End If
Debug.Print sOut
End With