summaryrefslogtreecommitdiffstats
path: root/private/oleutest/simpsvr/ips.h
blob: b779691e138332d0eb62d58b733e440141fa7b4b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//**********************************************************************
// File name: ips.h
//
//      Definition of CPersistStorage
//
// Copyright (c) 1993 Microsoft Corporation. All rights reserved.
//**********************************************************************

#if !defined( _IPS_H_)
#define _IPS_H_


#include <ole2.h>
#include "obj.h"

class CSimpSvrObj;

interface CPersistStorage : IPersistStorage
{
private:
    CSimpSvrObj FAR * m_lpObj;
    BOOL m_fSameAsLoad;

public:
    CPersistStorage::CPersistStorage(CSimpSvrObj FAR * lpSimpSvrObj)
        {
        m_lpObj = lpSimpSvrObj;
        };
    CPersistStorage::~CPersistStorage() {};

    STDMETHODIMP QueryInterface (REFIID riid, LPVOID FAR* ppvObj);
    STDMETHODIMP_(ULONG) AddRef ();
    STDMETHODIMP_(ULONG) Release ();

    STDMETHODIMP InitNew (LPSTORAGE pStg);
    STDMETHODIMP GetClassID  ( LPCLSID lpClassID) ;
    STDMETHODIMP Save  ( LPSTORAGE pStgSave, BOOL fSameAsLoad) ;
    STDMETHODIMP SaveCompleted  ( LPSTORAGE pStgNew);
    STDMETHODIMP Load  ( LPSTORAGE pStg);
    STDMETHODIMP IsDirty  ();
    STDMETHODIMP HandsOffStorage  ();

    void ReleaseStreamsAndStorage();
    void OpenStreams(LPSTORAGE lpStg);
    void CreateStreams(LPSTORAGE lpStg);
    void CreateStreams(LPSTORAGE lpStg, LPSTREAM FAR *lpTempColor, LPSTREAM FAR *lpTempSize);

};

#endif