Table of contents
Collapse the table of content
Expand the table of content

WIA Driver Command Support

Last Updated: 8/19/2016

A WIA device command is a request sent by the WIA service (on behalf of the imaging application) to the WIA minidriver, instructing it to perform a particular action.

The following is a list of WIA device commands that can be issued to a minidriver:



Change to the next document (issued to multidocument scanners only).


Delete the driver item tree.


Reserved by Microsoft.


Rebuild the driver item tree. All minidrivers must support this command.


Take a picture (issued to cameras only).


Unload the current document (issued to multidocument scanners only).

The WIA_CMD_XXX commands are described in the Microsoft Windows SDK documentation. You can include your own custom list of commands.

Adding Device Command Support

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.

Implementing the IWiaMiniDrv::drvDeviceCommand Method

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:

  1. Determine whether the command sent is a supported command.

  2. Process the command request.

The WIA driver should determine the WIA item that is to receive the device command by using the pWiasContext pointer. The WIA driver should then process the received device command targeted to the incoming WIA item. Any command sent to the WIA driver that is not supported should be failed with an E_INVALIDARG error code.

For an example implementation of the IWiaMiniDrv::drvDeviceCommand method, see Informing an Application of Item Tree Changes.

Send comments about this topic to Microsoft

© 2017 Microsoft