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.

59 lines
1.6 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997 - 1999
  6. //
  7. // File: fmtetc.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #ifndef _INC_CSCUI_FMTETC_H
  11. #define _INC_CSCUI_FMTETC_H
  12. class CEnumFormatEtc : public IEnumFORMATETC
  13. {
  14. public:
  15. CEnumFormatEtc(UINT cFormats, LPFORMATETC prgFormats);
  16. CEnumFormatEtc(const CEnumFormatEtc& ef);
  17. ~CEnumFormatEtc(VOID);
  18. //
  19. // IUnknown methods.
  20. //
  21. STDMETHODIMP QueryInterface(REFIID riid, LPVOID *ppvOut);
  22. STDMETHODIMP_(ULONG) AddRef(VOID);
  23. STDMETHODIMP_(ULONG) Release(VOID);
  24. //
  25. // IEnumFORMATETC methods.
  26. //
  27. STDMETHODIMP Next(DWORD, LPFORMATETC, LPDWORD);
  28. STDMETHODIMP Skip(DWORD);
  29. STDMETHODIMP Reset(VOID);
  30. STDMETHODIMP Clone(IEnumFORMATETC **);
  31. //
  32. // Called to add formats to the enumerator. Used by ctors.
  33. //
  34. HRESULT AddFormats(UINT cFormats, LPFORMATETC prgFormats);
  35. //
  36. // For implementations non-exception throwing clients.
  37. //
  38. bool IsValid(void) const
  39. { return SUCCEEDED(m_hrCtor); }
  40. private:
  41. LONG m_cRef;
  42. int m_cFormats;
  43. int m_iCurrent;
  44. LPFORMATETC m_prgFormats;
  45. HRESULT m_hrCtor;
  46. //
  47. // Prevent assignment.
  48. //
  49. void operator = (const CEnumFormatEtc&);
  50. };
  51. #endif // _INC_CSCUI_FMTETC_H