Store a file into an exe after compiled?

This is a discussion on Store a file into an exe after compiled? within the C Programming forums, part of the General Programming Boards category; Is it possible to create an char array and add some markers around the char array so that "file writer" ...

  1. #1
    Registered User
    Join Date
    Jun 2003
    Posts
    51

    Store a file into an exe after compiled?

    Is it possible to create an char array and add some markers around the char array so that "file writer" program knows where to start writing and the storage program knows where start outputting and where to end the output.

    OR

    I should write a script that generate an char array in C source code then compile it?

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,452
    What are you trying to do?
    Writing data back into an exe is a somewhat old idea (and somewhat suspicious).
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Jun 2003
    Posts
    51
    Quote Originally Posted by Salem View Post
    What are you trying to do?
    Writing data back into an exe is a somewhat old idea (and somewhat suspicious).
    I'm not doing something suspicious nor malicious...
    Just trying to pack the files into an exe so that it could act like utorrent.
    Where the exe act as a very light weight installer (eject the correct dll for 32/64bit system respectively), updater, launcher and uninstaller as the same time.

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,452
    Like a self-extracting archive?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  5. #5
    Registered User
    Join Date
    Jun 2003
    Posts
    51
    yup... but I'll add additional detections.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Totally confused on assigment using linked lists
    By Uchihanokonoha in forum C++ Programming
    Replies: 8
    Last Post: 01-05-2008, 03:49 PM
  2. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 04:54 PM
  3. Replies: 3
    Last Post: 03-04-2005, 01:46 PM
  4. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  5. Store high scores in exe file
    By Nutshell in forum Game Programming
    Replies: 12
    Last Post: 04-27-2003, 04:09 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21