CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: RegQueryValue

  1. #1
    Join Date
    Feb 2000
    Location
    America
    Posts
    130

    RegQueryValue

    Anyone know how to use RegQueryValue? I've tried several different ways, but each time i get a number back instead of the key's value...any suggestions?


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: RegQueryValue

    try this sample from msdn

    private Sub QueryValue (sKeyName as string, sValueName as string)
    Dim lRetVal as Long 'result of the API functions
    Dim hKey as Long 'handle of opened key
    Dim vValue as Variant 'setting of queried value

    lRetVal = RegOpenKeyEx(HKEY_CURRENT_USER, sKeyName, 0, _
    KEY_ALL_ACCESS, hKey)
    lRetVal = QueryValueEx(hKey, sValueName, vValue)
    MsgBox vValue
    RegCloseKey (hKey)
    End Sub




    article number: Q145679



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured