blob: 7a626d501ad90b2505cb5adad81751e7ef526711 (
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
//+-------------------------------------------------------------------
//
// File: persist.hxx
//
// Contents: CPersistStorage declaration
//
// History: 24-Nov-92 DeanE Created
//
//---------------------------------------------------------------------
#ifndef __PERSIST_HXX__
#define __PERSIST_HXX__
#include <embed.hxx>
//+-------------------------------------------------------------------
// Class: CPersistStorage
//
// Synopsis: Test class CPersistStorage
//
// Methods: QueryInterface IUnknown
// AddRef IUnknown
// Release IUnknown
// GetClassId IPersist
// IsDirty IPersistStorage
// InitNew IPersistStorage
// Load IPersistStorage
// Save IPersistStorage
// SaveCompleted IPersistStorage
//
// History: 24-Nov-92 DeanE Created
//--------------------------------------------------------------------
class FAR CPersistStorage : public IPersistStorage
{
public:
// Constructor/Destructor
CPersistStorage(CTestEmbed *pteObject);
~CPersistStorage();
// IUnknown - Everyone inherits from this
STDMETHODIMP QueryInterface(REFIID iid, void FAR * FAR *ppv);
STDMETHODIMP_(ULONG) AddRef (void);
STDMETHODIMP_(ULONG) Release (void);
// IPersist - IPersistStorage inherits from this
STDMETHODIMP GetClassID (LPCLSID pClassId);
// IPersistStorage
STDMETHODIMP IsDirty (void);
STDMETHODIMP InitNew (LPSTORAGE pStg);
STDMETHODIMP Load (LPSTORAGE pStg);
STDMETHODIMP Save (LPSTORAGE pStgSave,
BOOL fSameAsLoad);
STDMETHODIMP SaveCompleted (LPSTORAGE pStgSaved);
STDMETHODIMP HandsOffStorage (void);
private:
ULONG _cRef; // Reference count
CTestEmbed *_pteObject; // Object we're associated with
BOOL _fDirty; // TRUE if object is dirty
};
#endif // __PERSIST_HXX__
|