The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.



Call this method to remove the specified key from the registry.

      LONG DeleteSubKey(
   LPCTSTR lpszSubKey 
) throw( );


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

If successful, returns ERROR_SUCCESS. If the method fails, the return value is a nonzero error code defined in WINERROR.H.

DeleteSubKey can only delete a key that has no subkeys. If the key has subkeys, call RecurseDeleteKey instead.


Header: atlbase.h