Acquire exclusive access to a card inserted in this card terminal slot.

Namespace: CardWerk.SmartCard
Assembly: CardWerk.SmartCard (in CardWerk.SmartCard.dll)

Public Function AcquireCard( _ 
ByVal nCardTypes As CardTypes, _ 
ByRef nActivationResult As CardActivationResult
) As CardHandle
This language is not supported or no code example is available.
public CardHandle AcquireCard( 
CardTypes nCardTypes
out CardActivationResult nActivationResult 
)
This language is not supported or no code example is available.
public:  
CardHandle^ AcquireCard( 
CardTypes nCardTypes
CardActivationResult& nActivationResult 
)
This language is not supported or no code example is available.
public function AcquireCard( 
nCardTypes : CardTypes
nActivationResult : CardActivationResult 
) : CardHandle;
This language is not supported or no code example is available.

Parameters

nCardTypes
Type: CardTypes

Bit field that selects the acceptable card types. In order to accept all asynchronous cards, the value CardTypes.ProcessorCards should be passed. The caller must not mix asynchronous and synchronous card types in one call. Also, the caller must only request one synchronous card type at once.

nActivationResult
Type: CardActivationResult

[out] Returns the result from the attempt to activate the inserted card. Only if this value is returned as CardActivationResult.Success, then a card handle was successfully acquired and will be returned as the function result.

Return Value

Type: CardHandle

Returns a successfully acquired card handle. If the inserted card could not be activated successfully, then null is returned instead. Whenever a card handle is returned it must be properly disposed of as soon as it is no longer needed.

In order to successfully acquire a card handle, this card terminal slot must not be owned by a previously acquired card handle. Thus a previously acquired card handle must have been orderly relinquished (disposed of) before another card handle can be acquired on the same card terminal slot.

Only when a card is actually inserted in the indicated card terminal slot it is possible to acquire it. If no card is inserted, then this method returns CardActivationResult.NoCard and no CardHandle instance.

Usually this method should only be invoked, when the application knows that there is a card inserted into this card reader slot. An application can know this by handling card insertion events.

.NET Framework

Supported in: 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

.NET Core

Supported in: 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0

.NET Standard

Supported in: 2.0