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.

95 lines
2.0 KiB

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Abstract:
  4. @doc
  5. @module regwriter.hxx | Declaration of the Registry writer
  6. @end
  7. Author:
  8. Stefan Steiner [SSteiner] 07/23/2001
  9. TBD:
  10. Follows the similar style as the sql writer.
  11. Revision History:
  12. Name Date Comments
  13. ssteiner 07/23/2001 created
  14. --*/
  15. ////////////////////////////////////////////////////////////////////////
  16. // Standard foo for file name aliasing. This code block must be after
  17. // all includes of VSS header files.
  18. //
  19. #ifdef VSS_FILE_ALIAS
  20. #undef VSS_FILE_ALIAS
  21. #endif
  22. #define VSS_FILE_ALIAS "INCREGWH"
  23. //
  24. ////////////////////////////////////////////////////////////////////////
  25. #ifndef __REGWRITER_H_
  26. #define __REGWRITER_H_
  27. class CRegistryWriter :
  28. public CVssWriter
  29. // public CCheckPath
  30. {
  31. private:
  32. STDMETHODCALLTYPE CRegistryWriter()
  33. {
  34. }
  35. public:
  36. virtual STDMETHODCALLTYPE ~CRegistryWriter()
  37. {
  38. }
  39. virtual bool STDMETHODCALLTYPE OnIdentify(IN IVssCreateWriterMetadata *pMetadata);
  40. virtual bool STDMETHODCALLTYPE OnPrepareBackup(IN IVssWriterComponents *pWriterComponents);
  41. virtual bool STDMETHODCALLTYPE OnPrepareSnapshot();
  42. virtual bool STDMETHODCALLTYPE OnFreeze();
  43. virtual bool STDMETHODCALLTYPE OnThaw();
  44. virtual bool STDMETHODCALLTYPE OnAbort();
  45. bool IsPathInSnapshot(const WCHAR *path) throw();
  46. public:
  47. static HRESULT CreateWriter();
  48. static void DestroyWriter();
  49. private:
  50. HRESULT STDMETHODCALLTYPE Initialize();
  51. HRESULT STDMETHODCALLTYPE Uninitialize();
  52. void TranslateWriterError(HRESULT hr);
  53. static DWORD InitializeThreadFunc( VOID *pv );
  54. static CRegistryWriter *sm_pWriter; // singleton registry writer object
  55. static HRESULT sm_hrInitialize;
  56. CBsString m_cwsExpandedConfigDir;
  57. CBsString m_cwsExpandedRegistryTargetDir;
  58. BOOL m_bSnapshotSuccessful;
  59. BOOL m_bPerformSnapshot;
  60. };
  61. #endif // _REGWRITER_H_