Previous Next

SmartcardUpdateCardCapabilities (WDM)

The SmartcardUpdateCardCapabilities function translates an ATR string into the SCARD_CARD_CAPABILITIES structure that can be used by the driver.

NTSTATUS 
  SmartcardUpdateCardCapabilities(
    PSMARTCARD_EXTENSION  SmartcardExtension
    );

Parameters

SmartcardExtension
Pointer to a structure of type SMARTCARD_EXTENSION that contains the device extension of the smart card device.

Return Value

SmartcardUpdateCardCapabilities returns an NTSTATUS value. Possible values are the following.

Value Meaning
STATUS_SUCCESS ATR successfully translated.
STATUS_UNRECOGNIZED_MEDIA The ATR neither starts with 0x3B nor 0x3F. It is also possible that the ATR contains values that don't conform with ISO for Fl or Dl, or the ATR checksum for T=1 is wrong.

Headers

Declared in smclib.h. Include smclib.h.

Comments

This function should be called by the driver just after the driver has read the ATR into the ATR member of the SCARD_CARD_CAPABILITIES structure. The ATR bytes must be stored in Buffer, and Length must be adjusted to the actual length of the ATR returned by the card.

This function can handle only T=0 and T=1 cards.

//
// Answer To Reset string returned by card.
//
struct {
    UCHAR Buffer[64];
    UCHAR Length;
} ATR;

The function converts the ATR string into the values defined by ISO 7816-3 standard. These values are all stored in the SCARD_CARD_CAPABILITIES structure. All time values in that structure are in microseconds, not in seconds.

SmartcardUpdateCardCapabilities functions the same for both WDM and VxD drivers.

See Also

SmartcardUpdateCardCapabilities (VxD), SMARTCARD_EXTENSION, SCARD_CARD_CAPABILITIES