InheritOpt (USHORT)

      Specifies whether the program started in the new session should inherit the calling program's environment and open file handles.

      The values of this field are described in the following list:

    • SSF_INHERTOPT_SHELL
      Inherit the Shell's environment.

    • SSF_INHERTOPT_PARENT
      Inherit the environment of the program issuing the DosStartSession call.

      The InheritOpt field may be used for independent or related DosStartSession functions. Therefore, a DosStartSession function with the InheritOpt field equal to SSF_INHERTOPT_PARENT is equivalent to DosExecPgm, except that the new program does not inherit the priority of the parent process, or the keyboard and video characteristics associated with the parent session. Also, a parent process/child process relationship is not established.

      Refer to "Parent/Child Relationship" in the Remarks section in DosStartSession for additional information about related sessions.

      The InheritOpt field for a DOS session is different than the InheritOpt field for a non-DOS session. An InheritOpt value of SSF_INHERTOPT_PARENT for a DOS session only inherits the parent's current drive and path. It does not inherit the parent's environment.


    [Back] [Next]