home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / com / inole2 / interfac / iperfile.h < prev    next >
C/C++ Source or Header  |  1996-05-21  |  1KB  |  48 lines

  1. /*
  2.  * IPERFILE.H
  3.  *
  4.  * Definitions of a template IPersistFile interface implementation.
  5.  *
  6.  * Copyright (c)1993-1995 Microsoft Corporation, All Rights Reserved
  7.  *
  8.  * Kraig Brockschmidt, Microsoft
  9.  * Internet  :  kraigb@microsoft.com
  10.  * Compuserve:  >INTERNET:kraigb@microsoft.com
  11.  */
  12.  
  13.  
  14. #ifndef _IPERFILE_H_
  15. #define _IPERFILE_H_
  16.  
  17. #include <inole.h>
  18.  
  19. class CImpIPersistFile;
  20. typedef class CImpIPersistFile *PCImpIPersistFile;
  21.  
  22. class CImpIPersistFile : public IPersistFile
  23.     {
  24.     protected:
  25.         ULONG           m_cRef;      //Interface reference count
  26.         LPVOID          m_pObj;      //Backpointer to the object
  27.         LPUNKNOWN       m_pUnkOuter; //For delegation
  28.  
  29.     public:
  30.         CImpIPersistFile(LPVOID, LPUNKNOWN);
  31.         ~CImpIPersistFile(void);
  32.  
  33.         STDMETHODIMP QueryInterface(REFIID, LPVOID *);
  34.         STDMETHODIMP_(ULONG) AddRef(void);
  35.         STDMETHODIMP_(ULONG) Release(void);
  36.  
  37.         STDMETHODIMP GetClassID(LPCLSID);
  38.  
  39.         STDMETHODIMP IsDirty(void);
  40.         STDMETHODIMP Load(LPCOLESTR, DWORD);
  41.         STDMETHODIMP Save(LPCOLESTR, BOOL);
  42.         STDMETHODIMP SaveCompleted(LPCOLESTR);
  43.         STDMETHODIMP GetCurFile(LPOLESTR *);
  44.     };
  45.  
  46.  
  47. #endif  //_IPERFILE_H_
  48.