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

  1. // MinObj.h : Declaration of the CMinObj
  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. ////////////////////////////////////////////////////////////////////////////
  14. // minimal
  15.  
  16. class CMinObj :
  17.     public IMinObj,
  18.     public CComObjectRoot,
  19.     public CComCoClass<CMinObj,&CLSID_CMinObj>
  20. {
  21. public:
  22.     CMinObj() {}
  23. BEGIN_COM_MAP(CMinObj)
  24.     COM_INTERFACE_ENTRY(IMinObj)
  25. END_COM_MAP()
  26.  
  27. // making not aggregatable reduces size
  28. DECLARE_NOT_AGGREGATABLE(CMinObj)
  29.  
  30. // with this macro you can put the object in the object map evan though
  31. // it does not have any self registration capabilities (in our case we
  32. // use an external REG file.
  33. DECLARE_NO_REGISTRY()
  34.  
  35. // IMinObj
  36. public:
  37.     STDMETHOD(Hello)();
  38. };
  39.