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.

82 lines
2.2 KiB

  1. /*++
  2. Module Name:
  3. JPENum.h
  4. Abstract:
  5. This file contains the Declaration of the CJunctionPointEnum Class.
  6. This class implements IEnumVARIANT for DfsJunctionPoint enumeration.
  7. --*/
  8. #ifndef __JPENUM_H_
  9. #define __JPENUM_H_
  10. #include "resource.h" // main symbols
  11. #include "DfsRoot.h"
  12. class ATL_NO_VTABLE CJunctionPointEnum :
  13. public CComObjectRootEx<CComMultiThreadModel>,
  14. public CComCoClass<CJunctionPointEnum, &CLSID_JunctionPointEnum>,
  15. public IEnumVARIANT
  16. {
  17. public:
  18. CJunctionPointEnum()
  19. {
  20. }
  21. ~CJunctionPointEnum();
  22. // DECLARE_REGISTRY_RESOURCEID(IDR_JPENUM)
  23. BEGIN_COM_MAP(CJunctionPointEnum)
  24. COM_INTERFACE_ENTRY(IEnumVARIANT)
  25. END_COM_MAP()
  26. public:
  27. // Call this to initialise.
  28. STDMETHOD( Initialize )
  29. (
  30. JUNCTIONNAMELIST* i_pjiList,
  31. FILTERDFSLINKS_TYPE i_lLinkFilterType,
  32. BSTR i_bstrEnumFilter, // Filtering string expresseion
  33. ULONG* o_pulCount = NULL // count of links that matches the filter
  34. );
  35. // IEnumVariant
  36. public:
  37. //Get next Junction point
  38. STDMETHOD(Next)
  39. (
  40. ULONG i_ulNumOfJunctionPoints,
  41. VARIANT * o_pIJunctionPointArray,
  42. ULONG * o_ulNumOfJunctionPointsFetched
  43. );
  44. //Skip junction points
  45. STDMETHOD(Skip)
  46. (
  47. unsigned long i_ulJunctionPointsToSkip
  48. );
  49. //Reset enumeration.
  50. STDMETHOD(Reset)();
  51. //Clone a Enumerator.
  52. STDMETHOD(Clone)
  53. (
  54. IEnumVARIANT FAR* FAR* ppenum
  55. );
  56. protected:
  57. void _FreeMemberVariables() {
  58. FreeJunctionNames(&m_JunctionPoints);
  59. }
  60. JUNCTIONNAMELIST::iterator m_iCurrentInEnumOfJunctionPoints; // Current pointer.
  61. JUNCTIONNAMELIST m_JunctionPoints; // Stores the list of junction point entry path.
  62. };
  63. #endif //__JPENUM_H_