When a client wishes to have exact control over how individually named properties of an object are saved, it would attempt to use an objectÆs IPersistPropertyBag interface as a persistence mechanism. In that case the client supplies a property bag to the object in the form of an IPropertyBag interface.
When the object wishes to read a property in IPersistPropertyBag::Load it will call IPropertyBag::Read. When the object is saving properties in IPersistPropertyBag::Save it will call IPropertyBag::Write. Each property is described with a name in pszPropName whose value is exchanged in a VARIANT. This information allows a client to save the property values as text, for instance, which is the primary reason why a client might choose to support IPersistPropertyBag.
The client records errors that occur during reading into the supplied error log.
Methods in Vtable Order
IUnknown Methods Description
QueryInterface
Returns pointers to supported interfaces.
AddRef Increments reference count.
Release Decrements reference count.
IPropertyBag Methods Description
Read
Asks the property bag to read the specified property into a caller-initialized VARIANT.
Write Asks the property bag to save the specified property using the type and value in the caller-initialized VARIANT.
See Also
IErrorLog, IPersistPropertyBag