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

  1. // LabObj.h : Declaration of the CLabrador
  2. //
  3. // This is a part of the ActiveX Template Library.
  4. // Copyright (C) 1996 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // ActiveX Template Library Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // ActiveX Template Library product.
  12.  
  13. #include "labres.h"       // main symbols
  14.  
  15. /////////////////////////////////////////////////////////////////////////////
  16. // Beeper
  17.  
  18. class CLabrador :
  19.     public IMammal,
  20.     public IDog,
  21.     public CComObjectRoot,
  22.     public CComCoClass<CLabrador, &CLSID_Labrador>
  23. {
  24. public:
  25.     CLabrador();
  26. BEGIN_COM_MAP(CLabrador)
  27.     COM_INTERFACE_ENTRY(IMammal)
  28.     COM_INTERFACE_ENTRY(IDog)
  29. END_COM_MAP()
  30. DECLARE_NOT_AGGREGATABLE(CLabrador)
  31. DECLARE_REGISTRY(CLabrador, _T("LABRADOR.Labrador.1"), _T("LABRADOR.Labrador.1"), IDS_LABRADOR_DESC, THREADFLAGS_BOTH)
  32.  
  33. // IDog
  34.     STDMETHOD(GetPetName)(MY_BSTR pStr);
  35.     STDMETHOD(SetPetName)(MY_BSTR pStr);
  36.     STDMETHOD(IsBarking)(BOOL* pBool);
  37.  
  38. // IMammal
  39.     STDMETHOD(GetSpeciesName)(MY_BSTR pStr);
  40.     STDMETHOD(IsAlive)(BOOL* pBool);
  41.  
  42. private:
  43.     WCHAR   m_szPetName[32];
  44.     WCHAR   m_szSpeciesName[32];
  45.     BOOL    m_bIsBarking;
  46.     BOOL    m_bIsAlive;
  47. };
  48.