|
RegDeleteKey deletes a subkey and its values. See the RegDeleteKeyEx function for more expanded options.
Syntax
LONG RegDeleteKey( HKEY hKey, LPCTSTR lpSubKey );
Parameters
hKey
A handle to an open registry key. The access rights of this key do not affect the delete operation. This handle is returned by the RegCreateKey, RegCreateKeyEx, RegOpenKey or RegOpenKeyEx function, or it can be one of the following predefined Keys:
HKEY_LOCAL_MACHINE
HKEY_USERS
lpSubKey
The name of the key to be deleted. It must be a subkey of the key that hKey identifies, but it cannot have subkeys. This parameter cannot be NULL. Key names are not case sensitive.
Return Values
If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails the return value is a nonzero error code.
Remarks
A deleted key is not removed until the last handle to it is closed.
The subkey to be deleted must not have subkeys.
Requirements
Library | Rtx_Rtss.lib |
See Also: