Archived

This topic is now archived and is closed to further replies.

FrancoisSoft

Loading EXE Files

Recommended Posts

Ok, here''s the scenario. I''m trying to load and archive of EXE files from a single file. I don''t want to extract every single one and execute it as a separate file. Instead I loaded the data of each EXE file into a buffer. Is there anyway to execute the buffer or can I use a thread to execute that code after I read the EXE file''s header. What should I do?

Share this post


Link to post
Share on other sites
I doubt there is any other way but to extract the file to the harddisk first... you could delete it afterwards again though. (thats how programs like winzip do it)

Share this post


Link to post
Share on other sites
Technically, you could load code to execute like this:
void (*func)();
char *buffer;
// Load code into buffer
func = buffer;
func();

I wouldn''t recommend it, though.


"For crying out loud, she has fishes coming out of her head on either side. How can you find this hot?!"
"If anyone sees a suspicious, camouflaged factory being carried across the desert, they should report it immediately."

Share this post


Link to post
Share on other sites