windows - Custom icon overlays for namespace extension -
i'm implementing namespace extension represents remote file system on server , have icon overlays show file state (locked) in question here: icon overlay handlers namespace extension
that question answered there , i've done suggested:
created additional shell extension ishelliconoverlayidentifier interface implemented: in ishelliconoverlayidentifier.getoverlayinfo return icon file , icon index. in ishelliconoverlayidentifier.ismemberof return s_false not show overlay other files in system.
in main nse i've implemented ishelliconoverlay interface , retrieve icon overlay system image list using shgeticonoverlayindex function.
the problem is: shgeticonoverlayindex returns -1.
but! if return s_ok result of ishelliconoverlayidentifier.ismemberof - shgeticonoverlayindex starts give correct overlay index! of course in case overlay added files in system including nse.
the interesting thing if return s_false in subesequent calls of ishelliconoverlayidentifier.ismemberof - shgeticonoverlayindex still give correct overlay index became fine: have overlays in nse only...
what i'm doing wrong , how result beginning? caching issue?..
(sorry, couldn't write comment question being mentioned because have no enough reputation...)
it looks problem have has no correct solution. maybe wrong think windows work using of following rules:
1) @ start shell has overlay icon list containing default overlay icons (4 icons, in next version of windows value can larger).
2) when of overlay icon handlers return s_ok in call of ishelliconoverlayidentifier.ismemberof shell adds icon overlay icon list.
3) max count of overlay icon in shell icon list 15 (4 default + 11 external).
4) 11 first icon handlers returning s_ok added shell icon list. other ingnored.
so if rename registry key 000 other icon handlers may return s_ok before handler.
so recommendation create full icon overlay image nse objects.
Comments
Post a Comment