Problem with madRes

delphi package - madRes, madTools, madStrings, ...
Post Reply
Loodney
Posts: 2
Joined: Mon Sep 25, 2006 11:50 pm
Location: Russia

Problem with madRes

Post by Loodney »

I made the following function to copy a resource from an exe to another... it works fine with single icons, cursors, manifest... but when I copy the version info, it doesn't appear in the file properties dialog box, that's like windows can't find it, but any resource can open it... like there is nothing wrong.

function CopyResourceW(Update, Source: DWORD; Type_, Name: PWideChar; Language: Word; NewName: PWideChar; ReplaceIfExists: Bool = True): Bool;
var
Data,
D2 : Pointer;
Size,
S2 : DWORD;
begin
Result := False;
if GetResourceW(Source, Type_, Name, Language, Data, Size) then
begin
if GetResourceW(Update, Type_, Name, Language, D2, S2) then
begin
D2 := nil;
if not ReplaceIfExists then
Exit;
end;
Result := UpdateResourceW(Update, Type_, Name, Language, Data, Size);
end;
end;

I know you have a lot of work to do Madshi, but please help me to solve this problem.

Thanks.
madshi
Site Admin
Posts: 10749
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Can you please email a full test project to me together with sample exe files, so that I can test this without spending too much time on it? Thanks...
Post Reply