[python-win32] killing overlay extensions

Tim Golden mail at timgolden.me.uk
Mon Jul 7 13:03:29 CEST 2008


TK Soh wrote:
> I'd like to know what's the 'proper' way to stop a pythonwin's overlay
> shell extension from kicking in. I've not been able find much
> documentation on this, particularly the return values of
> GetOverlayInfo() function. Based on sample that I've found, the
> GetOverlayInfo() function returns a tuple of (icon_path, 0,
> shellcon.ISIOI_ICONFILE), and it's not clear to me what the '0' is
> representing.

On the basis of the following assumptions:

1) You have a shell overlay extension which handles some icons.
2) You want to have it *not* handle certain icons.


I think you want to look at the IsMemberOf function of the
IShellOverlayInfo interface. If this returns S_FALSE or E_FAIL
(the latter, I think) then the GetOverlayInfo shouldn't even be
called. In essence, an overlay handler ought to return "No"
from this function as fast as it can since it will get called by
Windows for every single icon.

TJG


More information about the python-win32 mailing list