I'm trying to update the RT_HTML resource using the functions below:
function MAKELANGID(sPrimaryLanguage : Word;
sSubLanguage : Word) : Word;
begin
result := (sSubLanguage shl 10) or
sPrimaryLanguage;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
update : dword;
S : String;
begin
update := BeginUpdateResourceW('c:\shdoclc.dll', true);
if update <> 0 then
try
UpdateResourceW( update, {RT_HTML} MAKEINTRESOURCEW(23),
'about.dlg',
MAKELANGID(SUBLANG_NEUTRAL,SUBLANG_DEFAULT ),
pointer(S),Length(S) + 1);
finally
EndUpdateResourceW(update, false);
end;
end;
However I get the resource section corrupted.
Please help!