N
netkk
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure CopyResToFile(const DestFile, ResName: string;
ResType: PChar = RT_RCDATA);
var
res: TResourceStream;
begin
res := TResourceStream.Create(HInstance, ResName, ResType);
try
if FileExists(DestFile) then
DeleteFile(PChar(DestFile));
try
res.SaveToFile(DestFile);
finally
res.Free;
end;
except
raise Exception.Create('Create File Fail');
end;
end;
ResType: PChar = RT_RCDATA);
var
res: TResourceStream;
begin
res := TResourceStream.Create(HInstance, ResName, ResType);
try
if FileExists(DestFile) then
DeleteFile(PChar(DestFile));
try
res.SaveToFile(DestFile);
finally
res.Free;
end;
except
raise Exception.Create('Create File Fail');
end;
end;