|
-
Jan 8th, 2010, 02:22 AM
#1
Thread Starter
New Member
IExtractImage::Extractimage exception
When I try to extract thumbnail of any document which has thumbnail view in windows explorer, it succeeds and displays the image.
Whereas for documents which does not have thumbnail view (eg. empty folder)which has icon as its thumbnail view thorws exception.
Is there any way to extract that icon image as thumbnail view without throwing exception.
My code is
item.GetUIObjectOf(IntPtr.Zero, 1, ref pidl, ref iidExtractImage, out prgf, ref iunk);
extractImage = (IExtractImage)iunk;
if (extractImage != null)
{
//Got an IExtractImage object!
SIZE sz = new SIZE();
sz.cx = desiredSize.Width;
sz.cy = desiredSize.Height;
StringBuilder location = new StringBuilder(260, 260);
int priority = 0;
int requestedColourDepth = 32;
EIEIFLAG flags = EIEIFLAG.IEIFLAG_ASPECT | EIEIFLAG.IEIFLAG_SCREEN;
int uFlags = (int)flags;
extractImage.GetLocation(location, location.Capacity, ref priority, ref sz, requestedColourDepth, ref uFlags);
extractImage.Extract(out hBmp);
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|