本節中的命令是由微驅動程式用於裝置事件支援。
CMD_GET_INTERRUPT_EVENT
由 WIA 平板驅動程式在個別執行程中呼叫,以監視使用裝置中斷的按鈕事件狀態 (,也就是透過中斷管道報告事件的 USB 裝置) 。 如果您的裝置只支援輪詢,則不需要實作此指令,應該傳回E_NOTIMPL。
兩個事件控制碼會傳遞至微驅動程式。 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. 如果未按下任何按鈕,則應將其設定為GUID_NULL。
CMD_STI_GETSTATUS
由 WIA 平板驅動程式呼叫,以取得裝置的線上狀態,如果裝置有按鈕,則取得按鈕狀態。
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. 這表示沒有待處理的事件。
如果裝置支援輪詢事件,或您希望裝置顯示線上狀態,則需要此命令。