Discussion:
GetThumbnailHandler called for IExtractIcon.?
(too old to reply)
msgurik
2010-06-10 11:30:48 UTC
Permalink
Hi,
I have implemented GetThumbnailHandler() of IThumbnailHandlerFactory
interface.
And in my GetThumbnailHandler() function, iam checking for riid ==
IIID_ExtractImage, if so, iam creating my extract image instance and returing
IExtractImage pointer. But GetThumbnailHandler() never gets called for
IID_IExtractImage, instead it gets called for riid == IIID_IExtractIconW. Why
is it so?
This behaviour is present in Win7.
bviksoe
2010-06-10 18:40:19 UTC
Permalink
Post by msgurik
Hi,
I have implemented GetThumbnailHandler() of IThumbnailHandlerFactory
interface.
And in my GetThumbnailHandler() function, iam checking for riid ==
IIID_ExtractImage, if so, iam creating my extract image instance and returing
IExtractImage pointer. But GetThumbnailHandler() never gets called for
IID_IExtractImage, instead it gets called for riid == IIID_IExtractIconW. Why
is it so?
This behaviour is present in Win7.
Hi,

Make sure to test it on newly added items. If you already returned
stuff once for a PIDL, the Shell will use its image cache and only ask
for IExtractIcon.

The IThumbnailHandlerFactory interface is as the name suggests, a
factory pattern. The Shell will use it to ask you what kind of
extractor you wish to use for thumbnails. By just denying the riid
request, the Shell should eventually ask you about the
IThumbnailProvider and IExtractImage too.

bjarke
Gurikar
2010-06-11 07:15:58 UTC
Permalink
Hi,
Yes iam checking the incoming riid for IIID_IExtractInage, but i never
recieve IID_IExtractImage, only I recieve IID_IExtractIconW.
Do i need to do anything for that.

Regards
Post by bviksoe
Post by msgurik
Hi,
I have implemented GetThumbnailHandler() of IThumbnailHandlerFactory
interface.
And in my GetThumbnailHandler() function, iam checking for riid ==
IIID_ExtractImage, if so, iam creating my extract image instance and returing
IExtractImage pointer. But GetThumbnailHandler() never gets called for
IID_IExtractImage, instead it gets called for riid == IIID_IExtractIconW. Why
is it so?
This behaviour is present in Win7.
Hi,
Make sure to test it on newly added items. If you already returned
stuff once for a PIDL, the Shell will use its image cache and only ask
for IExtractIcon.
The IThumbnailHandlerFactory interface is as the name suggests, a
factory pattern. The Shell will use it to ask you what kind of
extractor you wish to use for thumbnails. By just denying the riid
request, the Shell should eventually ask you about the
IThumbnailProvider and IExtractImage too.
bjarke
Leo Davidson
2010-06-11 08:00:39 UTC
Permalink
Post by Gurikar
Hi,
Yes iam checking the incoming riid for IIID_IExtractInage, but i never
recieve IID_IExtractImage, only I recieve IID_IExtractIconW.
Do i need to do anything for that.
Why not simply implement IExtractIconW?

Your thumbnailer will then work with far more files if you do that so
it's worth doing anyway.
Gurikar
2010-06-15 05:30:59 UTC
Permalink
Post by Leo Davidson
Post by Gurikar
Hi,
Yes iam checking the incoming riid for IIID_IExtractInage, but i never
recieve IID_IExtractImage, only I recieve IID_IExtractIconW.
Do i need to do anything for that.
Why not simply implement IExtractIconW?
Your thumbnailer will then work with far more files if you do that so
it's worth doing anyway.
Hi,
I have already implemented IExtractIconW, it gets called for all the
views except thumnailview, in thumbnail view, i.e IExtractImage
implementation, it gets bitmap image, so bigger image gets displayed
with more clarity. IExtractIconW implementation will return icon
image, which doesnt get displayed properly for thumbnail images. So i
want to implement IExtractImage.
One more thing, i have shell root folder implementation, there
IExtractImage gets called in ThumbnailFactory implementation,
similarly i have sub folders shell implementation, where in
IExtractImage doesnt get called in ThumbnailFactroy.
Leo Davidson
2010-06-15 08:08:44 UTC
Permalink
Post by Gurikar
Hi,
I have already implemented IExtractIconW, it gets called for all the
views except thumnailview, in thumbnail view, i.e IExtractImage
implementation, it gets bitmap image, so bigger image gets displayed
with more clarity. IExtractIconW implementation will return icon
image, which doesnt get displayed properly for thumbnail images. So i
want to implement IExtractImage.
One more thing, i have shell root folder implementation, there
IExtractImage gets called in ThumbnailFactory implementation,
similarly i have sub folders shell implementation, where in
IExtractImage doesnt get called in ThumbnailFactroy.
I assume when you say IExtractImage you mean IExtractImageA.
(IExtractImage is #defined as either IExtractImageA or IExtractImageW
depending on whether or not you are compiling with UNICODE defined.)

Both IExtractImageA and IExtractImageW should do exactly the same
thing. The only difference between the two is that one takes an ANSI*
filepath string and the other takes a Unicode filepath string. It
sounds like you are performing different actions when called for the
two interfaces? If so that is wrong.

(*What Win32 calls "ANSI", which may not literally be ANSI on all
machines, but that shouldn't be important.)

Loading...