Partager via


Event Commands

Les commandes de cette section sont utilisées par le microdriver pour la prise en charge des événements d’appareil.

CMD_GET_INTERRUPT_EVENT

Appelé par le pilote à plat WIA dans un thread distinct pour surveiller l’état des événements de bouton qui utilisent des interruptions de l’appareil (autrement dit, pour les périphériques USB qui signalent des événements via le canal d’interruption). Si votre appareil prend uniquement en charge l’interrogation, cette commande n’a pas besoin d’être implémentée et E_NOTIMPL doit être retournée.

Deux handles d’événements sont passés au 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 aucun bouton n’a été enfoncé, il doit être défini sur GUID_NULL.

CMD_STI_GETSTATUS

Appelé par le pilote à plat WIA pour obtenir l’état en ligne de l’appareil et si l’appareil a des boutons push, pour obtenir l’état du bouton.

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. Cela signale qu’aucun événement n’est en attente.

Cette commande est requise si l’appareil prend en charge les événements interrogés ou si vous souhaitez que l’appareil affiche l’état en ligne.