IPropertySetStorage interface
The IPropertySetStorage interface creates, opens, deletes, and enumerates property set storages that support instances of the IPropertyStorage interface. The IPropertyStorage interface manages a single property set in a property storage subobject; and the IPropertySetStorage interface manages the storage of groups of such property sets. Any file system entity can support IPropertySetStorage that is currently implemented in the COM compound file object.
The IPropertySetStorage and IPropertyStorage interfaces provide a uniform way to create and manage property sets, whether or not these sets reside in a storage object that supports IStorage. When called through an object supporting IStorage (such as structured and compound files) or IStream, the property sets created conform to the COM property set format, described in detail in Structured Storage Serialized Property Set Format. Similarly, properties written using IStorage to the COM property set format are visible through IPropertySetStorage and IPropertyStorage.
IPropertySetStorage methods identify property sets through a globally unique identifier (GUID) called a format identifier (FMTID). The FMTID for a property set identifies the property identifiers in the property set, their meaning, and any constraints on the values. The FMTID of a property set should also provide the means to manipulate that property set. Only one instance of a given FMTID may exist at a time within a single property storage.
When to implement
Implement IPropertySetStorage to store persistent properties in an object. If you are using the COM compound files implementation, you can use the implementation on the compound file object created through a call to StgCreateStorageEx or StgOpenStorageEx.
When to use
Call IPropertySetStorage methods to create, open, or delete one or more property sets, or to enumerate the property sets contained in this property set storage.
Members
The IPropertySetStorage interface inherits from the IUnknown interface. IPropertySetStorage also has these types of members:
Methods
The IPropertySetStorage interface has these methods.
| Method | Description |
|---|---|
| Create |
Creates a new property set. |
| Delete |
Deletes an existing property set. |
| Enum |
Creates and retrieves a pointer to an object that can be used to enumerate property sets. |
| Open |
Opens a previously created property set. |
Remarks
When IPropertySetStorage::Create is called to create the UserDefined property set, the first section is created automatically. Once the FMTID_UserDefinedProperties is created, FMTID_DocSummaryInformation need not be created, but can be operend with a call to IPropertySetStorage::Open. Creating the first section does not automatically create the second section and it is not possible to open both sections simultaneously.
Calling IPropertySetStorage::Delete, to delete the first section, causes both sections to be deleted. In other words, calling IPropertySetStorage::Delete with FMTID_DocSummaryInformation causes both that section and the FMTID_UserDefinedProperties section to be deleted. However, deleting the second section does not automatically delete the first section.
When IPropertySetStorage::Enum is used to enumerate property sets, the UserDefined property set is not enumerated.
Requirements
|
Minimum supported client |
Windows 2000 Professional [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps | Windows Store apps] |
|
Header |
|
|
IDL |
|
|
Library |
|
|
DLL |
|
|
IID |
IID_IPropertySetStorage is defined as 0000013A-0000-0000-C000-000000000046 |
See also
- IPropertySetStorage-Compound File Implementation
- IPropertySetStorage-NTFS File System Implementation
- IPropertySetStorage-Stand-alone Implementation
- IPropertyStorage
- IEnumSTATPROPSETSTG
- STATPROPSETSTG
- PROPVARIANT
- EnumAll Sample
- Samples