INtime SDK Help
RtRegDeleteKey
INtime SDK v6 > About INtime > INtime Kernel > Registry access > RtRegDeleteKey

Deletes the specified subkey from the registry. The entire key, including all of its values, is removed. The subkey to be deleted must not have subkeys.

To open the key, use RtRegCreateKeyEx or RtRegOpenKeyEx.

LONG RtRegDeleteKey(
    HKEY hKey,         // handle to open key
    LPCTSTR lpSubKey   // address of name of subkey to delete
);

Parameters

hKey
Handle to a currently open key or one of the following predefined reserved handle values:

HKEY_CLASSES_ROOT
HKEY_CURRENT_CONFIG
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS
HKEY_PERFORMANCE_DATA

The key specified by the lpSubKey parameter must be a subkey of the key identified by hKey.
lpSubKey
Pointer to a null-terminated string specifying the name of the key to delete. This parameter cannot be NULL.

The specified key must not have subkeys.

Return Values

ERROR_SUCCESS
Success.
A nonzero status code defined in RTWIN32.H
Failure. To determine the status, call GetLastRtError.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/rtbase.h rt.h rt.lib

See Also

Registry system calls, RtRegCreateKeyEx, RtRegOpenKeyEx, RtRegCloseKey