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.

27 lines
636 B

  1. #pragma once
  2. #define STRICT
  3. #include <windows.h>
  4. #include <crtdbg.h>
  5. class CMcRegistry
  6. {
  7. public:
  8. CMcRegistry();
  9. ~CMcRegistry();
  10. public:
  11. bool OpenKey(HKEY hkeyStart, LPCTSTR strKey, REGSAM sam = KEY_READ | KEY_WRITE);
  12. bool CreateKey(HKEY hkeyStart, LPCTSTR strKey);
  13. bool CloseKey();
  14. bool GetValue(LPCTSTR strValue, LPTSTR strData, ULONG nBufferSize);
  15. bool GetValue(LPCTSTR strValue, DWORD& rdw);
  16. bool SetValue(LPCTSTR strValue, LPCTSTR strData);
  17. bool SetValue(LPCTSTR strValue, DWORD rdw);
  18. private:
  19. HKEY m_hkey;
  20. };
  21. //---------------------------------------------------------------------------