| title | IPersistStorageImpl Class | Microsoft Docs | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ms.custom | ||||||||||
| ms.date | 11/04/2016 | |||||||||
| ms.reviewer | ||||||||||
| ms.suite | ||||||||||
| ms.technology |
|
|||||||||
| ms.tgt_pltfrm | ||||||||||
| ms.topic | reference | |||||||||
| f1_keywords |
|
|||||||||
| dev_langs |
|
|||||||||
| helpviewer_keywords |
|
|||||||||
| ms.assetid | d652f02c-239c-47c7-9a50-3e9fc3014fff | |||||||||
| caps.latest.revision | 20 | |||||||||
| author | mikeblome | |||||||||
| ms.author | mblome | |||||||||
| manager | ghogen |
This class implements the IPersistStorage interface.
Important
This class and its members cannot be used in applications that execute in the Windows Runtime.
template <class T>
class ATL_NO_VTABLE IPersistStorageImpl : public IPersistStorage
T
Your class, derived from IPersistStorageImpl.
| Name | Description |
|---|---|
| IPersistStorageImpl::GetClassID | Retrieves the object's CLSID. |
| IPersistStorageImpl::HandsOffStorage | Instructs the object to release all storage objects and enter HandsOff mode. The ATL implementation returns S_OK. |
| IPersistStorageImpl::InitNew | Initializes a new storage. |
| IPersistStorageImpl::IsDirty | Checks whether the object's data has changed since it was last saved. |
| IPersistStorageImpl::Load | Loads the object's properties from the specified storage. |
| IPersistStorageImpl::Save | Saves the object's properties to the specified storage. |
| IPersistStorageImpl::SaveCompleted | Notifies an object that it can return to Normal mode to write to its storage object. The ATL implementation returns S_OK. |
IPersistStorageImpl implements the IPersistStorage interface, which allows a client to request that your object load and save its persistent data using a storage.
The implementation of this class requires class T to make an implementation of the IPersistStreamInit interface available via QueryInterface. Typically this means that class T should derive from IPersistStreamInitImpl, provide an entry for IPersistStreamInit in the COM map, and use a property map to describe the class's persistent data.
Related Articles ATL Tutorial, Creating an ATL Project
IPersistStorage
IPersistStorageImpl
Header: atlcom.h
Retrieves the object's CLSID.
STDMETHOD(GetClassID)(CLSID* pClassID);
See IPersist::GetClassID in the Windows SDK.
Instructs the object to release all storage objects and enter HandsOff mode.
STDMETHOD(HandsOffStorage)(void);
Returns S_OK.
See IPersistStorage::HandsOffStorage in the Windows SDK.
Initializes a new storage.
STDMETHOD(InitNew)(IStorage*);
The ATL implementation delegates to the IPersistStreamInit interface.
See IPersistStorage:InitNew in the Windows SDK.
Checks whether the object's data has changed since it was last saved.
STDMETHOD(IsDirty)(void);
The ATL implementation delegates to the IPersistStreamInit interface.
See IPersistStorage:IsDirty in the Windows SDK.
Loads the object's properties from the specified storage.
STDMETHOD(Load)(IStorage* pStorage);
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.
See IPersistStorage:Load in the Windows SDK.
Saves the object's properties to the specified storage.
STDMETHOD(Save)(IStorage* pStorage, BOOL fSameAsLoad);
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.
See IPersistStorage:Save in the Windows SDK.
Notifies an object that it can return to Normal mode to write to its storage object.
STDMETHOD(SaveCompleted)(IStorage*);
Returns S_OK.
See IPersistStorage:SaveCompleted in the Windows SDK.
Storages and Streams
IPersistStreamInitImpl Class
IPersistPropertyBagImpl Class
Class Overview