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.