Following up on the question
Are SetProp and RemoveProp thread-safe?,
you might wonder what happens if you call
EnumPropsEx
while another thread
is mutating the properties?
The answer is similar to what you get if
you call
FindFirstFile
/ FindNextFile
while somebody else is creating or deleting files.
- If a property is created after the enumeration starts,
then it is unspecified whether it will be reported by
EnumPropsEx
. - If a property is deleted after the enumeration starts,
then it is unspecified whether it will be reported by
EnumPropsEx
. Special exception: The enumeration callback is allowed to remove the property being enumerated. - If a property is modified after the enumeration starts,
then it is unspecified whether the value reported by
EnumPropsEx
is the old value or the new value.
Hopefully, nobody is playing games with properties that are so crazy that any of these rules will actually come into play, aside from the special exception.