SECRegistry::DeleteKey

Deletes the named registry value of the current key.

Defined in: SECREG.CPP

Syntax

(32-bit) BOOL DeleteKey( LPCTSTR lpszKeyToDelete, BOOL bRecursive);

(16-bit) BOOL DeleteKey( LPCTSTR lpszKeyToDelete);

Return Value

Nonzero if key was deleted, otherwise 0.

Parameters

lpszKeyToDelete

Name of the key to delete.

Comments

Deletes the named registry key. If bRecursive is set to TRUE, it will delete keys in the registry which have subkeys.

The name of the key to delete can be a relative name (to the currently open key), or can be an absolute key name.

Unless the current key was deleted by this operation, the current open key is not affected for this SECRegistry instance. If however, the current key was deleted, the current key is set to the parent key of the deleted key.

bRecursive

Indicates recursive delete operation is requested.

Developer Notes

The recursive function is not available in the 16 bit version.

See Also

SECRegistry  DeleteValue  Close