template< class T >
class IPersistStorageImpl
Parameters
T Your class, derived from IPersistStorageImpl.
The IPersistStorage interface derives from IPersist and allows a client to request that your object load and save its persistent data using a storage. Class IPersistStorageImpl provides a default implementation of this interface and implements IUnknown by sending information to the dump device in debug builds.
Related Articles ATL Tutorial, Creating an ATL Project
#include <atlctl.h>
See Also IPersistStorage and "Storages and Streams" in the Win32 SDK
IPersist Methods | |
GetClassID | Retrieves the object's CLSID. |
IPersistStorage Methods | |
HandsOffStorage | Instructs the object to release all storage objects and enter HandsOff mode. The ATL implementation returns S_OK. |
InitNew | Initializes a new storage. |
IsDirty | Checks whether the object's data has changed since it was last saved. |
Load | Loads the object's properties from the specified storage. |
Save | Saves the object's properties to the specified storage. |
SaveCompleted | Notifies an object that it can return to Normal mode to write to its storage object. The ATL implementation returns S_OK. |
HRESULT GetClassID( CLSID *pClassID );
See IPersist::GetClassID in the Win32 SDK.
Remarks
Retrieves the objects CLSID.
IPersistStorageImpl Overview | Class Members
HRESULT HandsOffStorage( );
See IPersistStorage::HandsOffStorage in the Win32 SDK.
Remarks
Returns S_OK.
IPersistStorageImpl Overview | Class Members
See Also IPersistStorageImpl::SaveCompleted, IPersistStorageImpl::Save
HRESULT InitNew( IStorage* pStorage );
See IPersistStorage:InitNew in the Win32 SDK.
Remarks
Initializes a new storage. The ATL implementation delegates to the IPersistStreamInit interface.
IPersistStorageImpl Overview | Class Members
See Also IStorage and IPersistStreamInit in the Win32 SDK
HRESULT IsDirty( );
See IPersistStorage:IsDirty in the Win32 SDK.
Remarks
Checks whether the objects data has changed since it was last saved. The ATL implementation delegates to the IPersistStreamInit interface.
IPersistStorageImpl Overview | Class Members
See Also IPersistStreamInit in the Win32 SDK
HRESULT Load( IStorage* pStorage );
See IPersistStorage:Load in the Win32 SDK.
Remarks
Loads the objects properties. The ATL implementation delegates to the IPersistStreamInit interface. Load uses a stream named Contents to retrieve the objects data. The Save method originally creates this stream.
IPersistStorageImpl Overview | Class Members
See Also IStorage and IPersistStreamInit in the Win32 SDK
HRESULT Save( IStorage* pStorage, BOOL fSameAsLoad );
See IPersistStorage:Save in the Win32 SDK.
Remarks
Saves the objects properties. The ATL implementation delegates to the IPersistStreamInit interface. When Save is first called, it creates a stream named Contents on the specified storage. This stream is then used in later calls to Save and in calls to Load.
IPersistStorageImpl Overview | Class Members
See Also IPersistStorageImpl::SaveCompleted, IStorage and IPersistStreamInit in the Win32 SDK
HRESULT SaveCompleted( IStorage* pStorage );
See IPersistStorage:SaveCompleted in the Win32 SDK.
Remarks
Returns S_OK.
IPersistStorageImpl Overview | Class Members
See Also IPersistStorageImpl::HandsOffStorage, IPersistStorageImpl::Save, IStorage in the Win32 SDK