Storage and Stream Objects for a Property Set
The programmer specifies whether a property set is stored in a storage or a stream when the property set is created. The PROPSETFLAG_NONSIMPLE enumeration value, passed in the grfFlags parameter to the IPropertySetStorage::Create method, indicates this. Setting where the property set is stored provides proper application controls to fully interoperate through the IPropertySetStorage interface with the COM property set.
If the PROPSETFLAG_NONSIMPLE flag is set, the property set is stored in a storage object, and nonsimple property values can be written to it. Nonsimple values include values with a VARTYPE of VT_STORAGE, VT_STREAM, VT_STORED_OBJECT, or VT_STREAMED_OBJECT. For more information about VARTYPE values and how to use them, see the PROPVARIANT structure.
If the PROPSETFLAG_NONSIMPLE flag is not set, only simple values can be written to the property set.
In the storage object of a nonsimple property set, a stream is created named Contents. This is the primary stream of the property set, and holds all simple property values. Nonsimple property values (streams and storages) are stored under the main storage object of the property set as substreams and storages. That is, these nonsimple values are stored as siblings to the Contents stream. The name of the sibling streams and storages is determined by the implementation, and stored in the Contents stream similar to the way a simple string property is stored.