The system-provided, stand-alone implementation of IPropertySetStorage includes an implementation of both IPropertyStorage and IPropertySetStorage.IPropertyStorage is the interface that reads and writes properties in a property set storage. IPropertySetStorage is the interface that creates and opens property sets in a storage. The IEnumSTATPROPSTG and IEnumSTATPROPSETSTG interfaces are also provided in the stand-alone implementation.
To use the stand-alone implementation of IPropertySetStorage, first obtain a pointer to the system-provided, stand-alone implementation and associate the system-provided implementation with your storage object. To get a pointer to the stand-alone implementation of IPropertySetStorage, call the StgCreatePropSetStg function and provide the pStorage parameter specifying the storage object that will contain the property set. This function provides a pointer to the new IPropertySetStorage interface for the specified storage object.
The stand-alone implementation of IPropertySetStorage creates property sets on any storage object, not just on compound file storages. The stand-alone implementation does not depend on compound files and can be used with any implementation of structured storages. Any restrictions on the caller-provided structured storages apply to this implementation of property sets. For example, if you provide a simple-mode storage to StgOpenPropStg, the resulting IPropertySetStorage will be restricted by the supplied IStorage.
For more information about the compound file implementation of this interface, see the section IPropertySetStorage-Compound File Implementation.
Call the methods of IPropertySetStorage to create, open, and delete property sets in any structured storage. There is also a method that supplies a pointer to the IEnumSTATPROPSETSTG enumerator that can be used to enumerate the property sets in the storage.
The stand-alone implementation also provides the StgCreatePropStg and StgOpenPropStg helper functions, in addition to the Create and Open methods, to create and open property sets. These two functions add support for the PROPSETFLAG_UNBUFFERED value so you can write changes directly to the property set instead of buffering them in a cache. For more information, see PROPSETFLAG Constants.
The stand-alone implementation of IPropertySetStorage supports the following methods.
Creates a new property set in the storage and returns a pointer to the IPropertyStorage interface on the property set.
If you plan to use the PROPSETFLAG_UNBUFFERED value, use the StgCreatePropStg function instead to create and open the new property set and to obtain a pointer to the stand-alone implementation for the IPropertyStorage interface on the property set.
Opens an existing property set in the storage and returns a pointer to the IPropertyStorage interface on the property set.
Deletes a property set in this property set storage.
Creates an object that can be used to enumerate STATPROPSETSTG structures. Each STATPROPSETSTG structure provides data about a single property set.
Note The DocumentSummaryInformation and UserDefined property set is unique in that it may have two property set sections in a single underlying stream. For more information, see The DocumentSummaryInformation and UserDefined Property Sets .
- IPropertyStorage-Stand-alone Implementation
- PROPSETFLAG Constants
- STGM Constants