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

  1. /*
  2.  * ICONNPT.H
  3.  *
  4.  * Header for template IConnectionPoint implementation.
  5.  *
  6.  * Copyright (c)1993-1995 Microsoft Corporation, All Rights Reserved
  7.  *
  8.  * Kraig Brockschmidt, Microsoft
  9.  * Internet  :  kraigb@microsoft.com
  10.  * Compuserve:  >INTERNET:kraigb@microsoft.com
  11.  */
  12.  
  13.  
  14. #ifndef _ICONNPT_H_
  15. #define _ICONNPT_H_
  16.  
  17. #define INC_CONTROLS
  18. #include <inole.h>
  19.  
  20. class CConnectionPoint;
  21. typedef class CConnectionPoint *PCConnectionPoint;
  22.  
  23. class CConnectionPoint : public IConnectionPoint
  24.     {
  25.     protected:
  26.         ULONG           m_cRef;      //Interface reference count
  27.         LPVOID          m_pObj;      //Backpointer to the object
  28.  
  29.     public:
  30.         CConnectionPoint(LPVOID);
  31.         ~CConnectionPoint(void);
  32.  
  33.         STDMETHODIMP QueryInterface(REFIID, LPVOID *);
  34.         STDMETHODIMP_(ULONG) AddRef(void);
  35.         STDMETHODIMP_(ULONG) Release(void);
  36.  
  37.         STDMETHODIMP GetConnectionInterface(IID *);
  38.         STDMETHODIMP GetConnectionPointContainer
  39.             (IConnectionPointContainer **);
  40.         STDMETHODIMP Advise(LPUNKNOWN, DWORD *);
  41.         STDMETHODIMP Unadvise(DWORD);
  42.         STDMETHODIMP EnumConnections(LPENUMCONNECTIONS *);
  43.     };
  44.  
  45.  
  46. #endif //_ICONNPT_H_
  47.