Return Parameters

This function returns a data string, a length, and a return code.
Data String:
The returned data string is 16n bytes long (12n for standard interface), where n is the number of host sessions. The descriptors are concatenated into the data string and each session type, and presentation space size of a host session.

The format of each 16-byte (12-byte for standard interface) session descriptor is as follows:

Byte Definition
Standard Enhanced  
1 1 A 1-character presentation space short name (PSID)
2–4 Reserved
2–9 5–12 Session long name (same as profile name; or, if profile not set, same as short name)
10 13 Connection type H=host
14 Reserved
11–12 15–16 Host presentation space size (this is a binary number and is not in display format). If the session type is a print session, the value is 0.
The number of host sessions started.
Return Code:
The following codes are defined:
Return Code Explanation
0 The Query Sessions function was successful.
2 An incorrect string length was made.
9 A system error was encountered.