SCardReconnect

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(
IN SCARDHANDLE hCard, 
IN DWORD dwShareMode, 
IN DWORD dwPreferredProtocols, 
IN DWORD dwInitialization, 
OUT LPDWORD pdwActiveProtocol );

Parameters

  • hCard
    Handle to the reference value obtained from a previous call to SCardConnect.

  • dwShareMode
    Specifies a flag that indicates whether other applications can form connections to this card. The following list shows the possible values for dwShareMode.

    Value Description
    SCARD_SHARE_SHARED Unsupported.
    SCARD_SHARE_EXCLUSIVE This application will not share this card with other applications.
  • dwPreferredProtocols
    Supplies a bit mask of acceptable protocols for this connection. The following list 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
    Specifies the kind of initialization to perform on the card. The following list 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
    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

Value Description
Succeeds SCARD_S_SUCCESS
Fails An error value (see Smart Card Error values for a list of all error values)

Remarks

SCardReconnect is a smart card and reader access function.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 3.0 and later Winscard.h   Winscard.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

SCardConnect, SCardDisconnect

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.