Leaked source code of windows server 2003
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.

45 lines
1.3 KiB

  1. // Registry.h: interface for the CRegistry class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_REGISTRY_H__09E5ED27_DD94_4287_9B5B_5DBF9D182B06__INCLUDED_)
  5. #define AFX_REGISTRY_H__09E5ED27_DD94_4287_9B5B_5DBF9D182B06__INCLUDED_
  6. #include "RegDataItem.h" // Added by ClassView
  7. #if _MSC_VER > 1000
  8. #pragma once
  9. #endif // _MSC_VER > 1000
  10. #include "RegAnalyzer.h"
  11. class CRegDiffFile;
  12. enum SectionType;
  13. enum ValueExistsCode
  14. {
  15. VALUE_DOESNT_EXIST=0,
  16. VALUE_EXISTS_DIFF_DATA,
  17. VALUE_EXISTS_SAME_DATA
  18. };
  19. class CRegistry
  20. {
  21. public:
  22. static bool DecodeRootKeyStr(LPCTSTR RootKeyName, PHKEY pRootKey);
  23. CRegDataItemPtr GetValue(CRegDataItemPtr pItem);
  24. bool DeleteValue(CRegDataItemPtr pItem);
  25. bool DeleteKey(CRegDataItemPtr pItem);
  26. bool SaveKey(CRegDataItemPtr pItem, CRegDiffFile& file, SectionType section);
  27. bool AddValue(CRegDataItemPtr pItem);
  28. ValueExistsCode ValueExists(CRegDataItemPtr pItem);
  29. bool AddKey(CRegDataItemPtr pItem);
  30. bool KeyExists(CRegDataItemPtr pItem);
  31. CRegistry();
  32. virtual ~CRegistry();
  33. protected:
  34. bool OpenKey(CRegDataItemPtr pItem, PHKEY pKey);
  35. CRegAnalyzer m_RegAnalyzer;
  36. };
  37. #endif // !defined(AFX_REGISTRY_H__09E5ED27_DD94_4287_9B5B_5DBF9D182B06__INCLUDED_)