home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / atl / commap / aggreg / agg.h < prev    next >
C/C++ Source or Header  |  1998-03-26  |  1KB  |  43 lines

  1. // Agg.h : Declaration of the CAgg
  2. //
  3. // This is a part of the Active Template Library.
  4. // Copyright (C) 1996-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Active Template Library Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Active Template Library product.
  12.  
  13. #include "aggres.h"       // main symbols
  14.  
  15. /////////////////////////////////////////////////////////////////////////////
  16. // Aggreg
  17.  
  18. class CAgg :
  19.     public IDispatchImpl<IAgg, &IID_IAgg, &LIBID_AGGREGLib>,
  20.     public ISupportErrorInfo,
  21.     public CComObjectRoot,
  22.     public CComCoClass<CAgg,&CLSID_CAgg>
  23. {
  24. public:
  25.     CAgg(){}
  26. BEGIN_COM_MAP(CAgg)
  27.     COM_INTERFACE_ENTRY(IDispatch)
  28.     COM_INTERFACE_ENTRY(IAgg)
  29.     COM_INTERFACE_ENTRY(ISupportErrorInfo)
  30. END_COM_MAP()
  31. //DECLARE_NOT_AGGREGATABLE(CAgg)
  32. // Remove the comment from the line above if you don't want your object to
  33. // support aggregation.  The default is to support it
  34.  
  35. DECLARE_REGISTRY_RESOURCEID(IDR_Agg)
  36. // ISupportsErrorInfo
  37.     STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  38.  
  39. // IAgg
  40. public:
  41.     STDMETHOD(get_Name)(BSTR* pbstrName);
  42. };
  43.