The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Nordwind64 on December 06, 2005, 08:00:02 PM

Title: Starting exe in dll.
Post by: Nordwind64 on December 06, 2005, 08:00:02 PM
Hi,

is it possible to start an exe-file, that's standing in a dll as binary?

Best regards,
Nordwind64
Title: Re: Starting exe in dll.
Post by: P1 on December 06, 2005, 08:31:25 PM
Yes, but why would you want to do that, and in that mannor?

Regards,  P1  :8)
Title: Re: Starting exe in dll.
Post by: Nordwind64 on December 07, 2005, 05:48:09 AM
Hi,

I want to collect many small command-line-exes to one big dll.
The only way I found ist to write an exe to harddisc and start from there. Is there a better way out?

Best regards,
Nordwind64
Title: Re: Starting exe in dll.
Post by: Vortex on December 07, 2005, 06:00:57 AM
You should stick with your individual command line tools. Why to embed them in a DLL?
Title: Re: Starting exe in dll.
Post by: PBrennick on December 07, 2005, 10:14:53 AM
Nordwind64,
This is just making things difficult for yourself.  You should just embed the commands for the various command-line-exes as procedures in an exe.  You would assign each procedure to a push button and the job is done.  To run a command when a button is pushed, use CreateProcess or similar.

Putting all this stuff into a DLL that needs to be called by another EXE just adds an unnecessary step to what you are trying to do.

You have a good idea, keep it simple.
Paul
Title: Re: Starting exe in dll.
Post by: hutch-- on December 07, 2005, 10:25:34 AM
I think I get the idea, back in the early DOS days there were COM libraries that you could add extra COM files to and with a bit of trickery you could compress the COM file then shove it into the COM lib so you had more than the 64k limit in the file. What I cannot think of is a reasonable way to do it with PE files in a convenient way.

It is possible to put each in an object module and have a master module that selects which to run and just link them all together but its programming to do it rather than a library like the old DOS type.
Title: Re: Starting exe in dll.
Post by: P1 on December 07, 2005, 02:14:09 PM
Quote from: PBrennick on December 07, 2005, 10:14:53 AMYou should just embed the commands for the various command-line-exes as procedures in an exe.  You would assign each procedure to a push button and the job is done.  To run a command when a button is pushed, use CreateProcess or similar. ...
Paul has a good idea for you.  Also you can program command line switches as well for batch file work.

Regards,  P1  :8)
Title: Re: Starting exe in dll.
Post by: Nordwind64 on December 07, 2005, 04:52:31 PM
Hi,

thanks to all!
I think, I will try PBrennick's idea. Seems to be the best solution. :bg

Best regards,
Nordwind64
Title: Re: Starting exe in dll.
Post by: PBrennick on December 07, 2005, 08:33:05 PM
Nordwind64,
If you need help, we will help.  Also, take a look at AppLoad by Ewayne Wagner, http://asmedit.massmind.org/, click on the 'Other Programs' link and it is the last item in the 'Functional Programs And Their Source Code' table.  It is a source of good ideas.

Paul
Title: Re: Starting exe in dll.
Post by: Nordwind64 on December 08, 2005, 05:40:18 AM
Thank you! Looks interesting.
I had opened Ewaynes Site before, looking for the splitter control demo.

Best regards,
Nordwind64
Title: Re: Starting exe in dll.
Post by: PBrennick on December 08, 2005, 12:30:20 PM
Yeah,
He just sits quietly in the background creating gems.

Paul