Share via


PosPrinter.BeginInsertion Method

2/27/2008

Starts form insertion processing. BeginInsertion is paired with the EndInsertion method to control form insertion.

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
    The timeout parameter gives the number of milliseconds before failing the method.

Remarks

The service object makes the slip station ready to receive a form by opening the form’s handling "jaws" or by starting a form-insertion mode. The service object continues to monitor form insertion until one of the following conditions is true:

The form is successfully inserted.

The form is not inserted before timeout milliseconds have elapsed. In this case, the service object throws a Timeout exception.

If an error is reported by the Printer device, the service object raises an ErrorEvent event. The Printer device remains in form-insertion mode. This allows an application to perform some user interaction and reissue the BeginInsertion method without altering the form-handling mechanism.

If set to 0 (zero), BeginInsertion tries to start insertion mode (in which a form is inserted), then returns immediately. If timeout is set to the constant WaitForever, BeginInsertion tries to start insertion mode, then waits until either the form is inserted or an error occurs.

Before it calls this method, the application must open, claim, and enable the device.

BeginInsertion may throw a PosControlException with the following ErrorCodes:

Value

Meaning

Timeout

BeginInsertion timed out (the value of the timeout parameter was exceeded) before form insertion mode was started.

Busy

The Printer device is currently being used.

Illegal

One of the following conditions has occurred:

  • The slip print station is not present on this printer (that is, the CapSlpPresent property is set to false).

  • The value given for timeout is less than -1.

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

PosPrinter Class
PosPrinter Members
Microsoft.PointOfService Namespace
EndInsertion
BeginRemoval
EndRemoval
PosCommon.WaitForever Field