Link to home
Start Free TrialLog in
Avatar of ProgsX
ProgsX

asked on

How to write the command for several reource

How to write the command for several reource

ex:

{$R “project.res” “project.rc”}
{$R “extract.res” “extract.rc”}
Avatar of TName
TName

Why don't you just try

{$R projects.res}
{$R extract.res}
Avatar of ProgsX

ASKER

I use two files

Sfx.rc in the file (extract RCDATA Sfx.exe)
and
Build.rc in the next file (extract RCDATA Build.exe)


{$R 'Sfx.res' 'Sfx.rc'}
{$R 'build.res' 'build.rc'}

I use this function to extract the information which I have need

procedure ExtraireEXE_sfx(CheminSfx: String);//sfx
var
 Res: TResourceStream;
 EXE: TFileStream;
begin
  Try
    Res := TResourceStream.Create(hInstance, 'extract', RT_RCDATA);
    EXE := TFileStream.Create(CheminSfx, fmCreate);
    EXE.CopyFrom(Res, 0);
  Finally
    EXE.Free;
    Res.Free;
  end;
end;

procedure ExtraireEXE_build(CheminBuild: String);//build
var
 Res: TResourceStream;
 EXE: TFileStream;
begin
  Try
    Res := TResourceStream.Create(hInstance, 'extract', RT_RCDATA);//
    EXE := TFileStream.Create(CheminBuild, fmCreate);
    EXE.CopyFrom(Res, 0);
  Finally
    EXE.Free;
    Res.Free;
  end;
end;


I have his errors

[Error] WARNING. Duplicate resource(s):
[Error]   Type 10 (RCDATA), ID EXTRACT:
[Error]     File C:\Documents and Settings\Administractor\Mes documents\Projects\Projects\build.res resource kept; file C:\Documents and Settings\Administractor\Mes documents\Projects\Projects\Sfx.res resource discarded.

ASKER CERTIFIED SOLUTION
Avatar of Pierre Cornelius
Pierre Cornelius
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial