CheckScanner.BeginInsertion Method
2/27/2008
Starts the document insertion process.
Namespace: Microsoft.PointOfService
Assembly: Microsoft.PointOfService (in microsoft.pointofservice.dll)
Syntax
'Declaration
Public MustOverride Sub BeginInsertion ( _
timeout As Integer _
)
public abstract void BeginInsertion (
int timeout
)
public:
virtual void BeginInsertion (
int timeout
) abstract
public abstract void BeginInsertion (
int timeout
)
public abstract function BeginInsertion (
timeout : int
)
Parameters
- timeout
Specifies the number of milliseconds before failing the method. If timeout is set to 0 (zero), the method tries to begin insertion mode, returns immediately if this is successful. Otherwise, an exception is thrown. If timeout is set to WaitForever, the method tries to begin insertion mode, waits as long as needed until either the check is inserted or an error occurs.
Remarks
When it is called, the check scanner is made ready to receive a check by opening the device’s check handling "jaws" or starting the device’s insertion mode. BeginInsertion is paired with the EndInsertion method for controlling check insertion. Although some Check Scanner devices do not require this kind of processing, the application should use these methods to make sure the application works across different Check Scanner devices.
If the Check Scanner device cannot be put in insertion mode, the service object throws an exception. Otherwise, check insertion is monitored until either:
The check is successfully inserted; or
The check is not inserted before timeout milliseconds have elapsed, or an error is reported by the device. In this case, the service object throws an exception and the check scanner remains in insertion mode. This enables the application to perform some user interaction and reissue the BeginInsertion method without altering the check scanner check-handling mechanism.
BeginInsertion may throw a PosControlException with the following ErrorCodes.
Value |
Meaning |
Timeout |
The value of timeout was reached before insertion mode could be initiated. |
Busy |
If the check scanner is a combination device, the peer device may be busy. |
Illegal |
An invalid value has been specified for timeout. |
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
BeginRemoval
EndInsertion
EndRemoval