WIA Minidriver

Applications see Windows Image Acquisition (WIA) devices as a hierarchical tree of IWiaItem or IWiaItem2 objects with the root item representing the device itself. WIA devices may be used concurrently by more than one application. It is therefore necessary that each application's view of an IWiaItem or IWiaItem2 object be independent of another application's views. This is accomplished by having two different item objects. The driver creates the driver item tree of IWiaDrvItem Interface objects, also called driver items, using the WIA driver services methods. These are global objects that the driver uses to represent each driver's internal items. When an application creates an IWiaItem or IWiaItem2 object (also called an application item), this object is linked to the driver's corresponding IWiaDrvItem Interface in the driver item tree. A reference count is maintained on the IWiaDrvItem Interface object subject to the following rules:

Using this reference counting scheme, many IWiaItem or IWiaItem2 objects may link to one IWiaDrvItem Interface without interference. Because each IWiaItem or IWiaItem2 contains its own property storage, an application can continue to read item properties even after an item has been deleted, but no operation that requires access to the device will succeed. Because item properties are stored in the IWiaItem or IWiaItem2 object, the driver must set the IWiaItem or IWiaItem2 object's properties to the device before a data transfer.