uses shellapi; procedure getshellinfo(a:tfilename;var name,typ:string;var icon:ticon;var attr:integer); var info : tshfileinfo; begin fillchar(info,sizeof(tshfileinfo),0); shgetfileinfo(pchar(a),0,info,sizeof(info),shgfi_displayname or shgfi_typename or shgfi_icon or shgfi_attributes); with info do begin name := szdisplayname; typ := sztypename; icon.handle := hicon; attr := dwattributes; end; end;
var
info : tshfileinfo;
begin
fillchar(info,sizeof(tshfileinfo),0);
shgetfileinfo(pchar(a),0,info,sizeof(info),shgfi_displayname or shgfi_typename or shgfi_icon or shgfi_attributes);
with info do begin
name := szdisplayname;
typ := sztypename;
icon.handle := hicon;
attr := dwattributes;
end;
end;