IThumbnailProvider interface (thumbcache.h)

Exposes a method for getting a thumbnail image and is intended to be implemented for thumbnail handlers. The object that implements this interface must also implement IInitializeWithStream.

Inheritance

The IThumbnailProvider interface inherits from the IUnknown interface. IThumbnailProvider also has these types of members:

Methods

The IThumbnailProvider interface has these methods.

 
IThumbnailProvider::GetThumbnail

Gets a thumbnail image and alpha type.

Remarks

The Shell calls IThumbnailProvider::GetThumbnail to obtain an image to use as a representation of the item.

An implementation of this interface for photo thumbnails is supplied in Microsoft Windows as CLSID_PhotoThumbnailProvider. Applications that use the supplied implementation must define a constant CLSID identifier using the GUID {C7657C4A-9F68-40fa-A4DF-96BC08EB3551}.

// {C7657C4A-9F68-40fa-A4DF-96BC08EB3551}
const CLSID CLSID_PhotoThumbnailProvider = {0xC7657C4A, 0x9F68, 0x40fa, {0xA4, 0xDF, 0x96, 0xBC, 0x08, 0xEB, 0x35, 0x51}} ;

Initializing The object that implements this interface must also implement IInitializeWithStream. The Shell calls IInitializeWithStream::Initialize with the stream of the item, and IInitializeWithStream is the only initialization interface used when IThumbnailProvider instances are loaded out-of-proc (for isolation purposes). This is the primary code path for Windows for all IThumbnailCache code paths.

It is possible for a thumbnail implementation to be initialized with IInitializeWithItem or IInitializeWithFile when the handler is request by a 3rd party without using the IThumbnailCache API, but this is uncommon. If you implement IInitializeWithItem, the Shell calls IInitializeWithItem::Initialize with the IShellItem representation of the item. If you implement IInitializeWithFile, the Shell calls IInitializeWithFile::Initialize with the path of the file.

If none of these interfaces is present, IThumbnailProvider is not called.

Client apps If you're developing a client app, you should use IShellItemImageFactory instead.

Windows Vista IThumbnailProivder is new for Vista and replaces IExtractImage. Vista still supports IExtractImage but lacks the ability to return the image type (alpha or not).

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header thumbcache.h