VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



To Read BINARY values from the registry

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


Rate To Read BINARY values from the registry



        .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


Download this snippet    Add to My Saved Code

To Read BINARY values from the registry Comments

No comments have been posted about To Read BINARY values from the registry. Why not be the first to post a comment about To Read BINARY values from the registry.

Post your comment

Subject:
Message:
0/1000 characters