다음을 통해 공유


CSettingsStore::DeleteKey

Deletes a key and all its children from the registry.

virtual BOOL DeleteKey(
   LPCTSTR pszPath,
   BOOL bAdmin = FALSE
);

Parameters

  • [in] pszPath
    The name of the key to delete.

  • [in] bAdmin
    Switch that specifies the location of the key to delete.

Return Value

Nonzero if successful; otherwise 0.

Remarks

This method will fail if the CSettingsStore object is in read-only mode.

If the parameter bAdmin is zero, DeleteKey searches for the key to delete under HKEY_CURRENT_USER. If bAdmin is nonzero, DeleteKey searches for the key to delete under HKEY_LOCAL_MACHINE.

Requirements

Header: afxsettingsstore.h

See Also

Reference

CSettingsStore Class

Hierarchy Chart