home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / addins / pipe / pipeit.h < prev    next >
C/C++ Source or Header  |  1998-04-02  |  1KB  |  48 lines

  1. // PipeIt.h : Declaration of the CPipeIt
  2.  
  3. #ifndef __PIPEIT_H_
  4. #define __PIPEIT_H_
  5.  
  6. #include "resource.h"       // main symbols
  7. #include <ObjModel\addguid.h>
  8. #include <ObjModel\appguid.h>
  9. #include <ObjModel\bldguid.h>
  10. #include <ObjModel\textguid.h>
  11. #include <ObjModel\dbgguid.h>
  12.  
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CPipeIt
  15. class ATL_NO_VTABLE CPipeIt : 
  16.     public CComObjectRootEx<CComSingleThreadModel>,
  17.     public CComCoClass<CPipeIt, &CLSID_PipeIt>,
  18.     public IDSAddIn,
  19.     public IDispatchImpl<IPipeIt, &IID_IPipeIt, &LIBID_PIPELib>
  20. {
  21. public:
  22.     CPipeIt()
  23.     {
  24.     }
  25.  
  26. DECLARE_REGISTRY_RESOURCEID(IDR_PIPEIT)
  27.  
  28. BEGIN_COM_MAP(CPipeIt)
  29.     COM_INTERFACE_ENTRY(IPipeIt)
  30.     COM_INTERFACE_ENTRY2(IDispatch, IPipeIt)
  31.     COM_INTERFACE_ENTRY(IDSAddIn)
  32. END_COM_MAP()
  33.  
  34.     CComPtr<IApplication> m_spApplication;
  35.     DWORD m_dwAddInID;
  36.  
  37. // IDSAddIn methods
  38. public:
  39.     STDMETHOD(OnConnection)(IApplication* pApp, VARIANT_BOOL bFirstTime, long dwCookie, VARIANT_BOOL* bOnConnection);
  40.     STDMETHOD(OnDisconnection)(VARIANT_BOOL bLastTime);
  41.  
  42. // IPipeIt
  43. public:
  44.     STDMETHOD(Filter)();
  45. };
  46.  
  47. #endif //__PIPEIT_H_
  48.