Share via


PointCardRW.BeginInsertion Method

Initiates point card processing.

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

Usage

'Usage
Dim timeout As Integer
Dim pointCardRW1 As PointCardRW
pointCardRW1.BeginInsertion(timeout)

Syntax

'Declaration
Public MustOverride Sub BeginInsertion( _
    ByVal timeout As Integer _
)
public abstract void BeginInsertion(
    int timeout
);
public: abstract Void BeginInsertion(
    Int32 timeout
);
public abstract void BeginInsertion(
    int timeout
);
public abstract function BeginInsertion(
     timeout : int
) : Void;

Parameters

  • timeout
    The timeout parameter gives the number of milliseconds before failing the method. If zero, BeginInsertion tries to begin insertion mode, then returns the appropriate status immediately. If WaitForever, BeginInsertion tries to begin insertion mode, then waits as long as needed until the Point Card is inserted or an error occurs.

Remarks

When called, the Point Card Reader/Writer state is changed to allow the insertion of a point card and the point card insertion mode is entered. BeginInsertion is paired with the EndInsertion method for controlling point card insertion.

If the Point Card Reader/Writer device cannot be placed into insertion mode, an error is returned to the application. Otherwise, the service object monitors point card insertion until either:

  • The point card is successfully inserted. In this case, the service object returns a Success status.

    -Or-

  • The point card is not inserted before timeout milliseconds have elapsed, or an error is reported by the Point Card Reader/Writer device. In this case, the service object either returns Timeout or another error. The Point Card Reader/Writer device remains in point card insertion mode. This allows an application to perform some user interaction and reissue the BeginInsertion method without altering the point card handling mechanism.

BeginInsertion returns void if successful, and can throw the following exceptions:

Value

Meaning

Busy

This operation cannot be performed because asynchronous output is in progress.

Illegal

The Point Card Reader/Writer does not exist or an invalid timeout parameter was specified.

Timeout

The specified time has elapsed without the point card being properly inserted.

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.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, and Windows 2000

Target Platforms

See Also

Reference

PointCardRW Class
PointCardRW Members
Microsoft.PointOfService Namespace
EndInsertion
BeginRemoval
EndRemoval