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.

66 lines
1.6 KiB

  1. // BagHole.h : Declaration of the CBagHole
  2. #include "resource.h" // main symbols
  3. #include "Wsb.h" // Wsb Collectable Class
  4. #include "wsbdb.h"
  5. /////////////////////////////////////////////////////////////////////////////
  6. // Task
  7. class CBagHole :
  8. public CWsbDbEntity,
  9. public IBagHole,
  10. public CComCoClass<CBagHole,&CLSID_CBagHole>
  11. {
  12. public:
  13. CBagHole() {}
  14. BEGIN_COM_MAP(CBagHole)
  15. COM_INTERFACE_ENTRY(IBagHole)
  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(IWsbTestable)
  21. END_COM_MAP()
  22. DECLARE_REGISTRY(CBagHole, _T("Task.BagHole.1"), _T("Task.BagHole"), IDS_BAGHOLE_DESC, THREADFLAGS_BOTH)
  23. // IBagHole
  24. public:
  25. STDMETHOD(FinalConstruct)(void);
  26. // IWsbDbEntity
  27. public:
  28. STDMETHOD(Print)(IStream* pStream);
  29. STDMETHOD(UpdateKey)(IWsbDbKey *pKey);
  30. WSB_FROM_CWSBDBENTITY;
  31. // IPersist
  32. public:
  33. STDMETHOD(GetClassID)(LPCLSID pClsid);
  34. // IPersistStream
  35. public:
  36. STDMETHOD(GetSizeMax)(ULARGE_INTEGER* pSize);
  37. STDMETHOD(Load)(IStream* pStream);
  38. STDMETHOD(Save)(IStream* pStream, BOOL clearDirty);
  39. // IWsbTestable
  40. public:
  41. STDMETHOD(Test)(USHORT *pTestsPassed, USHORT* pTestsFailed);
  42. //*/
  43. // IBagHole
  44. public:
  45. STDMETHOD(GetBagHole)(GUID* pBagId, LONGLONG *pSegStartLoc, LONGLONG *pSegLen );
  46. STDMETHOD(SetBagHole)(GUID bagId, LONGLONG segStartLoc, LONGLONG SegLen );
  47. private:
  48. GUID m_BagId;
  49. LONGLONG m_SegStartLoc;
  50. LONGLONG m_SegLen;
  51. };