次の方法で共有


Property System Layers and Extensibility Points

It's easy to get confused about what points of extensibility exist and what layer provide what services. This isn't helped by the fact that we've lumped a bunch of things into the property system, but I'll try to diagram this out here and in future posts.

The coercion layer is topmost. It's job is to ensure that the properties moving through the system are of the right type. Comments is a string. Ratings is a number. IShellItem2::GetPropertyStore creates this layer on behalf of the consumer.

The shell item layer comes next. It performs various mappings over a shell namespace extension. For instance, it provides PKEY_SFGAOFlags by calling IShellFolder::GetAttributesOf on the namespace. IShellItem2::GetPropertyStore creates this layer.

The shell namespace is the first extensibility point. Each extension can provide as few or as many properties as it likes. 

The file system namespace is its own layer. It provides a bunch of properties such as file size, and has an extension point of its own: the property handler. 

A property handler extends the file system namespace properties. It cracks open a file and extracts useful properties like image dimensions and music bitrates.

Putting it together, here's what we get:

[------------- Consumer Application ------------]
[------------- Coercion Layer ------------------]
[------------- Shell Item Layer ----------------]
[ Namespace Extension ] [ File System Namespace ]
[ Property Handler ]

In red are the parts the property system provides.

Comments

  • Anonymous
    September 05, 2006
    I mentioned that one of the property system layers coerces values to be of the correct type.  But...
  • Anonymous
    September 14, 2006
    Values in the property system are stored in PROPVARIANT structures.  Originally constructed for...
  • Anonymous
    November 15, 2006
    There's one last topic I want to touch on before I close this series: Canonical values. So far I've talked
  • Anonymous
    January 24, 2007
    In this series, I will be presenting Windows Vista functionality with a focus on the the file system