Results 1 to 6 of 6
  1. #1
    ..x_X_x..'s Avatar
    Join Date
    Dec 2011
    Gender
    male
    Location
    On The [[[MoOoN]]]
    Posts
    1,812
    Reputation
    49
    Thanks
    620
    My Mood
    Angelic

    Adding File In Resources At Runtime

    Hello MPGH coders...

    I made a project and i added open file dialog and i want the chosen file from open file dialog to be added to my resource as a Dll......:
    Can i do that?

  2. #2
    Raow's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Location
    47°37′39″N 122°14′32″W
    Posts
    2,720
    Reputation
    140
    Thanks
    594
    I've been looking as well for a while for my idea of a file vault, i didn't manage to find much. but a few threads and websites mentioned something like "use resourcewriter" and stuff, but i don't know

  3. #3
    ..x_X_x..'s Avatar
    Join Date
    Dec 2011
    Gender
    male
    Location
    On The [[[MoOoN]]]
    Posts
    1,812
    Reputation
    49
    Thanks
    620
    My Mood
    Angelic
    Quote Originally Posted by raow25 View Post
    I've been looking as well for a while for my idea of a file vault, i didn't manage to find much. but a few threads and websites mentioned something like "use resourcewriter" and stuff, but i don't know
    Iam gonna to be crazy about it..

  4. #4
    Broderick's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Location
    Basement.
    Posts
    100
    Reputation
    42
    Thanks
    30
    You can't. Resources are are compile-time data store. Their size, location and type are all laid out in the PE structure of the file. You can't just dynamically add on anything you want.

    You could write a really ugly "possible" solution involving manual PE walking and allocating an arbitrarily large resource at compile time, then overwriting it with data as you go, but that would be patchy at best, and would probably cause more problems than it would solve.

    The next big problem is that any writing you do to the program will have to be done while the program is not running. Meaning if you were to write the contents of a file into your exe, you'd need to write a batch script or something to execute when the program closes.

    In reality, this isn't going to work. From your description of what you want, it doesn't even sound overly useful: Why do you want to add the .dlls to your resources?
    The fish trap exists because of the fish.
    Once you've gotten the fish you can forget the trap.
    The rabbit snare exists because of the rabbit.
    Once you've gotten the rabbit, you can forget the snare.
    Words exist because of meaning.
    Once you've gotten the meaning, you can forget the words.
    Where can I find a man who has forgotten words so I can talk with him?

  5. The Following 2 Users Say Thank You to Broderick For This Useful Post:

    Hassan (08-16-2012),Paul (08-16-2012)

  6. #5
    ..x_X_x..'s Avatar
    Join Date
    Dec 2011
    Gender
    male
    Location
    On The [[[MoOoN]]]
    Posts
    1,812
    Reputation
    49
    Thanks
    620
    My Mood
    Angelic
    then i can't..if so @Hassan req to close plz if u want

  7. #6
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    Yeah you can't do that.

    Closed on request.

Similar Threads

  1. [Solved] How to decryption *.ext files in resources/ext?
    By dat061192 in forum Dragon Nest Help
    Replies: 3
    Last Post: 08-31-2011, 10:43 PM
  2. [Help] Add DLL file to resources of injector and make it work..
    By hitmen69 in forum Visual Basic Programming
    Replies: 13
    Last Post: 06-10-2011, 02:45 AM
  3. common_mp.ff and patch_mp.ff Source Files [Modding Resource]
    By HACKINGPIE in forum Call of Duty Modern Warfare 2 Discussions
    Replies: 2
    Last Post: 06-09-2010, 11:56 PM
  4. [Vb.net] Write folder with files from resource to..
    By ppl2pass in forum Visual Basic Programming
    Replies: 23
    Last Post: 05-29-2010, 03:08 AM
  5. Adding and using Resources with Visual Studios Express
    By why06 in forum C++/C Programming
    Replies: 3
    Last Post: 04-02-2010, 09:08 AM