Mail Archives: djgpp/1998/12/13/10:02:23
On Sun, 13 Dec 1998, Simone Zanella wrote:
> I need to find the command line with which a program is spawned; with
> typical Dos executables, it is located from offset 0x80 of the PSP; but if
> a DJGPP compiled executable spawns another DJGPP executable, at this
> address there's a "!proxy" string followed by 3 four digits hex numbers.
> How can I use them to find the command line?
The command line is in the argv[] variable, as usual in C. The DJGPP
startup code already does all the work for you: it finds the command line
and puts it into the argv[] array. Isn't that what you want? If not,
please explain why.
It is not clear from your message why did you need to look in the PSP at
all, even in the simple case of a program invoked from a DOS prompt.
argv[] holds the command line in that case as well.
- Raw text -