CRegKey::DeleteSubKey

LONG DeleteSubKey( LPCTSTR lpszSubKey );

Return Value

If successful, returns ERROR_SUCCESS; otherwise, an error value.

Parameters

lpszSubKey

[in] Specifies the name of the key to delete. This name must be a subkey of m_hKey.

Remarks

Removes the specified key from the registry. Under Windows 95, DeleteSubKey deletes the key and all its subkeys. Under Windows NT, DeleteSubKey can only delete a key that has no subkeys. If the key has subkeys, call RecurseDeleteKey instead.

CRegKey OverviewClass Members

See Also   CRegKey::DeleteValue