1,184
社区成员
发帖
与我相关
我的任务
分享STRINGTABLE
{
1, "abcdefghijklmnopqrstuvwxyz"
}
function ChangeString(const FileName;NewString: string): Boolean;
var
hUpdate: Cardinal;
s:string;
begin
Result:= False;
hUpdate:= BeginUpdateResource('d:\demo.exe', false);
if hUpdate = 0 then Exit;
try
s:=NewString;
Result:= UpdateResource(hUpdate, 'String Table','1', 0, @s[1], Length(s));
finally
EndUpdateResource(hUpdate, not Result);
end;
end;unit Unit1;
interface
implementation
uses TestConsts;
var
TestString: string;
...