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.

70 lines
1.7 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1998, Microsoft Corp. All rights reserved.
  4. //
  5. // FILE
  6. //
  7. // dsenum.h
  8. //
  9. // SYNOPSIS
  10. //
  11. // This file declares the class DSEnumerator.
  12. //
  13. // MODIFICATION HISTORY
  14. //
  15. // 02/20/1998 Original version.
  16. //
  17. ///////////////////////////////////////////////////////////////////////////////
  18. #ifndef _DSENUM_H_
  19. #define _DSENUM_H_
  20. #include <dsobject.h>
  21. #include <iasdebug.h>
  22. ///////////////////////////////////////////////////////////////////////////////
  23. //
  24. // CLASS
  25. //
  26. // DSEnumerator
  27. //
  28. // DESCRIPTION
  29. //
  30. // This class implements IEnumVARIANT for a collection of objects.
  31. //
  32. ///////////////////////////////////////////////////////////////////////////////
  33. class DSEnumerator : public IEnumVARIANT
  34. {
  35. public:
  36. DECLARE_TRACELIFE(DSEnumerator);
  37. DSEnumerator(DSObject* container, IEnumVARIANT* members)
  38. : refCount(0), parent(container), subject(members) { }
  39. //////////
  40. // IUnknown
  41. //////////
  42. STDMETHOD_(ULONG, AddRef)();
  43. STDMETHOD_(ULONG, Release)();
  44. STDMETHOD(QueryInterface)(const IID& iid, void** ppv);
  45. //////////
  46. // IEnumVARIANT
  47. //////////
  48. STDMETHOD(Next)(/*[in]*/ ULONG celt,
  49. /*[length_is][size_is][out]*/ VARIANT* rgVar,
  50. /*[out]*/ ULONG* pCeltFetched);
  51. STDMETHOD(Skip)(/*[in]*/ ULONG celt);
  52. STDMETHOD(Reset)();
  53. STDMETHOD(Clone)(/*[out]*/ IEnumVARIANT** ppEnum);
  54. protected:
  55. LONG refCount;
  56. CComPtr<DSObject> parent; // The container being enumerated.
  57. CComPtr<IEnumVARIANT> subject; // The ADSI enumerator.
  58. };
  59. #endif // _DSENUM_H_