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.

61 lines
2.3 KiB

  1. /*****************************************************************************\
  2. FILE: ftpefe.h
  3. \*****************************************************************************/
  4. #ifndef _FTPEFE_H
  5. #define _FTPEFE_H
  6. /*****************************************************************************\
  7. CLASS: CFtpEfe
  8. DESCRIPTION:
  9. The stuff that tracks the state of an enumeration.
  10. \*****************************************************************************/
  11. class CFtpEfe : public IEnumFORMATETC
  12. {
  13. public:
  14. //////////////////////////////////////////////////////
  15. // Public Interfaces
  16. //////////////////////////////////////////////////////
  17. // *** IUnknown ***
  18. virtual STDMETHODIMP_(ULONG) AddRef(void);
  19. virtual STDMETHODIMP_(ULONG) Release(void);
  20. virtual STDMETHODIMP QueryInterface(REFIID riid, LPVOID * ppvObj);
  21. // *** IEnumFORMATETC ***
  22. virtual STDMETHODIMP Next(ULONG celt, FORMATETC * rgelt, ULONG *pceltFetched);
  23. virtual STDMETHODIMP Skip(ULONG celt);
  24. virtual STDMETHODIMP Reset(void);
  25. virtual STDMETHODIMP Clone(IEnumFORMATETC **ppenum);
  26. public:
  27. // Friend Functions
  28. friend HRESULT CFtpEfe_Create(DWORD dwSize, FORMATETC rgfe[], STGMEDIUM rgstg[], CFtpObj * pfo, IEnumFORMATETC ** ppenum);
  29. protected:
  30. // Private Member Variables
  31. int m_cRef;
  32. DWORD m_dwIndex; // Current Item in the m_hdsaFormatEtc list
  33. DWORD m_dwExtraIndex; // Current Item in the m_pfo->m_hdsaSetData list
  34. HDSA m_hdsaFormatEtc; // pointer to the array
  35. CFtpObj * m_pfo; // pointer to the parent IDataObject impl that has the list of extra data from ::SetData.
  36. CFtpEfe(DWORD dwSize, FORMATETC rgfe[], STGMEDIUM rgstg[], CFtpObj * pfo);
  37. CFtpEfe(DWORD dwSize, HDSA hdsaFormatEtc, CFtpObj * pfo, DWORD dwIndex);
  38. ~CFtpEfe(void);
  39. // Public Member Functions
  40. HRESULT _NextOne(FORMATETC * pfetc);
  41. // Friend Functions
  42. friend HRESULT CFtpEfe_Create(DWORD dwSize, HDSA m_hdsaFormatEtc, DWORD dwIndex, CFtpObj * pfo, IEnumFORMATETC ** ppenum);
  43. friend HRESULT CFtpEfe_Create(DWORD dwSize, FORMATETC rgfe[], STGMEDIUM rgstg[], CFtpObj * pfo, CFtpEfe ** ppfefe);
  44. };
  45. #endif // _FTPEFE_H