Export (0) Print
Expand All

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.

MethodDescription
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

Note  There is an exception to the above in The DocumentSummaryInformation and UserDefined property set. This property set is unique in that it may have two property set sections in a single underlying stream. This property set is described in The DocumentSummaryInformation and UserDefined Property Sets. The first section is the DocumentSummaryInformation property set. The second section is the UserDefined property set. Each section is identified by a unique format identifier (FMTID). For example, FMTID_DocSummaryInformation and FMTID_UserDefined property set. The fact that these two property sets can exist in a single stream affects the behavior of the IPropertySetStorage interface.

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

Propidl.h (include Objbase.h)

IDL

Propidl.idl

Library

Uuid.lib

DLL

Ole32.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

 

 

Community Additions

ADD
Show:
© 2014 Microsoft