madRes - UpdateResourceW (AV)
Posted: Thu Feb 09, 2006 10:47 pm
I'd like to add an XP MANIFEST to some executables using MadRes:
but I step into an Access Violation in UpdateResourceW:
Is it a fault of mine?!
Thank you in advance
Code: Select all
upd := BeginUpdateResourceW(PWideChar(WideString(f)), false);
if upd <> 0 then
begin
if UpdateResourceW(upd, MAKEINTRESOURCEW(24), MAKEINTRESOURCEW(1), 0, Res.Memory, Res.Size) then
Items[i].SubItems[0] := XP else Items[i].SubItems[0] := ERR;
EndUpdateResource(upd, false);
end;
Code: Select all
if update <> 0 then
try
with TPResourceHandle(update)^ do begin
ppr1 := FindDir(tree, type_); <--- ERROR!
if ppr1^ <> nil then begin
Thank you in advance