You must be familiar with the HLLAPI C language calling sequence to successfully use the information in this section.
All HLLAPI function calls pass four arguments in the following order:
•The subfunction number. This is an integer that specifies the particular HLLAPI function being called. A single entry point is used by all subfunctions.
•A data buffer.
•A length integer that specifies the number of bytes in the data buffer.
•A return code. Sometimes this argument is used for passing or returning other information.
The following variables are used to define the HLLAPI function supplied by the emulator to obtain the window handle of a session window:
WinHandleFunction
WinHandleFunction defines the subfunction number. It must be a non-zero value.
WinHandleDataLength
WinHandleDataLength defines the length of the data buffer in bytes. If you specify a zero value, no data buffer is passed to the function. If the Window handle is going to be returned in the data buffer, then the length must be long enough to accommodate the 4 byte Window handle, plus any offset.
WinHandleData
WinHandleData defines the contents of the data buffer before the function is called. You may only specify WinHandleData if WinHandleDataLength is a non-zero value.
By default, all bytes in the data buffer are set to zero. You must specify WinHandleData if any non-zero bytes need to pass to the function. WinHandleData is assigned a list of one or more byte values, in decimal, separated by commas. Each value must either be an integer between 0 and 255 inclusive, or the letter S, which causes the short session ID of the current session to be placed in the corresponding byte of the buffer. If WinHandleData specifies fewer byte values than there are in the data buffer, the remaining bytes in the buffer are set to zero. If the WinHandleData specifies more data than the data buffer length, then the excess data is truncated.
WinHandleOffset
WinHandleOffset defines where the HLLAPI function returns the window handle value when it returns from the call. You can assign an integer value or one of the letters L or R to WinHandleOffset. If an integer value is specified, the window handle is copied from the data buffer at 0-based byte offset given by that value. If the letter L is specified, the window handle is copied from the third (length) argument. If the letter R is specified, the window handle is copied from the last (normally the return code) argument. If the WinHandleOffset is not specified, the default value of "L" is used, meaning the Window handle is returned in the Data Length argument.