FileMetaPropertyHandler is a COM service. It is invoked by the Explorer for every file of a type for which it is the registered property handler when the folder containing the files is opened. It is therefore very important that it should be as lightweight as possible. It is implemented in C++.

It implements two interfaces: IInitializeWithFile and IPropertyStore, and also provides standard support for COM registration.

The only method in IInitializeWithFile is Initialize. The implementation obtains the IPropertyStore interface from NTFS for the file whose path it has been passed. It does this by first obtaining IPropertySetStorage for the file, which was the pre-Vista API for a property storage, then passing it to a system provided wrapper to obtain the required Vista and later IPropertyStore interface. For version 1.4, if an original property handler has been extended, then Initialize also Initializes an instance of the original property handler, and obtains its IPropertyStore interface.

The implementations of all the methods in IPropertyStore simply delegate to the IPropertyStore implementation obtained in Initialize. In version 1.4, if an attempt to read a property from the File Meta property handler returns no value, an attempt is then made to read it from the original property handler, if there is one. Property values are only ever written using the File Meta property handler.

These pages describes the modifications the File Association Manager makes to the registry for a property handler:

Linking to the property handler, for versions up to 1.3
Linking to the property handler 1.4, for version 1.4

Last edited Sep 7, 2016 at 10:45 AM by Dijji, version 5


No comments yet.