![]() |
IExtractImage
Hallo,
ich habe einen gültigen ShellFolder und einen gültigen RelativePIDL. Das ExtractImage ist gültig. Wenn ich die Proc unten einmal aufrufe erhalte ich die HBITMAP. In einer Schleife wird die Proc immer wieder aufgerufen. Dann bleibt sie bei res:=ExtractImage.Extract(hbmp); hängen un kehrt nicht zurück. Warum?
Code:
Danke und beste Grüße
res:=CoInitializeEx(nil, COINIT_APARTMENTTHREADED or COINIT_DISABLE_OLE1DDE);
if Succeeded(res) then begin res:=ShellFolder.GetUIObjectOf(0, 1, PDataInfo(ChildItem.Data).RelativeIDL, IExtractImage, nil, Pointer(ExtractImage)); if Succeeded(res) then begin sz.cx:=Width; sz.cy:=Height; Priority:=IEIT_PRIORITY_NORMAL; ImgColorDepth:=32; Flags:=IEIFLAG_ASPECT or IEIFLAG_ASYNC; GetLocationRes:=ExtractImage.GetLocation(buf, sizeof(buf), Priority, sz, ImgColorDepth, Flags); if (GetLocationRes = NOERROR) or (GetLocationRes = E_PENDING) then begin res:=ExtractImage.Extract(hbmp); if Succeeded(res) then begin result:=TBitmap.Create; result.Handle:=hbmp; result.Dormant; end; end; end; CoUninitialize; end; |
AW: IExtractImage
Delphi-Quellcode:
Ist dann im hängen bleiben Fall res ungleich S_OK?
res:=ExtractImage.Extract(hbmp);
if Succeeded(res) then |
AW: IExtractImage
Kehrt gar nicht mehr aus res:=ExtractImage.Extract(hbmp); zurück. Ich kann res nicht auswerten.
|
AW: IExtractImage
Baue uns mal ein kleines, aber vollständiges Testprojekt.
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 19:56 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz