User`s guide
liv Contents
Query Sessions—Function 10
This function returns the number of Host screen sessions that are active, and a string containing
information on each of the Host screen sessions. Host printer sessions are not supported.
Prerequisite Functions
None.
WinHLLAPI(QUERYSESSIONS,lpbyString,lpwLength,lpwReturnnCode)
Parameter Description
Data String String buffer to hold the information string. Must be
defined as 12*(number of active Host sessions) bytes.
Data Length 12*(number of active Host sessions).
Parameter Description
Data String
12-byte fields (one for each active Host 3270 session) with
session information, in the following format:
Byte 1 Short name session ID.
Bytes 2-9 Long name session ID.
Byte 10 Session Type (“H” for Host, “P” for
personal computer).
Bytes 11-12 Size of the presentation space expressed
as a binary number (not ASCII).
Data Length The number of active Host 3270 screen sessions.
Code Description
WHLLOK Call successful.
WHLLPARAMETERERROR Data Length is invalid.
WHLLSYSERROR The function failed due to a system error.
The return value of Data Length is set when the Return Code is 0 or 2. If you receive a Return Code of
2, use Data Length to recalculate the necessary value for the size of Data String (and the value for
Data Length on the call).
Depending on the Session parameter specified the presentation size will vary:
CFGSIZE The size of presentation space configured by the user.
NOCFGSIZE The current size of the presentation space at the time the call is issued.
Function Call
Call Parameters
Return Parameters
Return Codes
Remarks