Applies To
OClient
Description
This method returns an OSession object containing the sessions of the client.
Usage
OSessionCollection GetSessions(void) const
Remarks
The session collection contains all the sessions of the client. Because the
client is a workstation-wide object, the collection contains sessions for all the
processes on this workstation, not just those of the current application.
Return Value
An OSessionCollection, which will be open on success, closed on failure.
Example
This example gets a list of the sessions on the workstation.
// construct and open an OSession on the default session
OSession defsess(0);
// get the client object
OClient theclient = defsess.GetClient();
// now get the list of sessions
OSessionCollection sessset = theclient.GetSessions();