Problem with madRes

delphi package - madRes, madTools, madStrings, ...

Problem with madRes

Postby Loodney » Wed Oct 11, 2006 5:33 pm

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.
Loodney
 
Posts: 2
Joined: Mon Sep 25, 2006 11:50 pm
Location: Russia

Postby madshi » Thu Oct 12, 2006 6:39 am

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...
madshi
Site Admin
 
Posts: 9412
Joined: Sun Mar 21, 2004 5:25 pm


Return to madBasic

Who is online

Users browsing this forum: No registered users and 1 guest

cron