IExplorerBrowser Performance Problems in Delphi XE2 -
IExplorerBrowser Performance Problems in Delphi XE2 -
i'm trying write multi-panel, multi-tabbed file manager. have been using iexplorerbrowser, performance terrible compared windows explorer. creating single instance isn't bad, if i'm creating 2 panel, 2 tabs per panel manager have 4 iexplorerbrowser instances. creation slow. 1 time created performance acceptable. there tricks speeding or 1 of drawbacks of com? initialization code looks loosely next (exception handling , other unimportant details removed).
tmyclass = class(tframe) ... panel1: tpanel; ... private ... fexplorerbrowser: iexplorerbrowser; fadvisecookie: cardinal; fselectedpidl: pitemidlist; procedure initialize; ... protected ... public ... published ... end; procedure tmyclass.initialize; var fs: tfoldersettings; r: trect; hres: hresult; begin hres := cocreateinstance(clsid_explorerbrowser, nil, clsctx_inproc, iid_iexplorerbrowser, fexplorerbrowser); if succeeded(hres) begin fs.fflags := 0; fs.viewmode := fvm_details; r := rect(0, panel1.height, clientwidth, clientheight); hres := fexplorerbrowser.initialize(handle, r, fs); if succeeded(hres) begin hres := fexplorerbrowser.setoptions(ebo_showframes); if succeeded(hres) begin hres := fexplorerbrowser.advise(self iexplorerbrowserevents, fadvisecookie); if succeeded(hres) begin if fselectedpidl nil hres := fexplorerbrowser.browsetoidlist(fselectedpidl, 0); end; end; end; end; end;
specifically phone call cocreateinstance bottleneck. suggestions?
i'm using delphi xe2 on windows 7.
thanks, michael
performance delphi com delphi-xe2
Comments
Post a Comment