library Delphi; uses
SysUtils,graphics,
Classes,shellapi;function GetIconFromEXE(EXEFile:pchar;Dest:pchar):integer;stdcall;
var
tico:ticon;
begintico.Create ;
tico.Handle :=extractIcon(hinstance, pchar(EXEFile),0);
tico.SaveToFile(Dest);
result:=1
end;exports
GetIconFromEXE;begin
end.
SysUtils,graphics,
Classes,shellapi;function GetIconFromEXE(EXEFile:pchar;Dest:pchar):integer;stdcall;
var
tico:ticon;
begintico.Create ;
tico.Handle :=extractIcon(hinstance, pchar(EXEFile),0);
tico.SaveToFile(Dest);
result:=1
end;exports
GetIconFromEXE;begin
end.
你运行后的有什么错误提示之类的呀,要有针对性的分析嘛
为tico:=ticon.Create ;
try
try
tico.Handle :=extractIcon(hinstance, pchar(EXEFile),0);
tico.SaveToFile(Dest);
result:=1
except
result;= 0;
end;
finally
tico.free;
end;