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.

125 lines
3.0 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Abstract:
  4. @doc
  5. @module Snapshot.hxx | Declarations used by the Software Snapshot interface
  6. @end
  7. Author:
  8. Adi Oltean [aoltean] 07/30/1999
  9. Revision History:
  10. Name Date Comments
  11. aoltean 07/30/1999 Created.
  12. aoltean 09/09/1999 dss->vss
  13. --*/
  14. #ifndef __VSSW_SNAPSHOT_HXX__
  15. #define __VSSW_SNAPSHOT_HXX__
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif
  19. /////////////////////////////////////////////////////////////////////////////
  20. // Classes
  21. //
  22. // @class CVsSoftwareSnapshot | IVssSnapshot implementation
  23. //
  24. // @index method | IVssSnapshot
  25. // @doc IVssSnapshot
  26. //
  27. class ATL_NO_VTABLE CVsSoftwareSnapshot :
  28. public CComObjectRoot,
  29. public IVssSnapshot
  30. {
  31. // Constructors/ destructors
  32. public:
  33. CVsSoftwareSnapshot();
  34. ~CVsSoftwareSnapshot();
  35. // ATL stuff
  36. private:
  37. DECLARE_REGISTRY_RESOURCEID(IDR_SWPRV)
  38. BEGIN_COM_MAP(CVsSoftwareSnapshot)
  39. COM_INTERFACE_ENTRY(IVssSnapshot)
  40. END_COM_MAP()
  41. // Operations
  42. public:
  43. static HRESULT CreateInstance(
  44. IN CVssQueuedSnapshot* pQSnap,
  45. OUT IUnknown** ppSnapItf,
  46. IN const IID iid = IID_IVssSnapshot
  47. );
  48. // Ovverides
  49. public:
  50. //
  51. // interface IVssSnapshot
  52. //
  53. STDMETHOD(GetID)(
  54. OUT VSS_ID* pSnapshotId
  55. );
  56. STDMETHOD(GetDevice)(
  57. OUT VSS_PWSZ* ppwszSnapshotDeviceName
  58. );
  59. STDMETHOD(GetOriginalVolumeName)(
  60. OUT VSS_PWSZ* ppwszVolumeName
  61. );
  62. STDMETHOD(GetAttributes)(
  63. OUT LONG* plAttributes
  64. );
  65. STDMETHOD(GetCustomProperty)(
  66. IN VSS_PWSZ pwszPropertyName,
  67. OUT VARIANT* pPropertyValue
  68. );
  69. STDMETHOD(SetCustomProperty)(
  70. IN VSS_PWSZ pwszPropertyName,
  71. IN VARIANT PropertyValue
  72. );
  73. STDMETHOD(GetProperties)(
  74. IN LONG lMask,
  75. OUT PVSS_SNAPSHOT_PROP pProp
  76. );
  77. STDMETHOD(SetAttributes)(
  78. IN ULONG lNewAttributes,
  79. IN ULONG lBitsToChange // Mask of bits to be changed
  80. );
  81. STDMETHOD(SetProperties)(
  82. IN LONG lMask,
  83. IN PVSS_SNAPSHOT_PROP pProp
  84. );
  85. // Data members
  86. protected:
  87. CComPtr<CVssQueuedSnapshot> m_ptrQueuedSnapshot; // Release called automatically at destruction time
  88. // Critical section or avoiding race between tasks
  89. CComCriticalSection m_cs;
  90. };
  91. #endif // __VSSW_SNAPSHOT_HXX__