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.

60 lines
1.5 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1996
  5. //
  6. // File: cenumacl.hxx
  7. //
  8. // Contents: Microsoft ADs Enumeration Object For Access Control Lists
  9. //
  10. //
  11. // History: 03-26-98 AjayR Created.
  12. //
  13. //----------------------------------------------------------------------------
  14. class FAR CAccCtrlListEnum : public IEnumVARIANT
  15. {
  16. friend class CAccessControlList;
  17. public:
  18. // IUnknown methods
  19. STDMETHOD(QueryInterface)(REFIID riid, LPVOID FAR* ppvObj);
  20. STDMETHOD_(ULONG, AddRef)();
  21. STDMETHOD_(ULONG, Release)();
  22. // IEnumVARIANT methods
  23. STDMETHOD(Next)(ULONG cElements,
  24. VARIANT FAR* pvar,
  25. ULONG FAR* pcElementFetched);
  26. STDMETHOD(Skip)(ULONG cElements);
  27. STDMETHOD(Reset)();
  28. STDMETHOD(Clone)(IEnumVARIANT FAR* FAR* ppenum);
  29. CAccCtrlListEnum();
  30. virtual ~CAccCtrlListEnum();
  31. static
  32. HRESULT
  33. CreateAclEnum(
  34. CAccCtrlListEnum FAR* FAR* ppEnumVariant,
  35. CAccessControlList *pACL
  36. );
  37. private:
  38. DWORD GetCurElement();
  39. BOOL DecrementCurElement();
  40. BOOL IncrementCurElement();
  41. ULONG _cRef;
  42. CAccessControlList* _pACL;
  43. DWORD _curElement;
  44. };
  45. typedef struct _ACLEnumEntry {
  46. CAccCtrlListEnum * pACLEnum;
  47. struct _ACLEnumEntry * pNext;
  48. } ACL_ENUM_ENTRY, *PACL_ENUM_ENTRY;