Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Multiple property handlers for a single file

21 views
Skip to first unread message

Doub

unread,
Jan 4, 2012, 6:00:23 AM1/4/12
to
Hi,

I would like to add a property to an existing file type (video files,
like .avi). It seems the way to go is to write a property handler.
However, according to the MSDN [1], a property handler is registered
by adding a key to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
\CurrentVersion\PropertySystem\PropertyHandlers\.avi. But there is
already a property handler for that file type on Windows 7. I'd like
to keep existing properties (like video width, height and duration)
visible in the explorer, and simply add my own.

So is it possible to have several property handlers for a single
file ? I know I can replace the stock one with my own, and from there
create a COM instance of the old property handler, and forward method
calls for properties I don't handle myself, but that looks cumbersome,
potentially slow, and a lot of work (especially to support the various
IInitializeFrom* interfaces).

Also is it possible to associate property handlers to ProgIDs, or to a
file PerceivedType (like "video" in my case) ?

For the background, I'm trying to implement a way to mark video files
shared on a file server as "seen", and to be able to quickly see which
files are seen in the explorer (in a detailed view column), with the
ability to change the state easily (either via the bottom details pane
of the Windows 7 explorer, or through context menu entries). The
information would not be stored in the file itself, but rather in an
alternate stream or through a network service of some kind. The
standard property System.IsRead [2] and the property system seems
appropriate for that, but maybe there are better alternatives.

Regards,

Jérôme.

[1] http://msdn.microsoft.com/en-us/library/windows/desktop/bb266532.aspx
[2] http://msdn.microsoft.com/en-us/library/windows/desktop/bb760737.aspx
0 new messages