Results 1 to 8 of 8

Thread: registry check - freezing me

Threaded View

  1. #7

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,364

    Re: registry check - freezing me

    thanks i tried smething like this:

    VB Code:
    1. Do
    2.         'Create a buffer
    3.         sSave = String(255, 0)
    4.         'enumerate the values
    5.         If RegEnumValue(hKey, Cnt, sSave, 255, 0, ByVal 0&, ByVal 0&, ByVal 0&) <> 0 Then
    6.             Exit Do
    7.             strKeys(0) = "Nothing"
    8.         Else
    9.             '   Add the Keys to the array.
    10.             ReDim Preserve strKeys(Cnt)
    11.             strKeys(Cnt) = StripTerminator(sSave)
    12.             Cnt = Cnt + 1
    13.         End If
    14.     Loop
    15.    
    16.     'Close the registry
    17.     RegCloseKey hKey
    18.    
    19.     EnumKeyValues = strKeys

    and then..

    VB Code:
    1. Dim RegArray() As String
    2.    Dim intLoop As Integer
    3.    
    4.  
    5.    RegArray = EnumKeyValues(HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Run")
    6.    
    7.    If (RegArray(0) <> "Nothing") Then  
    8.    For intLoop = 0 To UBound(RegArray)
    9.       List1.AddItem RegArray(intLoop)
    10.    Next intLoop
    11.    End If

    but that still doesnt work, still gives error 9 because it doesnt set RegArray(0) to ''Nothing''
    Last edited by Pouncer; Jul 2nd, 2006 at 04:04 AM.

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