provide proper language and everything should work just fine.
[code:1:91ed9b735b]
function UpdateExeIcon(exeFile, iconGroup, icoFile: string; language: word) : boolean;
var resUpdateHandle : dword;
c:TPIconGroup;
begin
resUpdateHandle := BeginUpdateResourceW(PWideChar(wideString(exeFile)), false);
if resUpdateHandle <> 0 then
begin
if (icongroup=’MAINICON’) or GetIconGroupResourceW(resUpdateHandle, PWideChar(wideString(iconGroup)), language, c) then
result := LoadIconGroupResourceW(resUpdateHandle, PWideChar(wideString(iconGroup)), language, PWideChar(wideString(icoFile)))
else
if StrToIntDef(iconGroup, -1)>-1 then
result := LoadIconGroupResourceW(resUpdateHandle, PWideChar(pointer(strtoint(iconGroup))), language, PWideChar(wideString(icoFile)))
else
result := false;
result := EndUpdateResourceW(resUpdateHandle, false) and result;
end else
result := false;
end;
[/code:1:91ed9b735b]
and just for the record, here is the question that the above was derived from:
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_22878233.html
and I made an extract thingie too 🙂
both projects can be found here: http://www.ciuly.com/delphi/misc/madshi/