aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ecore/src/lib/ecore_win32/ecore_win32_dnd_enumformatetc.h
blob: 9f17f5684e9009f239b30e43d30d1329bab13b2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef __ECORE_WIN32_DND_ENUMFORMATETC_H__
#define __ECORE_WIN32_DND_ENUMFORMATETC_H__


#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
#include <objbase.h>


class CEnumFormatEtc : public IEnumFORMATETC
{
 private:

   LONG       ref_count_;        // Reference count for this COM interface
   ULONG      index_;           // current enumerator index
   ULONG      formats_num_;      // number of FORMATETC members
   FORMATETC *format_etc_;       // array of FORMATETC objects

 public: // structors

   CEnumFormatEtc(FORMATETC *pFormatEtc, int nNumFormats);

   ~CEnumFormatEtc();

 public: // IUnknown

   HRESULT __stdcall  QueryInterface (REFIID iid, void ** ppvObject);

   ULONG   __stdcall  AddRef (void);

   ULONG   __stdcall  Release (void);

 public: // IEnumFormatEtc

   HRESULT __stdcall  Next  (ULONG celt, FORMATETC * rgelt, ULONG * pceltFetched);

   HRESULT __stdcall  Skip  (ULONG celt);

   HRESULT __stdcall  Reset (void);

   HRESULT __stdcall  Clone (IEnumFORMATETC ** ppEnumFormatEtc);
};

void DeepCopyFormatEtc(FORMATETC *dest, FORMATETC *source);

HRESULT CreateEnumFormatEtc(UINT cfmt, FORMATETC *afmt, IEnumFORMATETC **ppEnumFormatEtc);


#endif /* __ECORE_WIN32_DND_ENUMFORMATETC_H__ */