Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to write the command for several reource

Posted on 2006-10-31
3
Medium Priority
?
195 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 750 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

609 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