Error with EndUpdateResourceW

delphi package - madRes, madTools, madStrings, ...
Post Reply
Timuk
Posts: 3
Joined: Sun Jul 18, 2004 2:30 pm

Error with EndUpdateResourceW

Post by Timuk »

Hi dear Madshi.

function UpdateExeIcon(exeFile, iconGroup, icoFile: string) : boolean;
var resUpdateHandle : dword;
begin
resUpdateHandle := BeginUpdateResourceW(PWideChar(wideString(exeFile)), false);
if resUpdateHandle <> 0 then begin
result := LoadIconGroupResourceW(resUpdateHandle, PWideChar(wideString(iconGroup)), 0, PWideChar(wideString(icoFile)));
result := EndUpdateResourceW(resUpdateHandle, false) and result;
end else
result := false;
end;

If i change icon in exe file compressed with ASPack 2.11 error occures with EndUpdateResourceW.

How can it be repaired? Thanks.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Compressed exes usually have a kind of invalid resource section. madRes doesn't like that. And I think resource editor tools don't like that, either. Sorry, but I don't think I can fix that.
Post Reply