Utilizo a função abaixo para detectar alterações no registro do windows. Ou seja, ao efetuar qualquer alteração na chave HKEY_CURRENT_USER serei notificado. O problema é que ela informa quando há alguma alteração, mas não informa o conteúdo alterado. Alguém pode me ajudar a conseguir esta informação?
Const HKEY_CLASSES_ROOT = &H80000000
Const HKEY_CURRENT_USER = &H80000001
Const HKEY_LOCAL_MACHINE = &H80000002
Const REG_NOTIFY_CHANGE_NAME = &H1
Const REG_NOTIFY_CHANGE_ATTRIBUTES = &H2
Const REG_NOTIFY_CHANGE_Max_SET = &H4
Const REG_NOTIFY_CHANGE_SECURITY = &H8
Const REG_NOTIFY_ALL = (REG_NOTIFY_CHANGE_NAME Or REG_NOTIFY_CHANGE_ATTRIBUTES Or REG_NOTIFY_CHANGE_Max_SET Or REG_NOTIFY_CHANGE_SECURITY)
Private Declare Function RegNotifyChangeKeyValue Lib "advapi32" (ByVal hKey As Long, ByVal bWatchSubtree As Boolean, ByVal dwNotifyFilter As Long, ByVal hEvent As Long, ByVal fAsynchronous As Boolean) As Long
Private Sub Form_Load()
RegNotifyChangeKeyValue HKEY_CURRENT_USER, True, REG_NOTIFY_ALL, ByVal 0&, False
MsgBox "Registro modificado"
Unload Me
End Sub