Condividi tramite


Event Commands

I comandi in questa sezione vengono usati dal microdriver per il supporto degli eventi del dispositivo.

CMD_GET_INTERRUPT_EVENT

Chiamato da WIA Flatbed Driver in un thread separato per monitorare lo stato degli eventi del pulsante che usano interrupt dal dispositivo (ovvero per i dispositivi USB che segnalano eventi tramite la pipe di interrupt). Se il dispositivo supporta solo il polling, questo comando non deve essere implementato e deve essere restituito E_NOTIMPL.

Due handle di eventi vengono passati 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. Se non è stato premuto alcun pulsante, deve essere impostato su GUID_NULL.

CMD_STI_GETSTATUS

Chiamato da WIA Flatbed Driver per ottenere lo stato online del dispositivo e, se il dispositivo ha pulsanti di pressione, per ottenere lo stato del pulsante.

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. Indica che non sono presenti eventi in sospeso.

Questo comando è necessario se il dispositivo supporta gli eventi di polling o si vuole che il dispositivo visualizzi lo stato della riga.