Compartir a través de


Event Commands

El microdriver usa los comandos de esta sección para la compatibilidad con eventos de dispositivo.

CMD_GET_INTERRUPT_EVENT

Llamado por el controlador wia plano en un subproceso independiente para supervisar el estado de los eventos de botón que usan interrupciones del dispositivo (es decir, para los dispositivos USB que notifican eventos a través de la canalización de interrupción). Si el dispositivo solo admite sondeos, no es necesario implementar este comando y se debe devolver E_NOTIMPL.

Se pasan dos identificadores de eventos al microdriver. The lVal member of the VAL structure holds an event handle that should be signaled by the microdriver using the SetEvent function when a button event occurs. The handle member of the VAL structure holds an event handle that will be signaled by the WIA Flatbed Driver when the driver is being unloaded or shut down.

The pGuid member of the VAL structure should be set to point to the GUID of the button that was pushed. Si no se presiona ningún botón, se debe establecer en GUID_NULL.

CMD_STI_GETSTATUS

Llamado por el controlador wia plano para obtener el estado en línea del dispositivo y si el dispositivo tiene botones de inserción, para obtener el estado del botón.

Set the lVal member of the passed VAL structure to 1 if your device is online, and functioning properly. If lVal is set to any value other than 1, the device is considered offline, and it will fail the device test in Control Panel.

If the device supports buttons that do not use interrupts from the device and a button was pressed, the pGuid member of the passed VAL structure should be set to the GUID of the button event. If no buttons were pressed, point pGuid to the value GUID_NULL. Esto indica que no hay ningún evento pendiente.

Este comando es necesario si el dispositivo admite eventos sondados o desea que el dispositivo muestre el estado en línea.