SmartCardRW.BeginInsertion Method (POS for .NET v1.14 SDK Documentation)
3/2/2014
Initiates smart card insertion processing.
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 number of milliseconds before failing the method.
Remarks
Called to initiate smart card insertion processing in either a contact type or contactless type SCR/W. When called, SCR/W state is changed to allow the insertion of a smart card and the smart card insertion mode is entered. This method is paired with the EndInsertion method for controlling smart card insertion.
If the SCR/W device cannot be placed into insertion mode an exception is raised. Otherwise, the service object continues to monitor smart card insertion until either the smart card is not inserted before timeout milliseconds have elapsed, or an error is reported by the SCR/W device. In the latter case, the service object raises an exception with the appropriate error code. The SCR/W device remains in smart card insertion mode. This allows an application to perform some user interaction and reissue the BeginInsertion method without altering the smart card handling mechanism.
BeginInsertion 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 inserted. |
Extended |
See below. |
ExtendedError codes are as follows:
Value |
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. Note: CapCardErrorDetection must be true before this can be set. |
ExtendedErrorWrite |
There was a write error. |
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
EndInsertion
BeginRemoval
EndRemoval