Results 1 to 20 of 20

Thread: Deleting a value from the registry? [RESOLVED]

Threaded View

  1. #1

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253

    Deleting a value from the registry? [RESOLVED]

    How do you delete an individual value? I tried :


    VB Code:
    1. Private Declare Function RegDeleteValue Lib "advapi32.dll" Alias "RegDeleteValueA" (ByVal hKey As Long, ByVal lpValueName As String) As Long
    2.  
    3. Private Function DeleteValue(ByVal hKey As Long, ByVal strPath As String, ByVal strValue As String)
    4.     Dim keyhand As Long
    5.     Dim r As Long
    6.     r = RegOpenKey(hKey, strPath, keyhand)
    7.     r = RegDeleteValue(keyhand, strValue)
    8.     r = RegCloseKey(keyhand)
    9. End Function
    10.  
    11. [B]DeleteValue[/B] &H80000001, "HKEY_CURRENT_USER\Software\Game Maker\Version 5\Preferences\Recent0"

    Thanks, it errors "Argument Not Optional" (Bold highlighted)
    Last edited by Madboy; Jan 25th, 2004 at 12:15 PM.

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