Solved

Extracting a user defined file from a  resource file

Posted on 1998-12-01
3
124 Views
Last Modified: 2010-04-04
I have compiled a few Text-Based files into a resource file and I would like to be able to save them to file, before executing another windows app to read them and produce the required report. How can I save them to disk ...
0
Comment
Question by:taskforce
3 Comments
 
LVL 8

Expert Comment

by:ZifNab
Comment Utility
By code or manually?

Use TFileStream, or AssignFile, ...

Zif.
0
 

Author Comment

by:taskforce
Comment Utility
The dilema : I have text based files that I want to use at some point. I have compiled these into my EXE file as a resource. I now need to know how to programatically extract these before I can use them. i.e. SaveToFile('TextFile.Txt')
0
 
LVL 3

Accepted Solution

by:
williams2 earned 100 total points
Comment Utility
Hmm.. Dear TaskForce, you are not good at asking questions. Do you need to save the file from within your application, then the easiest way to do it is like:

var
  SL: TStringList;
Begin
  SL:= TStringList.Create;
  //.. Add some strings ...
  SL.SaveToFile(Filename.TXT);
  SL.free;
End;

or do you want to extract the text from your ressource file? in that case you should use TRessourceStream to first load the .exe file with the .LoadFromFile method, and then identify the ressource type you are looking for.

/Williams
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
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…

772 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

10 Experts available now in Live!

Get 1:1 Help Now