Click to See Complete Forum and Search --> : Please help


AndyK
September 20th, 1999, 12:54 AM
I have 2 files in one directory.....my program (.exe) and save file (.sav)....I want to add that save file to my program so it will be in my program (I will have only one file (.exe))....but then when program is loaded on another computer, I want my program to recreate the .sav file so it will make exactly same .sav file. So I will have .exe and .sav back like it was (2 files)....Basically all I need is to add the data from .sav file into my program and upon the load on another computer, my program will create new .sav file and "extract" the data back into it.

Thank You.

santulan
September 20th, 1999, 02:02 AM
Andy,

Please make it more clear. What I understand at this point is that you wish to read from a file (Say x.sav) through your exe file (Say y.exe) and do some thing. If the x.sav does not exists then system should create it and write some basic information into that and save it. (What information????)

Let me know if it is the case.



Santulan

AndyK
September 20th, 1999, 11:08 AM
ok sorry,
I have 2 files: y.exe and x.sav
I want to add data from x.sav into my y.exe, so now I will have only 1 file = y.exe
When I run y.exe on another computer it will create exactly the same x.sav, so then I will have 2 files again (y.exe and x.sav).....and x.sav will be exactly same file as it was before
"adding" it to y.exe......how can I do that?

Thank You

Lothar Haensler
September 20th, 1999, 11:32 AM
check out MSDN article Q194409
it tells you how to store "Any File Type in a Resource File".
It also tells you how to extract the binary resource from your exe file and write it to an OS file.
it operates with GIF, JPEG and BMP Files. But you can certainly extend its functionality for eXE Files.