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

  1. /*
  2.  * IPERSTMI.H
  3.  *
  4.  * Definitions of a template IPersistStreamInit 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 _IPERSTMI_H_
  16. #define _IPERSTMI_H_
  17.  
  18. #define INC_CONTROLS
  19. #include <inole.h>
  20.  
  21. class CImpIPersistStreamInit;
  22. typedef class CImpIPersistStreamInit *PCImpIPersistStreamInit;
  23.  
  24. class CImpIPersistStreamInit : public IPersistStreamInit
  25.     {
  26.     protected:
  27.         ULONG           m_cRef;      //Interface reference count
  28.         LPVOID          m_pObj;      //Backpointer to the object
  29.         LPUNKNOWN       m_pUnkOuter; //For delegation
  30.  
  31.     public:
  32.         CImpIPersistStreamInit(LPVOID, LPUNKNOWN);
  33.         ~CImpIPersistStreamInit(void);
  34.  
  35.         STDMETHODIMP QueryInterface(REFIID, LPVOID *);
  36.         STDMETHODIMP_(ULONG) AddRef(void);
  37.         STDMETHODIMP_(ULONG) Release(void);
  38.  
  39.         STDMETHODIMP GetClassID(LPCLSID);
  40.  
  41.         STDMETHODIMP IsDirty(void);
  42.         STDMETHODIMP Load(LPSTREAM);
  43.         STDMETHODIMP Save(LPSTREAM, BOOL);
  44.         STDMETHODIMP GetSizeMax(ULARGE_INTEGER *);
  45.  
  46.         STDMETHODIMP InitNew(void);
  47.     };
  48.  
  49.  
  50. #endif  //_IPERSTMI_H_
  51.