Access denied on setting property after clearing same property
See the question and my original answer on StackOverflowWhen you set the property to VT_EMPTY, you don't "set" its value, you don't "write an empty value", you don't "clear" it, you remove it. Note that the running property store's count is decremented (GetCount
), and you can't use GetAt
either anymore.
Official documentation for IPropertyStore::SetValue method is very clear:
Removing a property values from a property store is not supported and could lead to unexpected results.