action (ULONG) - input

      An indicator that specifies which process the current thread is waiting to terminate.

      The values of this field are as follows:

    • DCWA_PROCESS
      The child process indicated by pid.

    • DCWA_PROCESSTREE
      The child process indicated by pid and all of its child processes.

    option (ULONG) - input

      An indicator that specifies whether to return if no child process ends.

      The values of this field are as follows:

    • DCWW_WAIT Wait if no child process ends or until no child processes are outstanding.

    • DCWW_NOWAIT
      Do not wait for child processes to end.

    pres (PRESULTCODES) - output

      Address of the structure that contains the termination code and the result code indicating the reason for the child's termination.

      If no process furnishes a result code, the system provides the value -1.

    ppid (PPID) - output

      Address of the process identifier of the ending process.

    pid (PID) - input

      Identifier of the process whose termination is being waited for.

      The values of this field are as follows:

    • Any child process. The current thread waits until any child process that was executed with a return code ends, or until there are no more child processes of any type to wait for.

      <>0

        The indicated child process and all its descendants.

      ulrc (APIRET) - returns

        Return Code.

        DosWaitChild returns one of the following values:

      • NO_ERROR 13
          ERROR_INVALID_DATA
        87
          ERROR_INVALID_PARAMETER
        128
          ERROR_WAIT_NO_CHILDREN
        129
          ERROR_CHILD_NOT_COMPLETE
        184
          ERROR_NO_CHILD_PROCESS
        303
          ERROR_INVALID_PROCID
        For a full list of error codes, see Errors.


      [Back] [Next]