Deleting a value from the registry? [RESOLVED]
How do you delete an individual value? I tried :
VB Code:
Private Declare Function RegDeleteValue Lib "advapi32.dll" Alias "RegDeleteValueA" (ByVal hKey As Long, ByVal lpValueName As String) As Long
Private Function DeleteValue(ByVal hKey As Long, ByVal strPath As String, ByVal strValue As String)
Dim keyhand As Long
Dim r As Long
r = RegOpenKey(hKey, strPath, keyhand)
r = RegDeleteValue(keyhand, strValue)
r = RegCloseKey(keyhand)
End Function
[B]DeleteValue[/B] &H80000001, "HKEY_CURRENT_USER\Software\Game Maker\Version 5\Preferences\Recent0"
Thanks, it errors "Argument Not Optional" (Bold highlighted)