Storage and Stream Objects for a Property Set
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.

Send comments about this topic to Microsoft

Build date: 11/12/2009

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View