Start Host Notification – Function 23
This function enables notifying your Windows HLLAPI application of changes in the Host session presentation space or Operation Information Area (OIA).
Prerequisite functions
None.
Function call
WinHLLAPI(STARTHOSTNOTIFICATION,lpbyString,lpwLength,lpwReturnnCode) WinHLLAPIAsync(hWnd,STARTHOSTNOTIFICATION,lpbyString, lpwLength,lpwReturnnCode)
Call parameters
Parameter Description
Data String A 7-byte string in the following format:
Byte 1 Short name session ID of the desired Host session, or space or null for the current Host session.
Byte 2 Notification mode. “P” for presentation space update only, “O” for OIA update only, “B” for both presentation space and OIA updates. When calling WinHLLAPIAsync, this position can be “A”.
Bytes 3-6 Not used; no error occurs if an old Windows HLLAPI application uses these positions.
Byte 7 Reserved or replace with one of the following if using WinHLLAPIAsync and “A” in byte 2: “P” for presentation space update only, “O” for OIA update only, “B” for both presentation space and OIA updates
Data Length Length of Host event buffer (256 recommended).
PS Position NA
Return parameters
Parameter Description
Data String Same as Data String on the call.
Return code
Code Description
WHLLOK Host notification enabled.
WHLLNOTCONNECTED The specified Host session is invalid.
WHLLPARAMETERERROR One or more parameters are invalid.
WHLLSYSERROR The function failed due to a system error.
WHLLCANCEL The asynchronous function was cancelled.
Remarks
Once enabled, Host notification is enabled until you call Stop Host Notification (function 25).
Once you call this function, you can use Pause (function 18) to notify your Windows HLLAPI application when the presentation space and/or OIA of a Host session have been updated. Use Query Host Update (function 24) to determine which parts of the Host session (presentation space, OIA, or both) have been updated.
Asynchronous Mode
When asynchronous mode is enabled by calling WinHLLAPIAsync, the function initiates host notification and immediately returns control to your Windows HLLAPI application. This frees your application to perform other tasks while waiting for host updates. Because asynchronous mode returns control immediately, you must use Windows version 3.x message notification to determine when host updates have occurred. Use the RegisterWindowsMessage( ) function to register the message “WinHLLAPIAsync”. Note the HLLAPI implementation of HostFront Thin Client does not currently support the WinHLLAPIAsync function.