Convert Position / RowCol – Function 99
This function converts a Host session presentation space position into row and column values for the PC display or converts PC display row and column values into a Host session presentation space position.
Prerequisite functions
None.
Function call
WinHLLAPI(CONVERT,lpbyString,lpwLength,lpwReturnnCode)
Call parameters
Parameter Description
Data String A 2-byte string. The first byte is the short name session ID of the Host session presentation space to convert. The second byte is “P” to convert a position to row and column, “R” to convert row and column to a position.
Data Length NA when byte 2 of Data String is “P,” row number when byte 2 of Data String is “R.”
PS Position Host session presentation space position value when byte 2 of Data String is “P,” column number when byte 2 of Data String is “R.”
Return parameter
Parameter Description
Data String When byte 2 of Data String on the call is “P,” this value is the row number. When byte 2 of Data String on the call is “R,” a zero indicates an invalid row number on the call.
Return code
Code Description
WHLLOK Invalid column number on the call.
>0 When byte 2 of Data String on the call is “P,” this value is the column number. When byte 2 of Data String on the call is “R,” this value is the Host session presentation space position.
WHLLINVALIDPSID The function failed due to an invalid short name session ID or a system error.
WHLLNOTAVAILABLE Intercept (function 50) was not called prior to this function call.
WHLLINVALIDRC Byte 2 in Data String on the call is invalid (neither “P” nor “R”).
Remarks
If you need to determine the number of rows and columns that a Host session presentation space supports, use Query Session Status (function 22).