Description
The WinHLLAPI implementation has a default blocking procedure that
consists of nothing more than a message handler. This default mechanism
is shown in the following example:
BOOL DefaultBlockingHook
{
MSG msg;
if (PeekMessage (&msg, NULL, 0, 0, xfPM_NOREMOVE))
{
if(msg.message = = WM_QUIT)
{
return FALSE;
}
PeekMessage (&msg, NULL, 0, 0, PM_REMOVE);
TranslateMessage (&msg);
DispatchMessage (&msg);
}
return TRUE;
}
The blocking hook is implemented on a per-thread basis. A blocking hook set by this function will stay in effect for the thread until it is replaced by another call to WinHLLAPISetBlockingHook() or until the default is restored by a call to WinHLLAPIUnhookBlockingHook().
The Blocking function must return FALSE if it receives a WM_QUIT message so WinHLLAPI can return control to the application to process the message and terminate gracefully. Otherwise, the function should return TRUE.