RegDeleteKeyEx
RegDeleteKeyEx deletes a subkey and its values from the registry. See RegDeleteKey for a basic version of this function.
Syntax
LONG RegDeleteKeyEx(
[in] HKEY hKey,
[in] LPCTSTR lpSubKey,
[in] REGSAM samDesired,
DWORD Reserved
);
Parameters
[in] 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
[in] 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 cannot have subkeys. The value of this parameter cannot be NULL. Key names are not case-sensitive.
[in] 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, it returns ERROR_SUCCESS. If the function fails, it returns a non-zero error code.
Remarks
A deleted key is not removed until the last handle to it is closed.
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
wRTOS 1.0 SDK |
windows.h |
wRTOS_rtss.lib |
See Also: