Bewerken

Delen via


Reading WIA Item Properties by a Driver

A WIA minidriver should always use the properties in its own driver item tree as a basis for the current settings. Because the application is reading from and writing to the minidriver's item tree, it will never be out of date. A WIA minidriver should use the following WIA service functions to read from the properties in its driver item tree.

wiasReadMultiple
Read all WIA property types. This is a general function that allows a WIA driver to read any property existing on a WIA item, including custom properties. It can be used to read multiple properties per call.

wiasReadPropStr
Read WIA properties that are strings (type VT_BSTR).

wiasReadPropLong
Read WIA properties that are four-byte integers (type VT_I4).

wiasReadPropFloat
Read WIA properties that are four-byte real numbers (type VT_R4).

wiasReadPropGuid
Read WIA properties that are GUIDs (type VT_CLSID).

wiasReadPropBin
Read WIA properties that are strings of unsigned bytes (type VT_VECTOR | VT_UI1).

A WIA item property contains attributes that define the type of container and access rights. (For further information, see Adding WIA Properties to a WIA Item.) The container types are WIA_PROP_NONE, WIA_PROP_LIST, and WIA_PROP_RANGE. The access rights are WIA_PROP_READ and WIA_PROP_RW. During validation of an existing property, a WIA minidriver should check the internal update setting to determine if it should read the valid values. A WIA minidriver should use the wiasGetPropertyAttributes service function to read the current valid values for its WIA properties.