interface IEnum: public IUnknown
{
	public:

		virtual HRESULT __stdcall Next(ULONG, void *, ULONG  *) = 0 ;
		virtual HRESULT __stdcall Skip(ULONG) = 0 ;
		virtual HRESULT __stdcall Reset(void) = 0 ;
		virtual HRESULT __stdcall Clone(IEnum **) = 0 ;
};


class CEnumerator : IEnum
{

    public:

        ULONG           m_RefCount ;    //Enumerator reference count
        LPUNKNOWN       m_pUnkOuter ;	//IUnknown of object that created us
        ULONG           m_nCurrentElement ;     //Current element
        ULONG           m_Count ;      //Number of FORMATETCs in us
        char *			m_pData ;    //Source of FORMATETCs
		IID				m_iid  ;
		DWORD			m_SizeEach ;


        CEnumerator (LPUNKNOWN, void *, DWORD, DWORD, IID);
        ~CEnumerator (void);

        //IUnknown members that delegate to m_pUnkOuter.
        STDMETHODIMP         QueryInterface(REFIID, LPVOID *);
        STDMETHODIMP_(ULONG) AddRef(void);
        STDMETHODIMP_(ULONG) Release(void);

        //IEnumFORMATETC members
       
		STDMETHODIMP Next(ULONG, void *, ULONG  *);
		STDMETHODIMP Skip(ULONG);
        STDMETHODIMP Reset(void);
        STDMETHODIMP Clone(IEnum **);
  
};

