YO SOLO ME RESPONDO YA QUE NADIE SABE APIS.......!!QUE MAL AH!!

jacass1880
05 de Agosto del 2004
Modulo

Private Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As Long

Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long

Private Declare Function RegEnumKey Lib "advapi32.dll" Alias "RegEnumKeyA" (ByVal hKey As Long, ByVal dwIndex As Long, ByVal lpName As String, ByVal cbName As Long) As Long

Public Const HKEY_LOCAL_MACHINE = &H80000002
'
Const SYNCHRONIZE = &H100000
Const READ_CONTROL = &H20000
Const KEY_QUERY_VALUE = &H1
Const KEY_ENUMERATE_SUB_KEYS = &H8
Const KEY_NOTIFY = &H10
Const KEY_READ = ((READ_CONTROL Or KEY_QUERY_VALUE Or KEY_ENUMERATE_SUB_KEYS Or KEY_NOTIFY) And (Not SYNCHRONIZE))


' Enumerar las claves del registro bajo una determinada clave, devolver un array de cadenas.
Function EnumRegistryKeys(ByVal hKey As Long, ByVal KeyName As String) As String()
Dim handle As Long, index As Long, length As Long
ReDim result(0 To 100) As String
Dim FileTimeBuffer(100) As Byte
' Abrir la clave, salir si no se encuentra.
If Len(KeyName) Then
If RegOpenKeyEx(hKey, KeyName, 0, KEY_READ, handle) Then Exit Function
' en todos los casos las funciones subsecuentes utilizan hKey
hKey = handle
End If
For index = 0 To 999999
' Hacer sitio en el array.
If index > UBound(result) Then
ReDim Preserve result(index + 99) As String
End If
length = 260 ' longitud máxima para un nombre de clave.
result(index) = Space$(length)
If RegEnumKey(hKey, index, result(index), length) Then Exit For
result(index) = Left$(result(index), InStr(result(index), vbNullChar) - 1)
Next
' Cerrar la clave, si se encontraba abierta.
If handle Then RegCloseKey handle
' Eliminar los elementos no utilizados del array.
ReDim Preserve result(index - 1) As String
EnumRegistryKeys = result()
End Function




Private Sub cmdmostrar_Click()
On Error GoTo sal
Dim keys() As String, i As Long
keys() = EnumRegistryKeys(HKEY_LOCAL_MACHINE, "SOFTWARE" & Combo1.Text)

' Filtrar algunos elementos especiales
For i = LBound(keys) To UBound(keys)
If Left$(keys(i), 1) = "." Then
' son nombres reservados.
keys(i) = vbNullChar
Else
' filtrar algunos nombres no componentes.
Select Case keys(i)
Case "*", "CLSID", "AppID", "Component Categories"
keys(i) = vbNullChar
End Select
End If
Next
keys() = Filter(keys(), vbNullChar, False)

List1.Clear
For i = LBound(keys) To UBound(keys)
List1.AddItem keys(i)
Next
ShowClass = True

Exit Sub
sal:
MsgBox "Carpeta Vacia!!!!"
End Sub

Private Sub Form_Load()
Dim keys() As String, i As Long
keys() = EnumRegistryKeys(HKEY_LOCAL_MACHINE, "SOFTWARE")

' Filtrar algunos elementos especiales
For i = LBound(keys) To UBound(keys)
If Left$(keys(i), 1) = "." Then
' son nombres reservados.
keys(i) = vbNullChar
Else
' filtrar algunos nombres no componentes.
Select Case keys(i)
Case "*", "CLSID", "AppID", "Component Categories"
keys(i) = vbNullChar
End Select
End If
Next
keys() = Filter(keys(), vbNullChar, False)

List1.Clear
For i = LBound(keys) To UBound(keys)
List1.AddItem keys(i)
Combo1.AddItem keys(i)
Next
ShowClass = True
Combo1.ListIndex = 0
End Sub




" NO ES JUSTO QUE NADIE HAYA PODIDO RESPONDER,BUENO PERO AQUI ESTA EL CODIGO QUE SE UTILIZA "