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.

76 lines
1.5 KiB

  1. //____________________________________________________________________________
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997 - 1999
  5. //
  6. // File: taskenum.h
  7. //
  8. // Contents:
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History: 11/19/1997 RaviR Created
  15. //____________________________________________________________________________
  16. //
  17. #ifndef TASKENUM_H__
  18. #define TASKENUM_H__
  19. struct STaskEnums
  20. {
  21. CLSID clsid;
  22. IEnumTASK* pET;
  23. };
  24. class CTaskEnumerator : public IEnumTASK,
  25. public CComObjectRoot
  26. {
  27. // Constructor & destructor
  28. public:
  29. CTaskEnumerator() : m_posCurr(NULL)
  30. {
  31. }
  32. ~CTaskEnumerator();
  33. // ATL COM map
  34. public:
  35. BEGIN_COM_MAP(CTaskEnumerator)
  36. COM_INTERFACE_ENTRY(IEnumTASK)
  37. END_COM_MAP()
  38. // IEnumTASK methods
  39. public:
  40. STDMETHOD(Next)(ULONG celt, MMC_TASK *rgelt, ULONG *pceltFetched);
  41. STDMETHOD(Reset)();
  42. STDMETHOD(Skip)(ULONG celt)
  43. {
  44. return E_NOTIMPL;
  45. }
  46. STDMETHOD(Clone)(IEnumTASK **ppenum)
  47. {
  48. return E_NOTIMPL;
  49. }
  50. // public methods
  51. public:
  52. bool AddTaskEnumerator(const CLSID& clsid, IEnumTASK* pEnumTASK);
  53. // Implementation
  54. private:
  55. CList<STaskEnums, STaskEnums&> m_list;
  56. POSITION m_posCurr;
  57. // Ensure that default copy constructor & assignment are not used.
  58. CTaskEnumerator(const CTaskEnumerator& rhs);
  59. CTaskEnumerator& operator=(const CTaskEnumerator& rhs);
  60. }; // class CTaskEnumerator
  61. #endif // TASKENUM_H__