CRegPropBag class

This article was submitted .

This implementation of the IPropertyBag interface persists object properties to the registry.
Only a small range of property data types are supported, such as integers and strings.
However, a special version of the class allows you to store the values with type information. Any type not supported natively (all types other than strings and integers) are converted to string values when written and back when read.

The class is based on a Don Box sample with an XML Property Bag.


GetPropertyBagFromRegBuilds a property bag on top of an existing registry branch.
SaveToRegSaves an IPersistPropertyBag-based object to the registry.
LoadFromRegLoads an IPersistPropertyBag-based object from the registry.

Source Code Dependencies

Microsoft ATL Library

Download Files

DownloadSource Code (3 Kb)