pObjname (PCHAR) - output
cbObjname (LONG) - input
execFlag (ULONG) - input
The values of this field are shown in the following list:
A program executed with this option runs in the background, and should not require any input from the keyboard or output to the screen other than VioPopups. It should not issue any console I/O calls (VIO, KBD, or MOU functions).
Some memory is consumed for uncollected result codes. Issue DosWaitChild to release this memory. If result codes are not collected, then EXEC_SYNC or EXEC_ASYNC should be used for execFlag.
pArg (PSZ) - input
These strings represent command parameters, which are copied to the environment segment of the new process.
The convention used by CMD.EXE is that the first of these strings is the program name (as entered from the command prompt or found in a batch file), and the second string consists of the parameters for the program. The second ASCIIZ string is followed by an additional byte of zeros. A value of zero for the address of pArg means that no arguments are to be passed to the program.
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.
pRes (PRESULTCODES) - output
This structure also is used by a DosWaitChild request, which waits for an asynchronous child process to end.
pName (PSZ) - input
When the environment is passed to the target program, this name is copied into "po" in the environment description shown above.
If the string appears to be a fully qualified file specification (that is, it contains a ":" or a "\" in the second position), then the file name must include the extension, and the program is loaded from the indicated drive:directory.
If the string is not a fully qualified path, the current directory is searched. If the file name is not found in the current directory, each drive:directory specification in the PATH defined in the current-process environment is searched for this file. Note that any extension (.XXX) is acceptable for the executable file being loaded.
ulrc (APIRET) - returns
DosExecPgm returns one of the following values: