Share via


SmartCardRW.BeginRemoval Method (POS for .NET v1.14 SDK Documentation)

3/2/2014

Initiates smart card removal processing.

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

Syntax

'Declaration
Public MustOverride Sub BeginRemoval ( _
    timeout As Integer _
)
public abstract void BeginRemoval (
    int timeout
)
public:
virtual void BeginRemoval (
    int timeout
) abstract
public abstract void BeginRemoval (
    int timeout
)
public abstract function BeginRemoval (
    timeout : int
)

Parameters

  • timeout
    The number of milliseconds before failing the method

Remarks

When called, the SCR/W is made ready to be removed from either a contact type or a contactless type SCR/W. This method is paired with the EndRemoval method for controlling smart card removal.

The contact type model that has the sensor in the entrance ends normally when a card is removed from SCR/W. The contactless model (without a sensor) ends normally when the smart card has been removed from the proximity of the SCR/W device.

If the SCR/W cannot be placed into removal or ejection mode, an exception is raised. Otherwise, the service object continues to monitor smart card removal until either the smart card is not ejected before timeout milliseconds have elapsed, or an error is reported by the SCR/W. In this case, the service object raises an exception with the appropriate error code. The SCR/W remains in smart card ejection mode. This allows an application to perform some user interaction and reissue the BeginRemoval method without altering the smart card handling mechanism.

BeginRemoval may cause a PosControlException to be thrown with the following ErrorCode:

Value

Meaning

Busy

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

Illegal

The SCR/W does not exist or an invalid timeout parameter was specified.

Timeout

The specified time has elapsed without the smart card being properly removed.

Extended

See the table below.

Possible extended errors are as follows:

Code

Meaning

ExtendedErrorNoCard

There is no card detected in the SCR/W but a card was expected.

ExtendedErrorRead

There was a read error.

ExtendedErrorTorn

The smart card was prematurely removed from the SCR/W unexpectedly. The CapCardErrorDetection property must be true before this can be set.

ExtendedErrorNoCard

There is no card detected in the SCR/W but a card was expected.

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

SmartCardRW Class
SmartCardRW Members
Microsoft.PointOfService Namespace
SmartCardRW.BeginInsertion Method
EndInsertion
EndRemoval