Delphi程序res资源文件释放,Windows brcc32制作res资源文件
1、新建一个文本文件sample.rc内容为
sample exefile sample.exe
2、把sample.exe和sample.rc拷贝到c:myres目录下
3、执行dos命令,产生一个sample.res文件,这就是exe的资源文件
brcc32.exe sample.rc
4、把sample.res拷贝到你的工程文件目录
{$R sample.res}
var
t : TResourceStream;
begin
try
t := TResourceStream.Create(HInstance,'sample','exefile'); //其中HInstance为一个句柄常量;sample为资源名;exefile为资源类型
t.SaveToFile('c:\2.exe'); //保存文件成2.exe
finally
t.free;
end;
end;
本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。