home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 May / Pcwk5b98.iso / Borland / Cplus45 / BC45 / BOCOLE.PAK / BOLECMAN.H < prev    next >
C/C++ Source or Header  |  1995-08-29  |  2KB  |  61 lines

  1. //
  2. //**************************************************************************
  3. // 
  4. // BOleCMan.h --   Declares an IBClassMgr "factory" which can create Bolero
  5. //                 helper objects. 
  6. //
  7. //                 Since callers of BOleClassManager don't have the class 
  8. //                 definition, they can't call operator new to create a
  9. //                 helper object.
  10. //
  11. //                 BOleClassMgr has a pointer to the service, so you need a
  12. //                 BOleClassMgr for every Bolero connection you maintain.
  13. //
  14. // Copyright (c) 1993,94 by Borland International, Inc. All rights reserved
  15. //
  16. //**************************************************************************
  17.  
  18. #ifndef BOLECMAN_H
  19. #define BOLECMAN_H
  20.  
  21. #include "BOleComp.h"
  22. #include "BOleSvc.h"
  23.  
  24. class BOleClassManager : public BOleComponent, public IBClassMgr
  25. {
  26.  
  27. private:
  28.     BOleService *pSvc;
  29.     int nServerCount;
  30.  
  31. public:
  32.  
  33.     // IUnknown methods
  34.     //
  35.     DEFINE_IUNKNOWN(pObjOuter);
  36.     virtual HRESULT _IFUNC QueryInterfaceMain(REFIID iid, LPVOID FAR* pif);
  37.  
  38.     // IClassMgr methods
  39.     //
  40.     virtual HRESULT _IFUNC ComponentCreate(
  41.         PIUnknown FAR* ppRet,
  42.         PIUnknown pAggregator,
  43.         BCID        idClass
  44.         );
  45.     virtual HRESULT _IFUNC ComponentInfoGet(
  46.         PIUnknown FAR* ppInfo,
  47.         PIUnknown pAggregator,
  48.         BCID        idClass
  49.         )
  50.     { *ppInfo = NULLP; return ResultFromScode(E_NOTIMPL); }
  51.  
  52.     int _IFUNC ServerCount (int nDelta = 0);
  53.     BOleService * GetService()    {return pSvc;}
  54.     
  55.     BOleClassManager(IBUnknownMain *pObj);
  56.     ~BOleClassManager();
  57. };
  58.  
  59. #endif
  60.  
  61.