Supported HLLAPI Functions
The following HLLAPI functions are supported. Â A brief description of the purpose and result of the function follows each entry. Note that almost all of these functions can only be issued if connected to a host. Â For important additional information please see the winhlapi.hlp file included in the samples directory.
# | NAME | Description |
1 | ConnectPresentationSpace | Establishes a connection between a presentation space in a host session connection and your windows HLLAPI application |
2 | DisconnectPresentationSpace | Disconnects a host session presentation space from a WinHLLAPI application |
3 | SendKey | Send from 1 to 255 keystrokes to the connected host session, and makes the keystrokes appear to be entered from the keyboard by a user on the host |
4 | Wait | Senses if the host is in a wait state, and if it is, waits the period of time specified in function 9 |
5 | CopyPresentationSpace | Copy the contents of the current host session’s presentation space into a string buffer |
6 | SearchPresentationSpace | Search the current session host presentation space for a specific string. It returns a true (found) or false (not found). |
7 | QueryCursorLocation | Determine the location of the cursor in the host presentation space. |
8 | CopyPresentationSpaceToString | Copy all or part of the host presentation space to a string |
9 | SessionSetParameters | Set the options of the host session, and anything not set here uses the defaults. Options set here can only be cancelled by function 9 being re-issued or function 21 (reset system) is called. |
10 | QuerySessions | Returns the number of host sessions that are active, and returns a string value from each connection. Host printer sessions are not supported. |
11 | Reserve | Lock the user out and prevents keyboard input by reserving the current host session presentation space. |
12 | Release | Undoes the lockout imposed by the Reserve function, and allows keyboard input into the host session presentation space |
13 | CopyOIA | Returns the contents of the host session Operator Information Area (OIA) |
14 | QueryFieldAttribute | Returns the attribute byte of the field contained in the specified position in the host session presentation space |
15 | CopyStringToPresentationSpace | Copy an ASCII string from the PC to a specified position in the host session presentation space |
18 | Pause | Causes your application to wait for a specified time |
20 | QuerySystem | Determines the version of WHLLAPI under which your application is running |
21 | ResetSystem | Reset WHLLAPI to its default start state. All session options are reset to their defaults. Event notification is stopped. Any reserved sessions are released. Connected sessions are disconnected. The current status of host sessions is updated |
22 | QuerySessionStatus | Returns the status of a specified session |
23 | StartHostNotification | Initiates monitoring that notifies your application of changes in the host session presentation space or the Operator Information Area (OIA). |
24 | QueryHostUpdate | Follows up on function 23 and determines if the host session presentation space or OIA have changed since function 23 was issued, or this was issued |
25 | StopHostNotification | Cancels functions 23 and 24, and stops the notification of changes in the presentation space and the OIA |
30 | SearchField | Search a field in the host session presentation space for a specified string. This can be in either a protected or unprotected field, but only in a field-formatted presentation space |
31 | FindFieldPosition | Determine the starting position of a field in the host session presentation space |
32 | FindFieldLength | Determine the length of a field in the host session presentation space |
33 | CopyStringToField | Copy a string into a specified field in the host session presentation space |
34 | CopyFieldToString | Copy the contents of a specified field in the host session presentation space to a string |
40 | SetCursorPosition | Place the cursor at a specified location in the host session presentation space |
41 | StartCloseIntercept | Allows the application to intercept and prevent user requests to close the emulation program |
42 | QueryCloseIntercept | Determines if user is attempting to close the emulator application |
43 | StopCloseIntercept | Stops the interception and prevents users from issuing requests to close the emulation program |
50 | Start Keystroke Intercept | Enables your application to intercept keystrokes sent to a session by a user. Once called, the keystrokes can be received with the get key (function 51) and sent to the same session or another session with the send key (function 3). The keystrokes can be accepted or rejected by Post Intercept Status (function 52). They can be replaced with the send key, or used in a specific manner that suits your application |
51 | GetKey | Allows your application to receive the keystrokes that were intercepted by function 50, and to process them |
52 | PostInterceptStatus | Notifies WinHLLAPI that a keystroke obtained with the Get Key function 51 is either accepted or rejected. If rejected a beep sounds |
53 | StopKeystrokeIntercept | Disable the ability of your application to intercept keystrokes |
90 | SendFile | Transfers a file from the PC running the WinHLLAPI application to the host |
91 | ReceiveFile | Transfers a file from the host to the PC running the WinHLLAPI application |
99 | ConvertPosition/RowCol | Converts a host session presentation space into row and column values for the PC display, or it converts PC display’s row and column values into a host session presentation space position |
101 | ConnectWindowServices | Allows your application to manage the host session presentation space window. Only one application at a time can be connected to perform This, but more than one host session presentation space window can be managed concurrently |
102 | DisconnectWindowServices | Stops the functionality initiated by function 101, in that the application cannot use window services to manage a host session presentation space window |
103 | QueryWindowCoordinates | Requests the window co-ordinates for a host session presentation space |
104 | WindowStatus | Allows the application to query or change a host session presentation space window’s size, location, or visible state |
105 | ChangePSWindowName | Allows the application to specify a new name for the host session presentation space window, or reset the name to its default |
Extensions for the Windows Environment
WinHLLAPICleanup | The application calls the WinHLLAPICleanup() function to deregister a WinHLLAPI application from a WinHLLAPI implementation. This could be used, for example, to free up resources allocated to a specific application |
WinHLLAPIStartup | This allows an application to specify the version of WinHLLAPI required, and to retrieve details of a specific WinHLLAPI implementation. This MUST be called by a WinHLLAPI application before it registers itself with the specific WinHLLAPI implementation that it queries |
WinHLLAPIAsync | This function provides an asynchronous flavor to the following HLLAPI functions: STARTKSINTERCEPT, WAIT, STARTHOSTNOTIFICATION, STARTCLOSEINTERCEPT, SENDFILE, and RECEIVEFILE. You should use WinHLLAPIAsync( ) instead of the blocking versions of these functions |
WinHLLAPICancelAsyncRequest | This function cancels an outstanding WinHLLAPIAsync( )-based request |
WinHLLAPIIsBlocking | This function allows a task to determine if it is executing while waiting for a previous blocking call to complete |
WinHLLAPICancelBlockingCall | This function cancels any outstanding blocking operation for its thread. Any outstanding blocked call canceled will cause an error code of WHLLCANCEL to be generated. Examples of blocking calls are WinHLLAPI with function number set to GETKEY, WAIT, PAUSE, SENDFILE or RECEIVEFILE. You should use WinHLLAPIAsync( ) instead of the blocking versions of these functions |
WinHLLAPISetBlockingHook | This function installs a new function which a Windows HLLAPI Implementation should use to implement blocking HLLAPI function calls |
WinHLLAPIUnhookBlockingHook | This function removes any previous blocking hook that has been installed and reinstalls the default blocking mechanism |