Installing a Segmentation Filter

The segmentation filter should be installed together with the WIA driver. In order to do this, a small number of additions must be made to the driver's INF file. The following INF example shows how an existing driver INF file can be modified to include a segmentation filter.

[MyDriver.AddReg]
...
HKCR,CLSID\<UiClassId>\shellex\SegmentationFilter\<FilterClassId>
...
HKCR,CLSID\<FilterClassId>,,,"My Segmentation Filter"
HKCR,CLSID\<FilterClassId>\InProcServer32,,,%11%\Mysegfilter.dll
HKCR,CLSID\<FilterClassId>\InProcServer32,ThreadingModel,,"Both"
...
 
[MyDriver.CopyFiles]
...
Mysegfilter.dll
...
 
[SourceDisksFiles.x86]
...
Mysegfilter.dll=1
...

<UiClassId> is the value that the driver returns for the WIA_DIP_UI_CLSID property. <FilterClassId> is the class ID of the segmentation filter implementation. Mysegfilter.dll is the DLL that contains the implementation of the segmentation filter.

The first entry in the device's INF AddReg Directive registers the segmentation filter as an extension for the driver, the next three entries register the segmentation filter as a COM component.

If the driver uses the WIA segmentation filter provided by Microsoft , neither the device's INF CopyFiles Directive, INF SourceDisksFiles Section, nor the last three registry entries will be required. The only requirement is that the minidriver implements the WIA_IPS_SEGMENTATION property.

The COM ThreadingModel must be Both.

For more information about INF files, see INF Files for WIA Devices.