Home
Recent changes

ATL code
WTL code
MFC code
C++ code
.Net code
PocketPC code
Miscellaneous

viksoe.dk

CPersistRegistry class

A simple persist class modelled after the ATL IPersistStorageImpl. It writes data to the registry.

You can use this class as a helper class for persisting your application state or to replace the IPersistStreamInit implementation that ATL provides in the IPersistStreamInitImpl class.

The class works just like the ATL AtlIPersistStreamInit_Load and AtlIPersistStreamInit_Save method called from the IPersistStreamImpl class.
It retrieves and stores properties defined in the BEGIN_PROP_MAP / END_PROP_MAP property map.

Interface

 NameDescription
LoadLoads the property map from the given registry key.
SaveSaves the property map from the given registry key.
AtlPersistRegistry_LoadThe internal load function.
AtlPersistRegistry_SaveThe internal save function.

Source Code Dependencies

Microsoft ATL Library

Download Files

DownloadSource Code (2 Kb)


Written by Bjarke Viksoe.
Article submitted 6/7/2001.