3.1.1.8.11.1.1 USER_PROPERTIES Processing
When a new property-value pair is added (as a result of an update, for example), the PropertyCount field of the USER_PROPERTIES structure MUST be incremented by one, and the property structure (a USER_PROPERTY structure) MUST be added to the variable-length array of USER_PROPERTY structures that follow USER_PROPERTIES. The order of the USER_PROPERTY entries is not important.
When a property-value pair is removed and the property-value is present in the USER_PROPERTIES structure, the PropertyCount field of the USER_PROPERTIES structure MUST be decremented by one, and the property structure (a USER_PROPERTY structure) MUST be removed from the variable-length array of USER_PROPERTY structures that follow USER_PROPERTIES.
When the last property-value pair is removed, the PropertyCount field is no longer included in the USER_PROPERTIES structure. In this state, the absence of any user properties MUST be inferred from the structure’s total length (0x6F bytes).
If the property-value is not present on removal, then no change to USER_PROPERTIES is required.