pEnv (PSZ) - input
These strings represent environment variables and their current values. An environment string has the following form:
variable=valueThe last ASCIIZ environment string must be followed by an additional byte of zeros.
A value of 0 for the address of pEnv results in the new process' inheriting the environment of its parent process.
When the new process is given control, it receives:
eo: ASCIIZ string 1 ; environment string 1 ASCIIZ string 2 ; environment string 2 . . . ASCIIZ string n ; environment string n Byte of 0 . . . po: ASCIIZ ; string of file name ; of program to run. . . . ao: ASCIIZ ; argument string 1 ; (name of program being started ; for the case of CMD.EXE) ASCIIZ ; argument string 2 ; (program parameters following ; program name for the case of ; CMD.EXE) Byte of 0The beginning of the environment segment is "eo", and "ao" is the offset of the first argument string in that segment. The offset to the command line, "ao", is passed to the program on the stack at SS:[ESP+16].
The environment strings typically have the form: parameter = value
A value of zero for pEnv causes the newly created process to inherit the parent's environment unchanged.