aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_win32/ecore_win32_dnd_enumformatetc.h
blob: a0320c69ef56bbae8d617955e755043c41b32cf6 (plain) (blame)
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);

   virtual ~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__ */