A call to the COM compound file implementation of IPropertySetStorage interface to create a property set causes either a stream or storage to be created through a call to IStorage::CreateStream or IStorage::CreateStorage. A default property set is created in memory, but not flushed to disk. When there is a call to IPropertyStorage::WriteMultiple, it operates within the buffer.
When a property set is opened, IStorage::OpenStream or IStorage::OpenStorage is used. The entire property set stream is read into contiguous memory. IPropertyStorage::ReadMultiple operations then operate by reading the memory buffer. Therefore, the first access is expensive in terms of time (because of disk reads) but subsequent accesses are very efficient. Writes may be slightly more expensive because SetSize operations on the underlying stream may be required to guarantee that disk space is available if data is added.
No guarantees are made as to whether IPropertyStorage::WriteMultiple will flush updates. In general, the client should assume that IPropertyStorage::WriteMultiple only updates the in memory buffer. To flush data, IPropertyStorage::Commit or IPropertyStorage::Release (last release) should be called.
This design means that WriteMultiple may succeed but the data is not actually persistently written.
Note This size of the property set stream may not exceed 256K bytes.