Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.3 KiB

  1. /****************************************************************************\
  2. *
  3. * reghive.h
  4. *
  5. * Created: William Taylor (wtaylor) 02/13/01
  6. *
  7. * MS Ratings Registry Hive Handling
  8. *
  9. \****************************************************************************/
  10. #ifndef REGISTRY_HIVE_H
  11. #define REGISTRY_HIVE_H
  12. class CRegistryHive
  13. {
  14. private:
  15. bool m_fHiveLoaded; // Hive Loaded?
  16. char m_szPath[MAXPATHLEN+1]; // Hive File Path
  17. CRegKey m_keyHive; // Registry Key to Hive
  18. public:
  19. CRegistryHive();
  20. ~CRegistryHive();
  21. const CRegKey & GetHiveKey( void ) { return m_keyHive; }
  22. void UnloadHive( void );
  23. bool OpenHiveFile( bool p_fCreate );
  24. protected:
  25. bool OpenHiveKey( void );
  26. void DeleteRegistryHive( void );
  27. bool CreateNewHive( int & p_riHiveFile );
  28. bool SaveHiveKey( CRegKey & p_keyHive, int p_iFile );
  29. void ClearHivePath( void ) { m_szPath[0] = '\0'; }
  30. BOOL BuildPolName(LPSTR pBuffer, UINT cbBuffer, UINT (WINAPI *PathProvider)(LPTSTR, UINT));
  31. void SetHiveName( int p_iFile );
  32. void LoadHiveFile( int p_iFile );
  33. #ifdef DEBUG
  34. void EnumerateRegistryKeys( HKEY hkeyTop, LPSTR pszKeyName, int iLevel );
  35. #endif
  36. };
  37. #endif