Start Close Intercept (41)

Top  Previous  Next

This function intercepts user requests to close Personal Communications.

 

Prerequisite Functions

 

There are no prerequisite functions for this function.

 

 

Syntax

 

WinHLLAPIAsync (hWnd, lpwFunction, lpbyString, lpwLength, lpwReturnCode)

 

 

Call Parameters

 

Parameter

Description

Data String

A 5-byte string for returned semaphore address. The first byte is the session short name 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  Session short name, 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.

WHLLSYSERROR

The function failed due to a system error.

WHLLCANCEL

The asynchronous function was cancelled.

 

 

Remarks

 

Once enabled, Host notification remains enabled until you call Stop Close Intercept (43) or WinHLLAPICancelAsyncRequest(). Initially, the semaphore is set. After using this function, close requests from the user are discarded and the semaphore is cleared.

 

The function initiates close intercept and immediately returns control to your Windows HLLAPI application. This frees your application to perform other tasks while waiting for close requests. When a close request occurs, the function will notify the window specified by hWnd with the registered message WinHLLAPIAsync.