UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:winscard.SCardReconnect |
SCardReconnect function (winscard.h) |
Reestablishes an existing connection between the calling application and a smart card. |
|
security\scardreconnect.htm |
security |
c79e5810-c2be-4184-8ac7-c058ccb9308e |
12/05/2018 |
SCARD_LEAVE_CARD, SCARD_PROTOCOL_T0, SCARD_PROTOCOL_T1, SCARD_RESET_CARD, SCARD_SHARE_EXCLUSIVE, SCARD_SHARE_SHARED, SCARD_UNPOWER_CARD, SCardReconnect, SCardReconnect function [Security], _smart_scardreconnect, security.scardreconnect, winscard/SCardReconnect |
winscard.h |
Windows |
Windows XP [desktop apps only] |
Windows Server 2003 [desktop apps only] |
Winscard.lib |
Winscard.dll |
Windows |
19H1 |
|
|
|
|
|
|
The SCardReconnect function reestablishes an existing connection between the calling application and a smart card. This function moves a card handle from direct access to general access, or acknowledges and clears an error condition that is preventing further access to the card.
Reference value obtained from a previous call to SCardConnect.
Flag that indicates whether other applications may form connections to this card.
Value | Meaning |
---|---|
|
This application will share this card with other applications. |
|
This application will not share this card with other applications. |
Bitmask of acceptable protocols for this connection. Possible values may be combined with the OR operation.
The value of this parameter should include the current protocol. Attempting to reconnect with a protocol other than the current protocol will result in an error.
Value | Meaning |
---|---|
|
T=0 is an acceptable protocol. |
|
T=1 is an acceptable protocol. |
Type of initialization that should be performed on the card.
Value | Meaning |
---|---|
|
Do not do anything special on reconnect. |
|
Reset the card (Warm Reset). |
|
Power down the card and reset it (Cold Reset). |
Flag that indicates the established active protocol.
Value | Meaning |
---|---|
|
T=0 is the active protocol. |
|
T=1 is the active protocol. |
This function returns different values depending on whether it succeeds or fails.
Return code | Description |
---|---|
|
SCARD_S_SUCCESS. |
|
An error code. For more information, see Smart Card Return Values. |
SCardReconnect is a smart card and reader access function. For information about other access functions, see Smart Card and Reader Access Functions.
The following example shows reestablishing a connection.
DWORD dwAP;
LONG lReturn;
// Reconnect.
// hCardHandle was set by a previous call to SCardConnect.
lReturn = SCardReconnect(hCardHandle,
SCARD_SHARE_SHARED,
SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1,
SCARD_LEAVE_CARD,
&dwAP );
if ( SCARD_S_SUCCESS != lReturn )
printf("Failed SCardReconnect\n");