Share via


CheckScanner.EndInsertion Method

2/27/2008

Ends the document insertion process.

Namespace: Microsoft.PointOfService
Assembly: Microsoft.PointOfService (in microsoft.pointofservice.dll)

Syntax

'Declaration
Public MustOverride Sub EndInsertion
public abstract void EndInsertion ()
public:
virtual void EndInsertion () abstract
public abstract void EndInsertion ()
public abstract function EndInsertion ()

Remarks

The EndInsertion method checks to make sure that the device is in insertion mode, then tries to remove the check scanner from insertion mode.

If the check scanner is successfully removed from insertion mode, EndInsertion puts the scanned image in a working buffer memory area, checks it for resolution quality, and then raises a StatusUpdateEvent event to indicate that a successful scan has occurred. Because no data has been transferred to the ImageData property at this point, no DataEvent event is raised. The application must call the RetrieveImage method to populate the ImageData property.

If no check is detected in the device, or if the working buffer memory area is empty indicating no check was scanned, EndInsertion throws an exception. If the resolution of the scanned image is not equal to the value of the Quality property, the resolution is reset to match the Quality property, and an informational error is logged.

EndInsertion is paired with the BeginInsertion method for controlling check insertion. Although some Check Scanner devices do not require this kind of processing, the application should still use these methods to make sure application portability across different Check Scanner devices.

EndInsertion may cause a PosControlException to be thrown with the following ErrorCodes.

Value

Meaning

Illegal

The Check Scanner device was not in check insertion mode—BeginInsertion had not been called before calling EndInsertion.

Extended

ErrorCodeExtended = ExtendedErrorNoCheck. No check was detected in the Check Scanner device.

Failure

There is no check image in the working area buffer—the check scan failed.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread-safe. Any instance members are not guaranteed to be thread-safe.

See Also

Reference

CheckScanner Class
CheckScanner Members
Microsoft.PointOfService Namespace
CheckScanner.BeginRemoval Method
CheckScanner.BeginInsertion Method
EndRemoval