2.4.3 PropertyBag
The PropertyBag persistent stream is used by both the PersistStorage and PropertiesProvider persistence structures. The stream contains a series of properties that are written as follows.
-
BagStream = 0*BagProp BagProp = PropName PropSig PropVarType PropValue ; Property name including null terminator PropName = 1*OCTET %x00 ; Signature Bytes PropSig = %xF7.F7 ; Variant Type PropVarType = UINT16 ; Property Value PropValue = PropObject / PropNull / PropString / PropOther ; PropObject, type is VT_UNKNOWN or VT_DISPATCH PropObject = ObjSig ObjPersistType ObjID ObjSize ObjData ; PropObject Signature Bytes ObjSig = %xF3.F3 ; PropObject persistence Type ObjPersistType = PersistTypeStorage / PersistTypeStream PersistTypeStorage = %x01.00.00.00 PersistTypeStream = %x02.00.00.00 ; PropObject ID ObjID = GUID ; PropObject Size… number of bytes needed to persist the object data ObjSize = UINT32 ; PropObject Data… the bytes of the persisted object data ObjData = 0*OCTET ; PropNull, type is VT_NULL or VT_EMPTY PropNull = %x00.00.00.00 ; PropString, type is BSTR PropString = StringSize StringData ; PropString Size… number of bytes needed to persist the string StringSize = UINT32 ; StringData… bytes of string StringData = 0*OCTET ; PropOther, any type other than the previous ones. These values are ; converted to strings and persisted that way. PropOther = OtherSize OtherData ; OtherSize… number of bytes needed to persist the converted string OtherSize = UINT32 ; OtherData … bytes of converted string OtherData = 0*OCTET