Property Schemas

Properties used in the Windows Vista property system are declared in property schemas. These property schemas are defined in XML files and describe various aspects of a property including its type (including information on its primitive type and whether it is multi-valued), how it can be displayed in the Microsoft Windows user interface (UI), what kind of labels (user-friendly editing strings) are to be used with it, and how it is cached in the search store for faster access.

Properties are identified by their Canonical Name or their Property Key.

Canonical Name

This is the reader-friendly name of the property and uses a namespace convention similar to that used in Microsoft .NET. For system-defined properties (those that are included with Windows), the convention is System.GroupName.PropertyName. Note that the Pascal casing scheme—initial capital letters with additional capitals at the beginning of each word—is used in these names. Canonical names are used in various places including property lists and column names in the property cache. They are therefore used in Structured Query Language (SQL) queries to retrieve a property value.

Property Key

This is a pair consisting of a GUID and a DWORD, referred to as a formatID and propID respectively. It is represented by a PROPERTYKEY structure. Most of the property system APIs accept these property keys. The Windows Software Development Kit (SDK) includes the header file Propkey.h that includes a macro definition of each of the System property keys with the convention of PKEY_GroupName_PropertyName. For example, PKEY_Photo_DateTaken is the property key for the property with canonical name System.Photo.DateTaken.

Property values are stored in the form of a PROPVARIANT structure, which is an extension of the OLE VARIANT types.