Results 1 to 2 of 2
  1. #1
    Lounger
    Join Date
    Jan 2001
    Posts
    47
    Thanks
    3
    Thanked 0 Times in 0 Posts

    RegQueryInfoKey() in W2K

    The following statement which works fine in Win98 (Access 97 VBA) returns error 87 (invalid parameter) in W2K. MSDN SDK says something about validity of the lpclass parameter, but I can't figure out what's wrong.

    Declare Function RegQueryInfoKey Lib "advapi32.dll" Alias "RegQueryInfoKeyA" ( _
    ByVal hKey As Long, ByVal lpClass As String, lpcbClass As Long _
    , lpReserved As Long, lpcSubKeys As Long, lpcbMaxSubKeyLen As Long _
    , lpcbMaxClassLen As Long, lpcValues As Long, lpcbMaxValueNameLen As Long _
    , lpcbMaxValueLen As Long, lpcbSecurityDescriptor As Long _
    , lpftLastWriteTime As FILETIME) As Long


    Dim ft As FILETIME
    Dim hKey As Long
    Dim lngResult As Long

    lngResult = RegOpenKeyEx(plngRoot, pstrKey, 0, KEY_READ, hKey)
    lngResult = RegQueryInfoKey(hKey, 0, 0, 0, clngSubkeys, 0, 0, 0, 0, 0, 0, ft)

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: RegQueryInfoKey() in W2K

    As a workaround, will

    System.PrivateProfileString

    provide the same solution but without the "overhead" of the API call?
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

Posting Permissions

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