All WIA minidrivers must define the device's ability to handle notification events and commands. This section describes these minidriver capabilities.
The WIA minidriver is responsible for building a table that lists all of the events and commands that it supports. The following diagram illustrates the capabilities table that the WIA minidriver builds.
The capabilities table is defined as an array of WIA_DEV_CAP_DRV structures. The minidriver must construct this array and return it to the WIA service when the WIA service calls the IWiaMiniDrv::drvGetCapabilities method.
WIA minidrivers must describe the events and commands that the device supports to the WIA service.
An event is an action at the device level that must be reported to the driver. For example, a scanner might have a front panel button that is labeled "Scan". When users press this button, they expect the scanner to begin scanning, or at the very least, that an application will start to initiate the scan.
WIA supports two types of events:
- Action Event
An action event starts the application that is registered to handle such an event. For example, the Microsoft Scanner and Camera Wizard is a registered handler for the Scan event (other applications can register for this event as well). When a driver sends the Scan event, the WIA service starts the Scanner and Camera Wizard to handle this event. This type of event is frequently referred to as a persistent event.
- Notification Event
A notification event is sent only to applications that are already running and have indicated to the WIA service that they should receive this event. If the application is not running, it is not started to handle this event.
An event can be both an action event and a notification event.
A WIA device command is a request that the WIA service sends (on behalf of the imaging application) to the WIA minidriver that instructs the minidriver to perform some action. For example, a WIA camera minidriver might handle the Take Picture command. This command instructs the minidriver to order the digital camera device to take a new picture.