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 / iperstrm.h < prev    next >
C/C++ Source or Header  |  1996-05-21  |  1KB  |  48 lines

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