DosSetSession

DosSetSession can set two status fields of a child session; selectable/non-selectable which specifies whether the child session will appear in the task list, and bond/no bond which specifies whether the parent or the child session will come to the foreground when the parent session is selected, this does not affect the parent sessions selections of foreground session.

Syntax
DosSetSession( ulIDSession, psd )

Parameters

 * ULONG ulIDSession (input): The ID of the child session to set the status for.
 * PSTATUSDATA psd (input): Pointer to a STATUSDATA structure.

Returns
0  NO_ERROR 369 ERROR_SMG_INVALID_SESSION_ID 418 ERROR_SMG_INVALID_CALL 455 ERROR_SMG_INVALID_BOND_OPTION 456 ERROR_SMG_INVALID_SELECT_OPT 460 ERROR_SMG_PROCESS_NOT_PARENT 461 ERROR_SMG_INVALID_DATA_LENGTH 463 ERROR_SMG_RETRY_SUB_ALLOC
 * APIRET rc

Usage Explanation
DosSetSession can only be issued on child sessions started with DosStartSession, with Related set to SSF_RELATED_CHILD (=1).

Gotchas
Some bond examples: Parent process A A's child process B B's child process C <-> bond -X- no bond A<->B<->C A is selected => C is in the foreground A-X-B<->C A selects B => C is in the foreground A<->B B is non-selectable. A is selected => B is in the foreground