home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / com / inole2 / interfac / ienumcp.h < prev    next >
C/C++ Source or Header  |  1996-05-21  |  1KB  |  50 lines

  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.  
  13.  
  14. #ifndef _IENUMCP_H_
  15. #define _IENUMCP_H_
  16.  
  17. #define INC_CONTROLS
  18. #include <inole.h>
  19.  
  20. class CEnumConnectionPoints;
  21. typedef class CEnumConnectionPoints *PCEnumConnectionPoints;
  22.  
  23. class CEnumConnectionPoints : public IEnumConnectionPoints
  24.     {
  25.     private:
  26.         ULONG           m_cRef;     //Object reference count
  27.         LPUNKNOWN       m_pUnkRef;  //IUnknown for ref counting
  28.         ULONG           m_iCur;     //Current element
  29.         ULONG           m_cPoints;  //Number of conn points
  30.         LPCONNECTIONPOINT *m_rgpCP; //Source of conn points
  31.  
  32.     public:
  33.         CEnumConnectionPoints(LPUNKNOWN, ULONG, LPCONNECTIONPOINT *);
  34.         ~CEnumConnectionPoints(void);
  35.  
  36.         //IUnknown members that delegate to m_pUnkRef.
  37.         STDMETHODIMP         QueryInterface(REFIID, LPVOID *);
  38.         STDMETHODIMP_(ULONG) AddRef(void);
  39.         STDMETHODIMP_(ULONG) Release(void);
  40.  
  41.         //IEnumConnectionPoints members
  42.         STDMETHODIMP Next(ULONG, LPCONNECTIONPOINT *, ULONG *);
  43.         STDMETHODIMP Skip(ULONG);
  44.         STDMETHODIMP Reset(void);
  45.         STDMETHODIMP Clone(IEnumConnectionPoints **);
  46.     };
  47.  
  48.  
  49. #endif //_IENUMCP_H_
  50.