DeleteRegistryValue method


Prototype

DeleteRegistryValue Proto hKey:HKEY, lpszSubKey:LPSTR, lpszValueName:LPSTR

Syntax

Invoke DeleteRegistryValue, hKey, lpszSubKey, lpszValueName

Function

Deletes the specified named value from the specified registry subkey.

Parameters

hKey

Handle to one of the following predefined keys:

ecClassesRoot
ecCurrentUser
ecLocalMachine
ecUsers
ecPerformanceData
ecCurrentConfig
ecDynData

lpszSubKey

Pointer to the effective address of a null-terminated string that names the path of the subkey containing the value to be deleted.

lpszValueName

Pointer to the effective address of a null-terminated string that names the value to be deleted.

Return value

Eax returns TRUE if succesful, or FALSE if not.


REMARKS: The DeleteRegistryValue method expects lpszSubKey and lpszValueName to be Unicode strings if the application is running as Unicode, or ANSI strings if not (see the IsAppUnicode method). You can call DeleteRegistryValueA to delete ANSI values in Unicode applications, or DeleteRegistryValueW to delete Unicode values in ANSI applications.