7.3 WFMDeleteKey

HRESULT WFMDeleteKey ( hKey, lpszSubKey )

Deletes the specified key. This function cannot delete a key that has subkeys.

Parameters HKEY hKey

Handle to a currently open key, or the predefined handle value:
WFS_CFG_HKEY_XFS_ROOT
The key specified by the lpszSubKey parameter must be a subkey of the key identified by this parameter.

LPSTR lpszSubKey

Pointer to a null-terminated string specifying the name of the key to be deleted.

Comments If this function succeeds, the specified key is removed from the configuration information. The entire key, including all its values, is removed.

Error Codes If the function return is not WFS_SUCCESS, it is one of the following error conditions.

WFS_ERR_CFG_INVALID_HKEY
The specified hKey parameter does not correspond to a currently open key.
WFS_ERR_CFG_INVALID_SUBKEY
The key specified by lpszSubKey does not exist.
WFS_ERR_CFG_KEY_NOT_EMPTY
The specified key has subkeys and cannot be deleted. The subkeys must be deleted first.
WFS_ERR_INVALID_POINTER
A pointer parameter does not point to accessible memory.