Can I insert some .dll or .exe as binary resource into my application and then load dll or start exe directly from application?

Thanks to everybody who answer me.
Mike.
Posted on 2001-08-30 09:42:38 by Mike
In .rc file:

500 600 "MY.EXE"
501 600 "MY.DLL"


In .asm file:

pMyExe DD ?
pMyDLL DD?

invoke FindResource,hInstance,500,600
invoke LoadResource,hInstance,eax
invoke LockResource,eax
pMyExe,eax
invoke FindResource,hInstance,501,600
invoke LoadResource,hInstance,eax
invoke LockResource,eax
mov pMyDLL, eax
Posted on 2001-08-30 10:16:00 by n u M I T_o r
Can I insert some .dll or .exe as binary resource into my application and then load dll or start exe directly from application?


For start n u M I T_o r,

I like your web page.

Mike,

n u M I T_o r is dead right and correct, but I can't see any reason to have DLL in a resouce and in regard of an EXE, yes, but you will not be able tu execute it unless you write it into a file, perhaps into a default directory and then you can execute it. And even as a DOS file.

I hope I'm right.:)
Posted on 2001-08-31 06:53:23 by forge
Mike, you can include it as a resource. But unless you want to write
it to a file, then execute it, you have a *heavy* task to do. Basically,
you must code a PE loader. This means allocating space, relocating
the image, loading libraries, fixing up imports. Yes, this can be done.
If you want source, search the net for michael tippach's WDOSX
extender. The source ain't pretty, but it works.
Posted on 2001-08-31 07:24:38 by f0dder
i've made this example, and it works for me
i didint have to rebuild the pe
Posted on 2001-09-24 07:47:43 by NEMO