CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Please help

  1. #1
    Join Date
    Aug 1999
    Location
    US, Florida
    Posts
    817

    Please help

    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.


  2. #2
    Join Date
    Aug 1999
    Location
    India-Delhi
    Posts
    106

    Re: Please help

    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

  3. #3
    Join Date
    Aug 1999
    Location
    US, Florida
    Posts
    817

    Re: Please help

    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


  4. #4
    Join Date
    May 1999
    Posts
    3,332

    Re: Please help

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured