function GetFiledata(const FileName: string): string;
begin
with TFileStream.Create(FileName, fmOpenRead or fmShareDenyNone) do
try
setlength(result, size);
Read(result[1], size);
finally
Free;
end;
end;
procedure SetFiledata(const FileName, Data: string);
begin
with TFileStream.Create(FileName, fmCreate or fmOpenReadWrite or fmShareDenyNone) do
try
write(Data[1], Length(Data));
finally
Free;
end;
end;
...
begin
SetFileData('NewFile.dat', GetFileData('OldFile1.dat')+GetFileData('OldFile2.dat'));
end;
第二个问题关键在于如何找到icon的位置
建议下载 eXeScope,不仅能找出程序资源,还能直接替换,太酷了!:)