Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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