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.