windows - Register a thumbnail handler for a folder, rather than a specific file type -
windows - Register a thumbnail handler for a folder, rather than a specific file type -
i need write thumbnail handler files under given folder. folder mounting point virtual file scheme (using callback file system), , files not nowadays physically on local machine (they're stored in cloud), if allow default thumbnail handler work, seek download whole files server... not want.
but realized thumbnail handler must registered per file type:
registration of thumbnail handler based on standard file associations.
(from documentation)
i don't want register per file type, because don't want alter behavior files not in virtual folder. there way handler called files in virtual folder, , them?
i see 2 ways go.
the simple way: register own thumbnail handler , allow work on files. when don't back upwards iinitializewithstream
iinitializewithitem
or iinitializewithfile
can check if item/file in virtual file system. if can homecoming thumbnail , otherwise homecoming error.
the problem approach 1 thumbnail provider can registered per file type.
the hard way: can write shell namespace extension. these can used display virtual folders, can customized in many ways. way did using cbfs, restricted explorer only. add together way display virtual folders.
the shell namespace extension work it's own virtual folder. if mapped virtual folders drive letter , user opens drive in explorer (and not shell namespace extension's virtual folder), user see regular explorer view of files, not shell namespace extension.
also: documentation shell namespace extensions pain, there not much available. wrote own shell namespace extension , every time objects queried iid traced , learned bit more. saw extension queried iid_ithumbnailhandlerfactory
, saw iids iid_iextracticona
or iid_icontextmenu
, did not see iid_ithumbnailprovider
, nor did see iid_iextractimage
. suggests cannot have own ithumbnailprovider
straight attached objects create virtual folder, missed set flag somewhere else explorer not seek query me.
windows winapi thumbnails shell-extensions callback-file-system
Comments
Post a Comment