SCardReconnect (Windows CE 5.0)
This function re-establishes an existing connection between the calling application and a smart card. The 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.
LONG SCardReconnect(SCARDHANDLEhCard, DWORDdwShareMode, DWORDdwPreferredProtocols, DWORDdwInitialization, LPDWORDpdwActiveProtocol);
Parameters
- hCard
[in] Handle to the reference value obtained from a previous call to SCardConnect. - dwShareMode
[in] Specifies a flag that indicates whether other applications can form connections to this card. The following table shows the possible values for dwShareMode.Value Description SCARD_SHARE_SHARED This application will share the card with other applications. SCARD_SHARE_EXCLUSIVE This application will not share this card with other applications. - dwPreferredProtocols
[in] Supplies a bit mask of acceptable protocols for this connection. The following table shows the possible values, which may be combined with the OR operation, for dwPreferredProtocols.Value Description SCARD_PROTOCOL_T0 T=0 is an acceptable protocol. SCARD_PROTOCOL_T1 T=1 is an acceptable protocol. - dwInitialization
[in] Specifies the kind of initialization to perform on the card. The following table shows the possible values for dwInitialization.Value Description SCARD_LEAVE_CARD Do not do anything special on reconnect. SCARD_RESET_CARD Reset the card (warm reset). SCARD_UNPOWER_CARD Power down the card and reset it (cold reset). - pdwActiveProtocol
[out] Pointer that specifies a flag indicating the established active protocol. The following table shows the possible values for pdwActiveProtocol.Value Description SCARD_PROTOCOL_T0 T=0 is the active protocol. SCARD_PROTOCOL_T1 T=1 is the active protocol.
Return Values
The following table shows the possible return values.
Value | Description |
---|---|
SCARD_S_SUCCESS | Succeeds |
An error value (see Smart Card Error Values for a list of all error values). | Fails |
Remarks
SCardReconnect is a smart card and reader access function.
Requirements
OS Versions: Windows CE 3.0 and later.
Header: Winscard.h.
Link Library: Winscard.lib.
See Also
SCardConnect | SCardDisconnect
Send Feedback on this topic to the authors