Knowing what you are trying to accomplish is the first step to using the property system. Property handlers provide a specific set of services which support specific behaviors in the Windows shell. So let's delve into the role of a property handler and how it relates to other components.
As a data flow diagram, a property handler is pretty simple:
The input is a file stream. The output is a set of properties. Yup, that simple.
Notice that although property handlers interpret files, they don't open the files themselves. The layer above it does! There are good reasons for this which I'll discuss another time. To prepare the property handler, the file system namespace creates the file stream, creates the property handler, and passes the stream to the property handler via the IInitializeWithStream interface. Once the property stack is completed, the application is free to read and write properties through the stack. If the layers above the property handler don't answer a question, they'll pass it down to the property handler.
It is also very important to understand what property handlers do not do. Applying a bit of logic, we can reason out much of the role a property handler plays:
Ok, so that's a big dose of reality for one post. Despite our best wishes, property handlers are not magic. They provide specific functionality to enable specific behaviors. As a reminder, the upside of the role of a property handler is that it enables the great integration with the Windows user interface.
-Ben Karas
(1) Property descriptions contain hints about how to display a value (e.g. using a stars or a text box). Property descriptions are system-wide and therefore a handler only can set the hints for properties it introduced to the system.