]、。·ˉˇ¨〃々—~‖…’”〕〉》」』〗】∶!"'),.:;?]` function GetIconFromExt(ext:string;var filename:string;var index:integer):boolean;
var
reg:tregistry;
src:string;
begin
reg:=tregistry.create;
reg.RootKey:=hkey_classes_root;
result:=reg.OpenKey('.'+ext,false);
if result then
begin
src:=reg.ReadString('');
reg.CloseKey;
if reg.OpenKey(src+'\defaulticon',false) then
begin
src:=reg.ReadString('');
if pos('%1',src)<>0 then exit;
filename:=copy(src,0,pos(',',src)-1);
index:=strtoint((trim(copy(src,pos(',',src)+1,length(src)-pos(',',src)))));
end;
end;
reg.Free;
end;