Solved

How to write the command for several reource

Posted on 2006-10-31
3
171 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
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now