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.
Thanks to everybody who answer me.
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
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
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.:)
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.
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.
i've made this example, and it works for me
i didint have to rebuild the pe
i didint have to rebuild the pe