RegDeleteKeyEx
RegDeleteKeyEx deletes a subkey and its values from the registry. See RegDeleteKey for a basic version of this function.
Syntax
LONG RegDeleteKeyEx( HKEY hKey, LPCTSTR lpSubKey, REGSAM samDesired, DWORD Reserved );
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. This key must be a subkey of the key specified by the value of the hKey parameter, but it can not have subkeys. The value of this parameter cannot be NULL. Key names are not case sensitive.
samDesired
Access mask that specifies the platform-specific view of registry.
Value | Meaning |
KEY_WOW64_32KEY 0x0200 | Delete the key from the 64-bit registry view. |
Reserved
This parameter is reserved and must be zero.
Return Value
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.
Requirements
Minimum Supported Version | RTX64 2013 |
Header | windows.h |
Library | Rtx_Rtss.lib |
See Also: