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.

45 lines
1.7 KiB

  1. // --------------------------------------------------------------------------
  2. // Enumfmt.h
  3. // Copyright (c)1993-1995 Microsoft Corporation, All Rights Reserved
  4. // --------------------------------------------------------------------------
  5. #ifndef __ENUMFMT_H
  6. #define __ENUMFMT_H
  7. // Class CEnumFormatEtc
  8. // --------------------
  9. //
  10. // Overview
  11. // This object provides a enumerator for FORMATETC structures. The
  12. // IDataObject uses this when callers invoke IDataObject::EnumFormatEtc.
  13. //
  14. // The data object creates one of this objects and provides an array
  15. // of FORMATETC structures in the constructor. The interface is then
  16. // passed to the invoker of IDataObject::EnumFormatEtc().
  17. //
  18. class CEnumFormatEtc : public IEnumFORMATETC
  19. {
  20. public:
  21. CEnumFormatEtc(LPUNKNOWN, PDATAOBJINFO, ULONG);
  22. CEnumFormatEtc(LPUNKNOWN, ULONG, LPFORMATETC);
  23. ~CEnumFormatEtc(void);
  24. // IUnknown members that delegate to m_pUnkOuter
  25. STDMETHODIMP QueryInterface(REFIID, LPVOID*);
  26. STDMETHODIMP_(ULONG) AddRef(void);
  27. STDMETHODIMP_(ULONG) Release(void);
  28. // IEnumFORMATETC members
  29. STDMETHODIMP Next(ULONG, LPFORMATETC, ULONG FAR *);
  30. STDMETHODIMP Skip(ULONG);
  31. STDMETHODIMP Reset(void);
  32. STDMETHODIMP Clone(IEnumFORMATETC FAR * FAR *);
  33. private:
  34. ULONG m_cRef; // Object reference count
  35. LPUNKNOWN m_pUnkRef; // IUnknown for ref counting
  36. ULONG m_iCur; // Current element
  37. ULONG m_cfe; // Number of FORMATETC's in us
  38. LPFORMATETC m_prgfe; // Source of FORMATETC's
  39. };
  40. #endif // __ENUMFMT_H