internal ShellThumbnail(ShellItem shellObject)
{
if (shellObject != null && shellObject.ComInterface != null)
{
_Item = shellObject;
shellItemNative = shellObject.ComInterface;
if (ThumbnailCache == null)
{
Guid IID_IUnknown = new Guid("00000000-0000-0000-C000-000000000046");
Guid CLSID_LocalThumbnailCache = new Guid("50EF4544-AC9F-4A8E-B21B-8A26180DB13F");
IntPtr cachePointer;
Ole32.CoCreateInstance(ref CLSID_LocalThumbnailCache, IntPtr.Zero, Ole32.CLSCTX.INPROC, ref IID_IUnknown, out cachePointer);
ThumbnailCache = (IThumbnailCache)Marshal.GetObjectForIUnknown(cachePointer);
}
}
}