IENUMCP.H
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:1k
源码类别:

Windows编程

开发平台:

Visual C++

  1. /*
  2.  * IENUMCP.H
  3.  *
  4.  * Definitions of a template IEnumConnectionPoints enumerator.
  5.  *
  6.  * Copyright (c)1993-1995 Microsoft Corporation, All Right Reserved
  7.  *
  8.  * Kraig Brockschmidt, Microsoft
  9.  * Internet  :  kraigb@microsoft.com
  10.  * Compuserve:  >INTERNET:kraigb@microsoft.com
  11.  */
  12. #ifndef _IENUMCP_H_
  13. #define _IENUMCP_H_
  14. #define INC_CONTROLS
  15. #include <inole.h>
  16. class CEnumConnectionPoints;
  17. typedef class CEnumConnectionPoints *PCEnumConnectionPoints;
  18. class CEnumConnectionPoints : public IEnumConnectionPoints
  19.     {
  20.     private:
  21.         ULONG           m_cRef;     //Object reference count
  22.         LPUNKNOWN       m_pUnkRef;  //IUnknown for ref counting
  23.         ULONG           m_iCur;     //Current element
  24.         ULONG           m_cPoints;  //Number of conn points
  25.         LPCONNECTIONPOINT *m_rgpCP; //Source of conn points
  26.     public:
  27.         CEnumConnectionPoints(LPUNKNOWN, ULONG, LPCONNECTIONPOINT *);
  28.         ~CEnumConnectionPoints(void);
  29.         //IUnknown members that delegate to m_pUnkRef.
  30.         STDMETHODIMP         QueryInterface(REFIID, LPVOID *);
  31.         STDMETHODIMP_(ULONG) AddRef(void);
  32.         STDMETHODIMP_(ULONG) Release(void);
  33.         //IEnumConnectionPoints members
  34.         STDMETHODIMP Next(ULONG, LPCONNECTIONPOINT *, ULONG *);
  35.         STDMETHODIMP Skip(ULONG);
  36.         STDMETHODIMP Reset(void);
  37.         STDMETHODIMP Clone(IEnumConnectionPoints **);
  38.     };
  39. #endif //_IENUMCP_H_