Search Presentation Space – Function 6
This function allows you to search the Host session presentation space for a specified string.
Prerequisite functions
Connect Presentation Space (function 1)
Function call
WinHLLAPI(SEARCHPS,lpbyString,lpwLength,lpwReturnnCode)
Call parameters
Parameter Description
Data String String to search for.
Data Length Length of the search string. NA if session option EOT is specified.
PS Position Position in the Host session presentation space. If session options SRCHFROM and SRCHFRWD are set, indicates position to search from. If session options SRCHFROM and SRCHBKWD are set, indicates position to search to. NA if session option SRCHALL is set.
Return parameters
Parameter Description
Data Length If equal to zero, indicates the string was not found. If greater than zero, indicates the Host session presentation space position where the string was found.
Return code
Code Description
WHLLOK The completed successfully. You must check the Data Length parameter to determine if the string was found.
WHLLNOTCONNECTED Your Windows HLLAPI application is currently not connected to a session.
WHLLPARAMETERERROR Invalid parameters were specified.
WHLLPOSITIONERROR PS Position value is invalid.
WHLLINHIBITED Connect request successful, but the specified session is locked (input inhibited).
WHLLSYSERROR The function failed due to a system error.
WHLLNOFIELD The string was not found.
Remarks
“Position” in the Host session presentation space is determined by starting in the upper left corner of the screen display (row 1, column 1). At the end of each screen display row, the next Host session presentation space position is column 1 of the following screen display row. This process continues until the end of the Host session presentation space (screen display) is reached.