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.

72 lines
1.9 KiB

  1. // VolAsgn.h : Declaration of the CVolAssign
  2. #include "resource.h" // main symbols
  3. #include "Wsb.h" // Wsb Collectable Class
  4. #include "wsbdb.h"
  5. /////////////////////////////////////////////////////////////////////////////
  6. // Task
  7. class CVolAssign :
  8. public CWsbDbEntity,
  9. public IVolAssign,
  10. public CComCoClass<CVolAssign,&CLSID_CVolAssign>
  11. {
  12. public:
  13. CVolAssign() {}
  14. BEGIN_COM_MAP(CVolAssign)
  15. COM_INTERFACE_ENTRY(IVolAssign)
  16. COM_INTERFACE_ENTRY2(IWsbDbEntity, CWsbDbEntity)
  17. COM_INTERFACE_ENTRY(IWsbDbEntityPriv)
  18. COM_INTERFACE_ENTRY(IPersistStream)
  19. COM_INTERFACE_ENTRY(IWsbCollectable)
  20. // COM_INTERFACE_ENTRY(IWsbPersistable)
  21. COM_INTERFACE_ENTRY(IWsbTestable)
  22. END_COM_MAP()
  23. DECLARE_REGISTRY(CVolAssign, _T("Task.VolAssign.1"), _T("Task.VolAssign"), IDS_VOLASSIGN_DESC, THREADFLAGS_BOTH)
  24. // IVolAssign
  25. public:
  26. STDMETHOD(FinalConstruct)(void);
  27. // IWsbDbEntity
  28. public:
  29. STDMETHOD(Print)(IStream* pStream);
  30. STDMETHOD(UpdateKey)(IWsbDbKey *pKey);
  31. WSB_FROM_CWSBDBENTITY;
  32. // IPersist
  33. public:
  34. STDMETHOD(GetClassID)(LPCLSID pClsid);
  35. // IPersistStream
  36. public:
  37. STDMETHOD(GetSizeMax)(ULARGE_INTEGER* /*pSize*/)
  38. { return(E_NOTIMPL); }
  39. STDMETHOD(Load)(IStream* pStream);
  40. STDMETHOD(Save)(IStream* pStream, BOOL clearDirty);
  41. // IWsbTestable
  42. public:
  43. STDMETHOD(Test)(USHORT* /*pTestsPassed*/, USHORT* /*pTestsFailed*/)
  44. { return(E_NOTIMPL); }
  45. // IVolAssign
  46. public:
  47. STDMETHOD(GetVolAssign)(GUID* pBagId, LONGLONG *pSegStartLoc,
  48. LONGLONG *pSegLen, GUID* VolId );
  49. STDMETHOD(SetVolAssign)(GUID bagId, LONGLONG segStartLoc,
  50. LONGLONG SegLen, GUID VolId );
  51. private:
  52. GUID m_BagId;
  53. LONGLONG m_SegStartLoc;
  54. LONGLONG m_SegLen;
  55. GUID m_VolId; // New volume assignment
  56. };