Share via


SCardReconnect (Windows Embedded CE 6.0)

1/6/2010

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.

Syntax

LONG SCardReconnect(
  SCARDHANDLE hCard, 
  DWORD dwShareMode, 
  DWORD dwPreferredProtocols, 
  DWORD dwInitialization, 
  LPDWORD pdwActiveProtocol 
);

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_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 Value

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

Header winscard.h
Library winscard.lib
Windows Embedded CE Windows CE 3.0 and later

See Also

Reference

Smart Card Functions
SCardConnect
SCardDisconnect