El olly esta muy bien, interfaz de win y bastante completo
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
Private Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Private Declare Function RegDeleteKey Lib "advapi32.dll" Alias "RegDeleteKeyA" (ByVal hKey As Long, ByVal lpSubKey As String) As Long
Private Declare Function RegDeleteValue Lib "advapi32.dll" Alias "RegDeleteValueA" (ByVal hKey As Long, ByVal lpValueName As String) As Long
Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long
Private Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, lpType As Long, lpData As Any, lpcbData As Long) As Long
Private Const HKEY_LOCAL_MACHINE = &H80000002
[
Private Sub Command1_Click()
Dim h, buffer As String
buffer = String(1024, vbNullChar)
'crear una clave
RegOpenKey HKEY_LOCAL_MACHINE, "SOFTWARE", h
RegCreateKey h, "PRUEBA", h
RegCloseKey h
'aqui ya tienes la clave creada
'escribir un valor
RegOpenKey HKEY_LOCAL_MACHINE, "SOFTWARE\PRUEBA", h
RegSetValueEx h, "Nombre", 0, 1, ByVal "datos", Len("datos")
' aqui ya tienes el nuevo valor y datos en la clave creada
' borrar del registro el valor de la clave
RegDeleteValue h, "Nombre" ' Aqui se a borrado el nombre "Nombre" y el valor "datos"
RegCloseKey h
RegOpenKey HKEY_LOCAL_MACHINE, "SOFTWARE\PRUEBA", h
RegQueryValueEx h, "Nombre", 0, 1, ByVal buffer, Len(buffer)
' ya tienes en buffer el valor de "Nombre"
RegDeleteKey HKEY_LOCAL_MACHINE, "SOFTWARE\PRUEBA"
RegCloseKey h
' y ya esta todo borrado claves y subclaves
End Sub