IPersistStorageImpl

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


IPersistStorageImpl Class Members

IPersist Methods
GetClassIDRetrieves the object's CLSID.
IPersistStorage Methods
HandsOffStorageInstructs the object to release all storage objects and enter HandsOff mode. The ATL implementation returns S_OK.
InitNewInitializes a new storage.
IsDirtyChecks whether the object's data has changed since it was last saved.
LoadLoads the object's properties from the specified storage.
SaveSaves the object's properties to the specified storage.
SaveCompletedNotifies an object that it can return to Normal mode to write to its storage object. The ATL implementation returns S_OK.

IPersistStorageImpl Overview


Methods


IPersistStorageImpl::GetClassID

HRESULT GetClassID( CLSID *pClassID );

See IPersist::GetClassID in the Win32 SDK.

Remarks

Retrieves the object’s CLSID.

IPersistStorageImpl Overview | Class Members


IPersistStorageImpl::HandsOffStorage

HRESULT HandsOffStorage( );

See IPersistStorage::HandsOffStorage in the Win32 SDK.

Remarks

Returns S_OK.

IPersistStorageImpl Overview | Class Members

See Also IPersistStorageImpl::SaveCompleted, IPersistStorageImpl::Save


IPersistStorageImpl::InitNew

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


IPersistStorageImpl::IsDirty

HRESULT IsDirty( );

See IPersistStorage:IsDirty in the Win32 SDK.

Remarks

Checks whether the object’s 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


IPersistStorageImpl::Load

HRESULT Load( IStorage* pStorage );

See IPersistStorage:Load in the Win32 SDK.

Remarks

Loads the object’s properties. The ATL implementation delegates to the IPersistStreamInit interface. Load uses a stream named “Contents” to retrieve the object’s data. The Save method originally creates this stream.

IPersistStorageImpl Overview | Class Members

See Also IStorage and IPersistStreamInit in the Win32 SDK


IPersistStorageImpl::Save

HRESULT Save( IStorage* pStorage, BOOL fSameAsLoad );

See IPersistStorage:Save in the Win32 SDK.

Remarks

Saves the object’s 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


IPersistStorageImpl::SaveCompleted

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