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.

68 lines
1.0 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. RegWriter.h
  5. Abstract:
  6. Contains the registry writer abstraction
  7. Author:
  8. Mike Cirello
  9. Vijay Jayaseelan (vijayj)
  10. Revision History:
  11. 03 March 2001 :
  12. Rewamp the whole source to make it more maintainable
  13. (particularly readable)
  14. --*/
  15. #pragma once
  16. #include <windows.h>
  17. #include <stdio.h>
  18. #include "Data.h"
  19. //
  20. // Registry writer abstraction
  21. //
  22. class RegWriter{
  23. public:
  24. RegWriter(){}
  25. ~RegWriter();
  26. //
  27. // member functions
  28. //
  29. DWORD Init(int LUID, PCTSTR target);
  30. DWORD Load(PCTSTR Key, PCTSTR fileName);
  31. DWORD Save(PCTSTR Key, PCTSTR fileName);
  32. DWORD Write(PCTSTR Root, PCTSTR Key, PCTSTR Value, DWORD flag, Data* data);
  33. DWORD Delete(
  34. PCTSTR Root,
  35. PCTSTR Key,
  36. PCTSTR Value);
  37. private:
  38. //
  39. // data members
  40. //
  41. TCHAR root[MAX_PATH];
  42. HKEY key;
  43. int luid;
  44. //
  45. // static data members
  46. //
  47. static int ctr;
  48. static TCHAR Namespace[64]; // to hold a GUID
  49. };