Link to home
Start Free TrialLog in
Avatar of tongalite
tongalite

asked on

Exe to Resource Q.

Hi all
I was wondering if it's possible to take a small standalone executable and compile it into a RES file and use it as a resource in my application...ie, the exe embedded into my main exe. How would the res file be accessed by my main app? How would I call the procedure etc.... Anbody have any code examples. TIA
T.
Avatar of DragonSlayer
DragonSlayer
Flag of Malaysia image

ASKER CERTIFIED SOLUTION
Avatar of inthe
inthe

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Gwena
Gwena

Grr...EE acting up today

Hi tongalite :-)

  Are you wanting to place a small exe inside a res file in your program and run it from there?  If so you will probably not have much luck...although I have seen this done with a dll.

  It's easy though to store a small exe in a res file and then extract it to disk and run it from disk..as inthe has shown you.. or you could tack it onto the end of your exe and extract it from there...in any case I recommend compressing it before you add it just to keep the size down :-)

  It's also possible to add code to your exe so that it can modify itself as it runs by adding any other exe to it's end and renaming itself to the name of that exe... then when that program is run your code executes first...then the exe that was tacked on executes....it's pretty cool and if you compress the second exe you can usually keep total size the same as it was :-)
Avatar of tongalite

ASKER

Hi
inthe & Gwena,
Thanks for the response,

<snip, from Gwena>
>Are you wanting to place a small exe inside a res file in >your program and run it from there?  If
>so you will probably not have much luck...although I have >seen this done with a dll.

Yeah, that's what I had in mind. I have only just accessed your comments so I'll give your proposal a whirl (inthe)
Cheers
T.
<I just love this great messageboard and all you cool dudes who provide the help..superb!>
Hi inthe,
Wow! worked like a dream! thanks.
I will have much fun with your example code
cheers
T.
Thanks also to Gwena:)
Have fun!
no problem
 
cheers ;-)