Query Window Coordinates – Function 103
This function requests the window coordinates for a presentation space.
Prerequisite functions
Connect Window Services (function 101)
Function call
WinHLLAPI(QUERYWINDOWCOORDINATES,lpbyString,lpwLength,lpwReturnnCode)
Call parameters
Parameter Description
Data String 17-byte string for returned session information; first byte is a short name session ID of the session to query, or space or null for the current session.
Data Length NA (defaults to 17).
PS Position NA
Return parameters
Parameter Description
Data String Window coordinates - a 17-byte string with the following format:
Byte 1 Short name session ID of the desired Host session, or space or null for the current Host session.
Bytes 2-5 Specifies the x-coordinate of the upper-left corner of the window.
Bytes 6-9 Specifies the y-coordinate of the lower-right corner of the window.
Bytes 10-13 Specifies the x-coordinate of the lower-right corner of the window.
Bytes 14-17 Specifies the y-coordinate of the upper-left corner of the window
Return code
Code Description
WHLLOK The function was successful.
WHLLNOTCONNECTED An invalid presentation space was specified, or was not connected for window services.
WHLLPSENDED The session stopped.
Remarks
The window coordinates are returned in pixels. This function is not supported for 5250 emulation.