Gets a thumbnail from the thumbnail cache, given its ID.
HRESULT GetThumbnailByID( WTS_THUMBNAILID thumbnailID, UINT cxyRequestedThumbSize, ISharedBitmap **ppvThumb, WTS_CACHEFLAGS *pOutFlags );
The ID of the thumbnail to retrieve. The ID is obtained by calling GetThumbnail.
The requested thumbnail size in pixels. This value cannot be larger than 1024.
The address of a ISharedBitmap interface pointer that, when this method returns successfully, receives the object for accessing the requested thumbnail. This parameter can be NULL.
A pointer to a value that, when this method returns successfully, receives a combination of the following flags. This value can be set to NULL if this information is not needed.
0x00000001. Set when the returned bitmap dimensions are less than cxyRequestedThumbSize.
0x00000002. Set when the returned image is in the cache.
Returns S_OK if successful, or an error value otherwise, including the following:
||A parameter is invalid.|
||The Shell item does not support thumbnail extraction. For example, .exe or .lnk items.|
||The extraction took longer than the maximum allowable time. The extraction was not completed.|
||A surrogate process was not available to be used for the extraction process.|
||The WTS_FASTEXTRACT flag was set, but fast extraction is not available.|
This method is typically called after GetThumbnail has already been called to retrieve the thumbnail ID.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|