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.

92 lines
2.3 KiB

  1. /*++
  2. Copyright (c) 2002 Microsoft Corporation
  3. Abstract:
  4. @doc
  5. @module comregdbwriter.hxx | Declaration of the COM+ RegDB writer
  6. @end
  7. Author:
  8. Ran kalach [rankala] 05/17/2002
  9. Revision History:
  10. Name Date Comments
  11. rankala 05/17/2001 created (based on EventLog writer as a model)
  12. --*/
  13. ////////////////////////////////////////////////////////////////////////
  14. // Standard foo for file name aliasing. This code block must be after
  15. // all includes of VSS header files.
  16. //
  17. #ifdef VSS_FILE_ALIAS
  18. #undef VSS_FILE_ALIAS
  19. #endif
  20. #define VSS_FILE_ALIAS "INCCDBWH"
  21. //
  22. ////////////////////////////////////////////////////////////////////////
  23. #ifndef __CDBWRITER_H_
  24. #define __CDBWRITER_H_
  25. class CComRegDBWriter :
  26. public CVssWriter
  27. {
  28. private:
  29. STDMETHODCALLTYPE CComRegDBWriter() : m_bPerformSnapshot(FALSE)
  30. {
  31. }
  32. public:
  33. virtual STDMETHODCALLTYPE ~CComRegDBWriter()
  34. { }
  35. virtual bool STDMETHODCALLTYPE OnIdentify(IVssCreateWriterMetadata *pMetadata);
  36. virtual bool STDMETHODCALLTYPE OnPrepareBackup(IN IVssWriterComponents *pWriterComponents);
  37. virtual bool STDMETHODCALLTYPE OnPrepareSnapshot();
  38. virtual bool STDMETHODCALLTYPE OnFreeze();
  39. virtual bool STDMETHODCALLTYPE OnThaw();
  40. virtual bool STDMETHODCALLTYPE OnAbort();
  41. // Converted to CUSTOM restore method (see bug# 688278)
  42. #if 0
  43. virtual bool STDMETHODCALLTYPE OnPreRestore(IVssWriterComponents *pComponent);
  44. virtual bool STDMETHODCALLTYPE OnPostRestore(IVssWriterComponents *pComponent);
  45. #endif
  46. public:
  47. static HRESULT CreateWriter();
  48. static void DestroyWriter();
  49. private:
  50. HRESULT STDMETHODCALLTYPE Initialize();
  51. HRESULT STDMETHODCALLTYPE Uninitialize();
  52. HRESULT STDMETHODCALLTYPE StopCOMSysAppService();
  53. void TranslateWriterError(HRESULT hr);
  54. static CComRegDBWriter *sm_pWriter; // singleton writer object
  55. BOOL m_bPerformSnapshot; // whether this writer needs to spit or not
  56. // It needs to spit only if the component is selected or
  57. // this is a BootableSystemState backup
  58. };
  59. #endif // _CDBWRITER_H_