dos12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
DosSetSession (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_DOSSESMGR
 
USHORT DosSetSession(idSession, pstsdata)
USHORT idSession;        /* session identifier                         */
PSTATUSDATA pstsdata;    /* prior to structure for session-status data */
 
The DosSetSession function sets the status of a child session.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
idSession  Specifies the identifier of the session for which the status is
           set. This identifier must have been created previously by using
           the DosStartSession function.
 
pstsdata   Points to a STATUSDATA structure that contains the session-status
           data.
 
Return Value
 
The return value is zero if the function is successful. Otherwise, it is an
error value.
 
Comments
 
The DosSetSession function allows a parent session to use the SelectInd and
BondInd fields of the STATUSDATA structure to specify whether the child
session can be selected by the user and whether or not the child session
will be brought to the foreground when the user selects the parent session.
These fields affect selections made by the user from the switch list; they
do not affect selections made by the parent session. Each of these fields
can be set individually, without affecting the current setting of the
other.
 
A parent session can call the DosSetSession function only for a child
session; neither the parent session itself nor any second-level child
session can be set by using this function. The DosSetSession function can
change the status of a child session only if that child was started as a
related session; DosSetSession cannot change the status of sessions that
were started as independent sessions.
 
A bond between a parent session and a child session can be broken by calling
the DosSetSession function and specifying either BondInd = 2 to break the
bond, or BondInd = 1 to break the bond and establish a new bond with a
different child session.
 
A child session that is bound to a parent session will be brought to the
foreground when the user selects the parent session, even if the status of
the child session is nonselectable. If there is a bond between a parent
session and a child session, and another bond between that child and a
second-level child session, the second-level child session will be brought
to the foreground when the user selects the parent session.
 
A parent session may be running in either the foreground or the background
when DosSetSession is called.
 
The DosSetSession function may be called only by the process that started
the session identified by the idSession parameter.
 
See Also
 
DosSelectSession, DosStartSession, DosStopSession, STATUSDATA