解决 :(不要总是偷懒,自己想想~~~给你一个过程,够意思了;分析吧~~)
procedure getshellinfo1(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 infodo
begin
name := szdisplayname;
typ := sztypename;
icon.handle := hicon;
attr := dwattributes;
end;
end;