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 / ienumcon.h < prev    next >
C/C++ Source or Header  |  1996-05-21  |  1KB  |  50 lines

  1. /*
  2.  * IENUMCON.H
  3.  *
  4.  * Definitions of a template IEnumConnections 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 _IENUMCON_H_
  15. #define _IENUMCON_H_
  16.  
  17. #define INC_CONTROLS
  18. #include <inole.h>
  19.  
  20. class CEnumConnections;
  21. typedef class CEnumConnections *PCEnumConnections;
  22.  
  23. class CEnumConnections : public IEnumConnections
  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_cConn;      //Number of connections
  30.         LPCONNECTDATA   m_rgConnData; //Source of connections
  31.  
  32.     public:
  33.         CEnumConnections(LPUNKNOWN, ULONG, LPCONNECTDATA);
  34.         ~CEnumConnections(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.         //IEnumConnections members
  42.         STDMETHODIMP Next(ULONG, LPCONNECTDATA, ULONG *);
  43.         STDMETHODIMP Skip(ULONG);
  44.         STDMETHODIMP Reset(void);
  45.         STDMETHODIMP Clone(IEnumConnections **);
  46.     };
  47.  
  48.  
  49. #endif //_IENUMCON_H_
  50.