IPropertyStorage interface (propidlbase.h)

The IPropertyStorage interface manages the persistent properties of a single property set. Persistent properties consist of information that can be stored persistently in a property set, such as the summary information associated with a file. This contrasts with run-time properties associated with Controls and Automation, which can be used to affect system behavior. Use the methods of the IPropertySetStorage interface to create or open a persistent property set. An instance of the IPropertySetStorage interface can manage zero or more IPropertyStorage instances.

Each property within a property set is identified by a property identifier (ID), a four-byte ULONG value unique to that set. You can also assign a string name to a property through the IPropertyStorage interface.

Property IDs differ from the dispatch IDs used in Automation dispid property name tags. One difference is that the general-purpose use of property ID values zero and one is prohibited in IPropertyStorage, while no such restriction exists in IDispatch. In addition, while there is significant overlap among the data types for property values that may be used in IPropertyStorage and IDispatch, the property sets are not identical. Persistent property data types used in IPropertyStorage methods are defined in the PROPVARIANT structure.

The IPropertyStorage interface can be used to access both simple and nonsimple property sets. Nonsimple property sets can hold several complex property types that cannot be held in a simple property set. For more information see Storage and Stream Objects for a Property Set.


The IPropertyStorage interface inherits from the IUnknown interface. IPropertyStorage also has these types of members:


The IPropertyStorage interface has these methods.

Method Description
IPropertyStorage::Commit Saves changes made to a property storage object to the parent storage object.
IPropertyStorage::DeleteMultiple The DeleteMultiple method deletes as many of the indicated properties as exist in this property set.
IPropertyStorage::DeletePropertyNames The DeletePropertyNames method deletes specified string names from the current property set.
IPropertyStorage::Enum The Enum method creates an enumerator object designed to enumerate data of type STATPROPSTG, which contains information on the current property set. On return, this method supplies a pointer to the IEnumSTATPROPSTG pointer on this object.
IPropertyStorage::ReadMultiple Reads specified properties from the current property set.
IPropertyStorage::ReadPropertyNames Retrieves any existing string names for the specified property IDs.
IPropertyStorage::Revert The Revert method discards all changes to the named property set since it was last opened or discards changes that were last committed to the property set. This method has no effect on a direct-mode property set.
IPropertyStorage::SetClass The SetClass method assigns a new CLSID to the current property storage object, and persistently stores the CLSID with the object.
IPropertyStorage::SetTimes The SetTimes method sets the modification, access, and creation times of this property set, if supported by the implementation. Not all implementations support all these time values.
IPropertyStorage::Stat The Stat method retrieves information about the current open property set.
IPropertyStorage::WriteMultiple Writes a specified group of properties to the current property set.
IPropertyStorage::WritePropertyNames Assigns string IPropertyStoragenames to a specified array of property IDs in the current property set.


Minimum supported client Windows 2000 Professional [desktop apps | UWP apps]
Minimum supported server Windows 2000 Server [desktop apps | UWP apps]
Target Platform Windows
Header propidlbase.h (include Objbase.h, Propidlbase.h)

See also




IPropertyStorage-Compound File Implementation

IPropertyStorage-NTFS File System Implementation

IPropertyStorage-Stand-alone Implementation

Managing Properties


Property Storage Considerations