BIDI_WAIT_ALERT(8016h) waits for an alert. The port driver must be able to store the PRTPORT.ulMaxHeldResponses number of responses, to give the spooler time to ask for each printer-generated message. If an alert does not change the currently known state of the printer, the spooler may disregard the alert.
The spooler has a single thread dedicated to calling each port driver with BIDI_WAIT_ALERT. No other application can use the BIDI_WAIT_ALERT command.
If a protocol converter is used, the port driver will process the request by calling SplProtXlateCmd with all data returned by the printer. If the protocol converter indicates by its return that the data was an alert, the port driver returns this information to the caller of SplPdQuery (the spooler).
When an alert condition is cleared, an alert should be returned, with the current status of the printer (that is, PRTALERT_TYPE_ONLINE or PRTALERT_TYPE_OFFLINE), to the caller of BIDI_WAIT_ALERT.