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.

49 lines
1.2 KiB

  1. #ifndef _URLENUM_H_
  2. #define _URLENUM_H
  3. class CEnumString : public IEnumString
  4. {
  5. public:
  6. //////////////////////////////////////////////////////
  7. // Public Interfaces
  8. //////////////////////////////////////////////////////
  9. // *** IUnknown ***
  10. virtual STDMETHODIMP_(ULONG) AddRef(void);
  11. virtual STDMETHODIMP_(ULONG) Release(void);
  12. virtual STDMETHODIMP QueryInterface(REFIID riid, LPVOID * ppvObj);
  13. // *** IEnumString ***
  14. virtual STDMETHODIMP Next(ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched);
  15. virtual STDMETHODIMP Skip(ULONG celt);
  16. virtual STDMETHODIMP Reset(void);
  17. virtual STDMETHODIMP Clone(IEnumString **ppenum);
  18. public:
  19. // Constructor-destructor, don't create this on the stack.
  20. CEnumString();
  21. ~CEnumString();
  22. // This is a very simple class where all the strings should be added
  23. // before any enumeration occurs.
  24. HRESULT AddString(LPCWSTR lpsz);
  25. private:
  26. CRefCount m_ref;
  27. struct ListStr
  28. {
  29. LPTSTR lpsz;
  30. ListStr * pListNext;
  31. };
  32. ListStr * pFirst;
  33. ListStr * pLast;
  34. ListStr * pCurrent;
  35. };
  36. #endif