Source code of Windows XP (NT5)
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.

58 lines
1.4 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1999-2000 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // EnumCookies.h
  7. //
  8. // Description:
  9. // CEnumCookies implementation.
  10. //
  11. // Maintained By:
  12. // Geoffrey Pease (GPease) 08-MAY-2000
  13. //
  14. //////////////////////////////////////////////////////////////////////////////
  15. #pragma once
  16. class CObjectManager;
  17. // CEnumCookies
  18. class
  19. 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( );
  33. ~CEnumCookies();
  34. STDMETHOD( Init )( void );
  35. public: // Methods
  36. static HRESULT
  37. S_HrCreateInstance( IUnknown ** ppunkOut );
  38. // IUnknown
  39. STDMETHOD( QueryInterface )( REFIID riid, LPVOID *ppv );
  40. STDMETHOD_( ULONG, AddRef )( void );
  41. STDMETHOD_( ULONG, Release )( void );
  42. // IEnumCookies
  43. STDMETHOD( Next )( ULONG celt, OBJECTCOOKIE rgcookieOut[], ULONG * pceltFetchedOut );
  44. STDMETHOD( Skip )( ULONG celt );
  45. STDMETHOD( Reset )( void );
  46. STDMETHOD( Clone )( IEnumCookies ** ppenumOut );
  47. STDMETHOD( Count )( DWORD * pnCountOut );
  48. }; // class CEnumCookies