include shell.inc
VxDcall SHELL_HookSystemBroadcast, <<OFFSET32 pfnHandler>, \
dwRef, dwCallOrder>
mov [Handle], eax ; handle of broadcast callback procedure
Installs a callback procedure into the broadcast notification chain. The chain monitors calls to the _SHELL_BroadcastSystemMessage service and to the Windows BroadcastSystemMessage function. Uses C calling conventions.
The system calls the callback procedure whenever a VxD calls the _SHELL_BroadcastSystemMessage service. The system calls the procedure using the C calling conventions as follows:
VxDcall [pfnHandler], <uMsg, wParam, lParam, dwRef>
The uMsg parameter is the message number and wParam is the 16-bit message parameter. For both uMsg and wParam, the low 16 bits contain the parameter value and the high 16 bits are reserved. The lParam parameter is the 32-bit message parameter and dwRef is the same reference data value passed to _SHELL_HookSystemBroadcast.
The return value from the callback procedure is ignored if the broadcast is not a BSF_QUERY. Otherwise, the procedure should return a nonzero value to allow the broadcast to continue, or zero to fail the message and halt the broadcast. The procedure should return 1 for any messages it does not understand.
If the callback procedure is installed while a broadcast in progress, it is unspecified whether the hook will receive that broadcast. It will, regardless, receive all subsequent broadcasts.