INF files for still image devices

The default class installer for still image devices, sti_ci.dll, recognizes a special set of INF file entries. Within an INF file, these entries must be placed within a device's INF DDInstall Section. The entries are described in the following table.

INF file entry Value Comments
SubClass StillImage Required
DeviceType 1 for scanners, 2 for cameras, 3 for video devices Required
DeviceSubType Vendor-defined value Optional
Connection For non-PnP devices connected to serial or parallel ports, this can be Serial or Parallel to limit the user's choice of ports during installation. Optional.
If not specified, the user can select any serial or parallel port.
Capabilities Specifies a number that is converted to bit flags identifying device capabilities. These flags are stored in the registry and are available to Microsoft STI components with the STI_DEV_CAPS structure.

Bit 0 − Sets/clears STI_GENCAP_NOTIFICATIONS in STI_DEV_CAPS
Bit 1 − Sets/clears STI_GENCAP_POLLING_NEEDED in STI_DEV_CAPS
Bit 2 − Sets/clears STI_GENCAP_GENERATE_ARRIVALEVENT in STI_DEV_CAPS
Bit 3 − Sets/clears STI_GENCAP_AUTO_PORTSELECT in STI_DEV_CAPS
Optional
PropertyPages Identifies the name and entry point of a DLL that creates customized Property Sheet Pages for Still Image Devices.
The following example identifies the DLL, estp2cpl.dll, and the EnumStiPropPages entry point in this DLL. The entry point name is optional; if omitted, the entry point defaults to EnumStiPropPages.

PropertyPages = estp2cpl.dll, EnumStiPropPages

Optional
DeviceData Identifies a vendor-supplied data section containing information to be stored in the registry, under the DeviceData key. For TWAIN-supported devices, the data section must contain a TwainDS entry. For more information, see Vendor-Modifiable Registry Values Optional.
However, this entry is required for Creating Push-Model Aware Applications.
Events Identifies a vendor-supplied data section listing still image device events. Each entry in this section must have the following format:

EventName="String",{GUID},App

EventName is the event's internal name, String is the event's display string, GUID is the event's GUID, see Still Image Device Events, and App specifies the imaging application to be launched when the event occurs. To launch the currently registered application, use an asterisk (*) for App.
Optional.
However, this entry is required for Creating Push-Model Aware Applications.
UninstallSection Points to an INF section typically containing INF DelFiles directives and INF DelReg directives. An entry in this section has the following format:

UninstallSection=UninstallSectionName

UninstallSectionName is the name of the section containing Delfiles or DelReg directives. Windows File Protection might prohibit a user from deleting some files, even though they're specified using DelFiles directives.
Optional.
This entry is valid only for Windows 2000.

The default class installer for still image devices supports the standard INF CopyFiles directive. The installer uses an internal reference counter for component files, so files shared by several devices aren't removed prematurely during an uninstall operation.

The default INF file for still image devices, sti.inf, defines two installation sections for each device type, as follows:

  • An INF DDInstall Section, which must be referenced within the DDInstall section of the vendor-supplied INF file, as shown in the following table.

    USB devices SCSI devices Serial devices
    Include=sti.inf

    Needs=STI.USBSection
    Include=sti.inf

    Needs=STI.SCSISection
    Include=sti.inf

    Needs=STI.SerialSection
  • An INF DDInstall.Services Section, which must be referenced within the DDInstall.Services section of the vendor-supplied INF file, as shown in the following table.

    USB devices SCSI devices Serial devices
    Include=sti.inf

    Needs=STI.USBSection.Services
    Include=sti.inf

    Needs=STI.SCSISection.Services
    Include=sti.inf

    Needs=STI.SerialSection.Services

If you're also creating device-specific components for image acquisition APIs, you'll typically include the file names for these components in the INF file.

For additional guidance in creating INF files for still image devices, you can look at any INF file provided with Windows that contains the entry "Subclass=StillImage".

Remarks

When you're developing an INF file for scanners, you can use Microsoft OS descriptors to enable compatibility ID functionality. When you do this, you allow one scanner driver to be compatible with multiple scanner models.