Article View: comp.lang.pascal.delphi.misc
Article #377Re: Execute a part of program !!!
From: Klaus J. Koch
Date: Mon, 24 May 1999 00:00
Date: Mon, 24 May 1999 00:00
66 lines
2696 bytes
2696 bytes
Hi Eric.
I can not imagine
1) what it might be good for,
2) how you come to the idea that this could work.
Did you ever hear about a "program loader"? That is e.g. command.com
It not only copies the file that is to be executed into memory
but also analyses its header and adjusts lots of addresses inside the
loaded file before it starts the execution of this program.
A program does have only one header. The header of the second part
will not be recognized as a header, and so the adjustment of the
addresses will not take place.
If it is so important that the two parts are within one file,
why not write a procedure X and a procedure Y and call them
one after the other.
Or is the reason that you don't have the source?
No problem: Make a small file containing:
WinExec('X.EXE',0);
{ wait for termination if you want }
WinExec('Y.EXE',0);
Klaus
> Hello,
>
>
> Is it possible to execute a part of the whole program ???
>
> Such as that, I have a program A.EXE = X.EXE + Y.EXE
>
> ----------
> | A.EXE |
> |--------- 1234 bytes.
> | B.EXE |
> ----------
>
> From the above figure, We can know that the size of A.EXE is 1233 bytes.
>
> And start from 1234 bytes to the end is the part of B.EXE.
>
> My question is that, is it possible to RUN the B.EXE part after running
> the A.EXE part ??
> How implement this is Delphi ????
>
>
> Best regards,
> Eric
>
>
> --
> _ _
> / ) |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ( \
> / / | | \ \
> _( /_ | _ Chow Hoi Ka, Eric _ | _) )_
> (((\ \> |/ ) ( \| </ /)))
> (\\\\ \_/ / E-Mail : d951686@sftw.umac.mo \ \_/ ////)
> \ / \ /
> \ _/ http://www.sftw.umac.mo/~d951686/ \_ /
> / / |____________________________________________| \ \
> / / \ \
Technical Details
Message-ID:
<7HSkL-GJuzB@ocker.lahn.de>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<374955C5.98A532EA@sftw.umac.mo>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10baee,a6b0fa69bfe26869 X-Google-Attributes: gid10baee,public X-Google-Thread: 1043cf,a6b0fa69bfe26869 X-Google-Attributes: gid1043cf,public X-Google-Thread: 14df26,a6b0fa69bfe26869 X-Google-Attributes: gid14df26,public From: k.koch@ocker.lahn.de (Klaus J. Koch) Subject: Re: Execute a part of program !!! Date: 1999/05/24 Message-ID: <7HSkL-GJuzB@ocker.lahn.de> X-Deja-AN: 482144999 References: <374955C5.98A532EA@sftw.umac.mo> Newsgroups: comp.lang.pascal.delphi.misc,alt.comp.lang.borland-edlphi,borland.public.delphi.objectpascal