次の方法で共有


Event Commands

このセクションのコマンドは、デバイス イベントのサポートのためにマイクロドライバーによって使用されます。

CMD_GET_INTERRUPT_EVENT

デバイスからの割り込みを使用するボタン イベントの状態を監視するために、別のスレッドで WIA フラットベッド ドライバーによって呼び出されます (つまり、割り込みパイプを介してイベントを報告する USB デバイスの場合)。 デバイスがポーリングのみをサポートしている場合は、このコマンドを実装する必要はありません。E_NOTIMPLを返す必要があります。

2 つのイベント ハンドルがマイクロドライバーに渡されます。 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. これは、保留中のイベントがないことを示します。

このコマンドは、デバイスがポーリングされたイベントをサポートしている場合、またはデバイスにオンライン状態を表示する場合に必要です。