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

  1. //
  2. //**************************************************************************
  3. //
  4. // BOleCont.h --   Implements the server helper for documents by masquerading
  5. //                 as the container object. Provides plumbing for server
  6. //                 linking to documents and items
  7. //
  8. // Copyright (c) 1993,94 by Borland International, Inc. All rights reserved
  9. //
  10. //**************************************************************************
  11.  
  12. #ifndef _BOLECONT_H
  13. #define _BOLECONT_H 1
  14.  
  15. #include "BOleComp.h"
  16.  
  17. class _ICLASS BOleFact;
  18.  
  19. class _ICLASS BOleContainer :
  20.     public BOleComponent,
  21.     public IPersistFile,
  22.     public IOleItemContainer,
  23. #if 0
  24.     public IExternalConnection,
  25. #endif
  26.     public IBRootLinkable
  27. {
  28. protected:
  29.     DWORD regId;          // magic cookie for linkable document
  30.     LPMONIKER pMoniker;   // file moniker
  31.     PIBContains pDoc;     // back pointer
  32.     IBClass *pClassFact;  // pointer to class object
  33.  
  34. public:
  35.     BOleContainer (BOleClassManager *, IBUnknownMain *);
  36.     ~BOleContainer ();
  37.  
  38.     // IUnknown Methods
  39.     //
  40.     DEFINE_IUNKNOWN(pObjOuter)
  41.  
  42.     // IUnknownMain methods
  43.     //
  44.     virtual HRESULT _IFUNC QueryInterfaceMain(REFIID iid, LPVOID FAR* pif);
  45.  
  46.     // IPersistFile methods
  47.     //
  48.     HRESULT _IFUNC GetClassID(LPCLSID lpClassID);
  49.     HRESULT _IFUNC IsDirty();
  50.     HRESULT _IFUNC Load(LPCOLESTR lpszFileName, DWORD grfMode);
  51.     HRESULT _IFUNC Save(LPCOLESTR lpszFileName, BOOL fRemember);
  52.     HRESULT _IFUNC SaveCompleted(LPCOLESTR lpszFileName);
  53.     HRESULT _IFUNC GetCurFile(LPOLESTR FAR* lplpszFileName);
  54.  
  55.     // IOleItemContainer methods
  56.     //
  57.     HRESULT _IFUNC ParseDisplayName(IBindCtx* pbc, LPOLESTR lpszDisplayName,
  58.         ULONG FAR* pchEaten, IMoniker* FAR* ppmkOut);
  59.     HRESULT _IFUNC EnumObjects(DWORD grfFlags,IEnumUnknown* FAR* ppenumUnknown);
  60.     HRESULT _IFUNC LockContainer(BOOL fLock);   
  61.     HRESULT _IFUNC GetObject(LPOLESTR lpszItem, DWORD dwSpeedNeeded, IBindCtx* pbc,
  62.                              REFIID riid, LPVOID FAR* ppvObject);
  63.     HRESULT _IFUNC GetObjectStorage(LPOLESTR lpszItem, IBindCtx* pbc, REFIID riid,
  64.                                     LPVOID FAR* ppvStorage);
  65.     HRESULT _IFUNC IsRunning(LPOLESTR lpszItem);
  66.  
  67.     // IBLinkable
  68.  
  69.     // pass in class name (if reg'd in .reg)
  70.     //
  71.     virtual HRESULT _IFUNC Init(PIBContains, LPCOLESTR pszProgId);
  72.     virtual HRESULT _IFUNC SetMoniker(LPMONIKER pMon); 
  73.  
  74.     // pass NULL to OnRename when Doc closes 
  75.     //
  76.     virtual HRESULT _IFUNC OnRename(PIBLinkable, LPCOLESTR) ;
  77.  
  78.     virtual HRESULT _IFUNC GetMoniker(LPMONIKER *ppMon);
  79.  
  80. #if 0
  81.     virtual DWORD _IFUNC AddConnection(DWORD, DWORD);
  82.     virtual DWORD _IFUNC ReleaseConnection(DWORD, DWORD, BOOL);
  83. #endif
  84. };
  85.  
  86. #endif _BOLECONT_H
  87.  
  88.  
  89.