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.

56 lines
1.6 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1999-2001 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // EnumCookies.h
  7. //
  8. // Description:
  9. // CEnumCookies implementation.
  10. //
  11. // Maintained By:
  12. // David Potter (DavidP) 19-JUN-2001
  13. // Geoffrey Pease (GPease) 08-MAY-2000
  14. //
  15. //////////////////////////////////////////////////////////////////////////////
  16. #pragma once
  17. class CObjectManager;
  18. // CEnumCookies
  19. class CEnumCookies
  20. : public IEnumCookies
  21. {
  22. friend class CObjectManager;
  23. private:
  24. // IUnknown
  25. LONG m_cRef;
  26. // IEnumCookies
  27. ULONG m_cAlloced; // Size of the array.
  28. ULONG m_cIter; // Our iter counter.
  29. OBJECTCOOKIE * m_pList; // Array of cookies.
  30. DWORD m_cCookies; // Number of array items in use
  31. private: // Methods
  32. CEnumCookies( void );
  33. ~CEnumCookies( void );
  34. STDMETHOD( HrInit )( void );
  35. public: // Methods
  36. static HRESULT S_HrCreateInstance( IUnknown ** ppunkOut );
  37. // IUnknown
  38. STDMETHOD( QueryInterface )( REFIID riidIn, LPVOID * ppvOut );
  39. STDMETHOD_( ULONG, AddRef )( void );
  40. STDMETHOD_( ULONG, Release )( void );
  41. // IEnumCookies
  42. STDMETHOD( Next )( ULONG celt, OBJECTCOOKIE rgcookieOut[], ULONG * pceltFetchedOut );
  43. STDMETHOD( Skip )( ULONG celt );
  44. STDMETHOD( Reset )( void );
  45. STDMETHOD( Clone )( IEnumCookies ** ppenumOut );
  46. STDMETHOD( Count )( DWORD * pnCountOut );
  47. }; //*** class CEnumCookies