Link to home
Start Free TrialLog in
Avatar of brainware
brainware

asked on

Streams

I know the TSaveToStream etc. but i cant get the stuff working as i want..

in need a Sample of where you like select files and Add the to a Data File, and how to get in contact with them,
like putting 10 exe files in a dat file, and be able to run the apps..
Avatar of michaue
michaue

Let me see if I understand you correctly.

You want

1.  the user to be able to select files and then your program must write the locations of the files into a data file
2.  the program to read this data file at a later stage and display it as a pick list to the user.
3.  the user to pick one of the listed files and then run it from within your program

???


Avatar of brainware

ASKER

I want to copy the files into a DATA file, like a WAD file..
and be able to use the files in hmm WAD file,
like this:  make a WAD!!! file with 10 jpeg or bmp pics, and be able to get info from the
wad file of whats in it, and be able to view the pics..

dont have to be pics... but somthing not only text.

hope u can do it.. now im being nice.. +pts
Nope, you've lost me ...

Hope you find an answer ... you should, this is a pretty good site

Have Fun

Elfrieda :)
I thik this is what you need :-

1. Create a new TFilestream

2. Add a header to it showing what files are going to be stored in the DAT file. (I've done this before by creating a new component - THeader, which has some string properties. Being a component you can just stream it out into the TFilestream)

3. Load the Bitmaps (or whatever) using a TMemorystream object.
4. Stream the TMemorystream to the TFilestream
5. Repeat steps 3 and 4 for each file.

To then extract the files, you have to read the header and then read each of the files and save the one you want as a file on its own. It can then be used as normal.


Socrates.
ASKER CERTIFIED SOLUTION
Avatar of ronit051397
ronit051397

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
k.. ill just have to get the rest working from there..