IThumbnailCache (Interfaces)
Last changed: -49.43.248.2

.
Summary
Exposes methods for a system thumbnail cache that is shared across applications.

C# Definition:

[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("F676C15D-596A-4ce2-8234-33996F445DB1")]
public interface IThumbnailCache
{
    uint GetThumbnail(
        [In] IShellItem pShellItem,
        [In] uint cxyRequestedThumbSize,
        [In] WTS_FLAGS flags /*default:  WTS_FLAGS.WTS_EXTRACT*/,
        [Out][MarshalAs(UnmanagedType.Interface)] out ISharedBitmap ppvThumb,
        [Out] out WTS_CACHEFLAGS pOutFlags,
        [Out] out WTS_THUMBNAILID pThumbnailID
    );

    void GetThumbnailByID(
        [In, MarshalAs(UnmanagedType.Struct)] WTS_THUMBNAILID thumbnailID,
        [In] uint cxyRequestedThumbSize,
        [Out][MarshalAs(UnmanagedType.Interface)] out ISharedBitmap ppvThumb,
        [Out] out WTS_CACHEFLAGS pOutFlags
    );
}    

VB Definition:

<ComImport> _
<Guid("TODO")> _
'TODO: Insert <InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _ if this doesn't derive from IDispatch
Interface IThumbnailCache
   TODO
End Interface

User-Defined Types:

WTS_FLAGS

WTS_CACHEFLAGS

WTS_THUMBNAILID

ISharedBitmap

Notes:

IThumbnailCache is used with an instance of local thumbnail cache obtained by CoCreateInstance. To obtain it (C#):

Guid IID_IUnknown = new Guid("00000000-0000-0000-C000-000000000046");
Guid CLSID_LocalThumbnailCache = new Guid("50EF4544-AC9F-4A8E-B21B-8A26180DB13F");

IntPtr cachePointer;
CoCreateInstance(CLSID_LocalThumbnailCache, IntPtr.Zero, CLSCTX.CLSCTX_INPROC, IID_IUnknown, out cachePointer);

IThumbnailCache thumbnailCache = (IThumbnailCache) Marshal.GetObjectForIUnknown(cachePointer);

Documentation