Start Close Intercept – Function 41
This function allows the application to intercept user requests to close the emulation program.
Prerequisite functions
None.
Function call
WinHLLAPI(STARTCLOSEINTERCEPT,lpbyString,lpwLength,lpwReturnnCode)
WinHLLAPIAsync(hWnd,STARTCLOSEINTERCEPT,lpbyString, lpwLength,lpwReturnnCode)
Call parameters
Parameter Description
Data String A 5-byte string for returned semaphore address. The first byte is a short name session ID of the session to query, or space or null for the current session.
Data Length Must be specified.
PS Position NA
Return parameters
Parameter Description
Data String A 5-byte string with the following format:
Byte 1 Short name session ID, or space or null for the current session.
Bytes 2-5 Semaphore address.
Return code
Code Description
WHLLOK The function was successful.
WHLLNOTCONNECTED An invalid presentation space was specified.
WHLLPARAMETERERROR An invalid option was specified.
WHLLNOTSUPPORTED The function was not supported by the emulation program.
WHLLCANCEL The asynchronous function was cancelled.
Remarks
Initially, the semaphore is set. After using this function, close requests from the user are discarded and the semaphore is cleared. Your application program can use the Query Close Intercept function to determine when a close request has occurred. This function is not supported for 5250 emulation.