There was a thread a while back about packing a dll into an executable as a resource for use at run time. I whipped up an example. Forgive the messiness of the source. I cannabalized it from another program I wrote. All it does is hook the CTRL key, but it uses the dll dumped from the resource to do it. It deletes the dll upon exiting. Windows seems to take a while to release the dll, so there is a loop at the end to keep calling DeleteFile until it works.
Posted on 2002-12-12 08:54:43 by rdaneel
Why not use PEBundle from Jeremy Collake.
Posted on 2002-12-12 09:13:02 by JCP

PEBundle
Bundle modules to an executable to create a seamless binary. PEBundle can 'bundle' with your executable DLLs, or any other file types. No longer will you have to worry if all dependencies, in their correct versions, exist on the client machine at runtime. Unique in-memory bundling doesn't extract to disk (DLLs only, and only some DLLs). <---------------------------------------------------
<---------------------------------------------


Need I say more?
Posted on 2002-12-12 09:19:13 by rdaneel
Write your own PEBundle Clone :)
LoadDllFromMemory - http://www.powerbasic.com/support/forums/Forum7/HTML/001644.html
Posted on 2002-12-12 09:33:22 by bazik
Rdaneel,you asked before about allmost the same subject :)

http://www.asmcommunity.net/board/index.php?topic=8699
Posted on 2002-12-12 09:50:55 by Vortex