WIA デバイス コマンドは、WIA サービスによって (イメージング アプリケーションの代わりに) WIA ミニドライバーに送信される要求で、特定のアクションを実行するように指示します。
ミニドライバーに発行できる WIA デバイス コマンドの一覧を次に示します。
| Command | Meaning |
|---|---|
| WIA_CMD_CHANGE_DOCUMENT | 次のドキュメントに変更します (マルチドキュメント スキャナーにのみ発行されます)。 |
| WIA_CMD_DELETE_ALL_ITEMS | ドライバー項目ツリーを削除します。 |
| WIA_CMD_DIAGNOSTIC | Microsoft によって予約されています。 |
| WIA_CMD_SYNCHRONIZE | ドライバー項目ツリーを再構築します。 すべてのミニドライバーは、このコマンドをサポートする必要があります。 |
| WIA_CMD_TAKE_PICTURE | 写真を撮る (カメラにのみ発行)。 |
| WIA_CMD_UNLOAD_DOCUMENT | 現在のドキュメントをアンロードします (マルチドキュメント スキャナーにのみ発行されます)。 |
WIA_CMD_XXXコマンドについては、Microsoft Windows SDK のドキュメントを参照してください。 独自のコマンドのカスタム リストを含めることができます。
デバイス コマンドのサポートを追加する
To properly set up your WIA minidriver to report device commands, report an array of supported commands in the IWiaMiniDrv::drvGetCapabilities method. For an example implementation of the IWiaMiniDrv::drvGetCapabilities method, see Adding Interrupt Event Support.
IWiaMiniDrv::d rvDeviceCommand メソッドを実装する
The WIA service calls the IWiaMiniDrv::drvDeviceCommand method in response to the application's call to the IWiaItem::DeviceCommand method (described in the Microsoft Windows SDK documentation). The IWiaMiniDrv::drvDeviceCommand method should perform the following tasks:
送信されたコマンドがサポートされているコマンドであるかどうかを確認します。
コマンド要求を処理します。
The WIA driver should determine the WIA item that is to receive the device command by using the pWiasContext pointer. WIA ドライバーは、受信した WIA 項目を対象とする受信デバイス コマンドを処理する必要があります。 サポートされていない WIA ドライバーに送信されたコマンドは、E_INVALIDARGエラー コードで失敗する必要があります。
For an example implementation of the IWiaMiniDrv::drvDeviceCommand method, see Informing an Application of Item Tree Changes.