Solved

How to write the command for several reource

Posted on 2006-10-31
3
180 Views
Last Modified: 2010-04-05
How to write the command for several reource

ex:

{$R “project.res” “project.rc”}
{$R “extract.res” “extract.rc”}
0
Comment
Question by:ProgsX
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 28

Expert Comment

by:TName
ID: 17843974
Why don't you just try

{$R projects.res}
{$R extract.res}
0
 

Author Comment

by:ProgsX
ID: 17844344
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.

0
 
LVL 14

Accepted Solution

by:
Pierre Cornelius earned 250 total points
ID: 17872552
You must use different identifiers in your resource files. I suggest you use a prefix e.g. sfx_extract and build_extract. you will only need one extract function.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question