Eastman Kodak Company
WIA Custom Properties
16-October-2009
WIA allows for the driver to expose
custom properties to enable advanced functionality. While there is no UI for
Kodak’s WIA driver custom properties, they can be accessed programmatically.
This property is available in versions 2.1 and higher of
wiamini.dll. NOTE: This is the version number of that file and not the driver
itself.
This custom property allows WIA to
use Setting Shortcuts (a collection of settings that allow the user to
set/enable features of the scanner, similar to TWAIN’s Setting Shortcuts). This
property contains a list of the shortcuts that were present when the WIA driver
was started. If no shortcuts were present, then this property is not available.
The shortcuts are the same format as
TWAIN’s (see Creating Setting Shortcuts
below).
The property is defined as follows:
#define KDS_IPS_PROFILE WIA_PRIVATE_ITEMPROP
#define
KDS_IPS_PROFILE_STR L"Profile"
Kind: PRSPEC_PROPID
Property
Type: VT_BSTR
Valid Values: WIA_PROP_LIST
Access Rights: READ/WRITE
This is an item property.
To use this property the application
should read the valid values from it and user those values to set the property.
We suggest displaying the list to the user and allow them to select the
shortcut. Once a new shortcut is selected you must validate this property so
the shortcut settings will be loaded into all the other WIA properties.
NOTE: The
shortcuts may contain settings that are invalid in WIA. In this case, the WIA
driver will override the shortcut setting with the last valid value it had for
a property (e.g. front set to Color and rear set to Grayscale). Since this can
cause unexpected behavior, it is recommended that shortcuts get created with
one image per side and have the same settings for the front and rear.
In order to add shortcut to the WIA
driver they must first be created with that scanner’s Kodak TWAIN driver. You must
use the TWAIN driver for the same model scanner that you want to use the WIA
with. To do this, follow these steps:
1.
Open
the TWAIN driver’s UI (e.g. use SVT)
2.
Create
as many custom Setting Shortcuts as you like and then close the TWAIN
application
3.
The
shortcuts will be contained with the twain directory of the scanner’s model
directory (see Finding the scanner’s
model directory in the readme)
4.
Copy
the entire profiles directory from
the twain directory (e.g. C:\Document
and Settings\All Users\kds_i1200\twain) to the scanner model’s wia directory (e.g. C:\Document and
Settings\All Users\kds_i1200\wia); which will give you a profiles directory within the wia
directory (e.g. C:\Document and Settings\All Users\kds_i1200\wia\profiles)
5.
Power
cycle the scanner so WIA will load the new shortcuts
For 4.x WIA driver:
1.
Open
the TWAIN driver’s UI (e.g. use SVT)
2.
Create
as many custom Setting Shortcuts as you like and then close the TWAIN
application
3.
Power
cycle the scanner so WIA will load the new shortcuts