Поделиться через


CRegKey::DeleteSubKey

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

LONG DeleteSubKey(
   LPCTSTR lpszSubKey 
) throw( );

Параметры

  • lpszSubKey
    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

См. также

Основные понятия

CRegKey Class

CRegKey Members

CRegKey::DeleteValue