Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IPersistPropertyBag:IPersist

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This interface works in conjunction with IPropertyBag to define an individual property-based persistence mechanism.

The following tables show the methods for this interface in alphabetical order. This interface inherits the methods for the IUnknown and IPersist.

Method Description

InitNew

Informs the object that it is being initialized as a newly created object.

Load

Instructs the object to initialize itself using the properties available in the property bag, and notifies the provided error log object when errors occur.

Save

Instructs the object to save its properties to the given property bag, and optionally to clear the object's dirty flag.

A mechanism such as IPersistStream gives an object an IStream in which to store its binary data, while IPersistPropertyBag provides an object with an IPropertyBag interface through which it can save and load individual properties.

The object that implements IPropertyBag can then save those properties in various ways, such as in name and value pairs in a text file.

Errors encountered in the process on either side are recorded in an error log through IErrorlog. This error reporting mechanism works on a per-property basis instead of on all properties at once.

IPropertyBag and IPersistPropertyBag optimize "Save as Text" mechanisms, and therefore are recommended for ActiveX Control containers that implement a "Save as Text" mechanism.

IPropertyBag is implemented by a container, and is roughly analogous to IStream.

IPersistPropertyBag is implemented by controls, and is roughly analogous to IPersistStream.

Headerocidl.h, ocidl.idl
Libraryole32.lib, uuid.lib
Windows Embedded CEWindows CE .NET 4.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show:
© 2014 Microsoft