// Getting inconsistent results. Need to work on code. public Bitmap GetThumbnail() { Bitmap bitmap = null; PROPVARIANT propvar = default(PROPVARIANT); try { Marshal.ThrowExceptionForHR(GetPropertyValue(FMTID.FMTID_ExtendedSummaryInformation, (uint)ExtendedSummaryInformationConstants.LARGE_DIB, out propvar)); if (propvar.Type == VarEnum.VT_CF) { // Get CLIPDATA. CLIPDATA clipdata = propvar.GetCLIPDATA(); // built-in Windows format if (clipdata.ulClipFmt == -1) { // Pointer to BITMAPINFOHEADER. IntPtr pBIH = clipdata.pClipData; bitmap = DibToBitmap.Convert(pBIH); } else { Console.WriteLine("CLIP FORMAT ERROR"); Marshal.ThrowExceptionForHR(HRESULT.DV_E_CLIPFORMAT); } } else { Console.WriteLine("INVALID VARIANT ERROR"); Marshal.ThrowExceptionForHR(HRESULT.ERROR_INVALID_VARIANT); } } catch { throw; } finally { propvar.Clear(); } return(bitmap); }