Partilhar via


Why use IShellItem2::GetPropertyStore?

I often get this question: "How can I read properties directly from a property handler?" (Remember that the property handler is the file system namespace's extensibility point.) 

Usually, the person just wants to read one or more properties and doesn't know where to start. In this case, they usually find IShellItem2::GetPropertyStore to be sufficient for obtaining the properties for the item. 

By using this method, they benefit from the various property system layers I talked about last time. They also usually benefit from the fact that their code works for any shell item and not just files.

Of course, there are some legitimate reasons you would want to talk directly to a property handler. I'll cover those in future posts.