SCARD_CARD_CAPABILITIES

The SCARD_CARD_CAPABILITIES structure holds all information about the currently inserted smart card.

typedef struct _SCARD_CARD_CAPABILITIES{

     //
    // Flag that indicates that the current card uses inverse convention
    //
    BOOLEAN InversConvention;

    //
    // Calculated etu 
    //
    ULONG    etu;

    //
    // Answer To Reset string returned by card.
    //
    struct {

        UCHAR Buffer[64];
        UCHAR Length;

    } ATR;

    struct {

        UCHAR Buffer[16];
        UCHAR Length;

    } HistoricalChars;

    // !!! DO NOT MODIFY ANY OF THE BELOW VALUES
    // OTHERWISE THE LIBRARY WON'T WORK PROPERLY

    //
    // The following 2 tables are provided to give 
    // the driver access to the ISO definitions
    //
    PCLOCK_RATE_CONVERSION     ClockRateConversion;
    PBIT_RATE_ADJUSTMENT     BitRateAdjustment;

    // Clock rate conversion 
    UCHAR Fl;

    // Bit rate adjustment
    UCHAR Dl;

    // Maximum programming current
    UCHAR II;

    // Programming voltage in .1 Volts
    UCHAR P;

    // Extra guard time in etu 
    UCHAR N;

    // Calculated guard time in micro seconds
    ULONG GT;

    struct {

        // This is a bit mask of the supported protocols
        ULONG Supported;
        // The currently selected protocol
        ULONG Selected;

    } Protocol;

    //
    // T=0 specific data
    //
    struct {

        // Waiting integer
        UCHAR WI;

        // Waiting time in micro seconds
        ULONG WT;

    } T0;

    //
    // T=1 specific data
    //
    struct {

        // Information field size of card
        UCHAR IFSC;

        // Character waiting integer and block waiting integer
        UCHAR CWI;
        UCHAR BWI;

        // Error detection code
        UCHAR EDC;

        // Character and block waiting time in micro seconds
        ULONG CWT;
        ULONG BWT;

        // Block guarding time in micro seconds
        ULONG BGT;

    } T1;

    //
    // Reserved, do not use
    //
    ULONG Reserved[25];

} SCARD_CARD_CAPABILITIES, *PSCARD_CARD_CAPABILITIES;
 

Members

The following members must be maintained by the driver:

ATR.Buffer
Receives the ATR bytes after a warm or cold reset.
ATR.Length
Receives the actual length of the ATR.

The following members should be used by the driver:

GT
The guard time, in microseconds (including the extra guard time). This is the minimum delay between two consecutive characters.
T0.WT
The T=0 work waiting time, in microseconds. This is the maximum delay between two consecutive characters.
T1.BWT
The T=1 block waiting time, in microseconds. This is the maximum delay between the end of a block and the start of the next block sent in the opposite direction.
T1.CWT
The T=1 character waiting time, in microseconds. This is the maximum delay between two consecutive characters.
T1.BGT
The T=1 block guarding time, in microseconds. This is the minimum delay between the end of a block and the start of the next block sent in the opposite direction.

Comments

SCARD_CARD_CAPABILITIES holds information about the currently inserted smart card. If the driver uses the Smart Card Driver Library, then ATR is the only member that the driver must fill in. Fill ATR.Buffer with the ATR characters and ATR.Length with the number of ATR bytes returned by the card. The Smart Card Driver Library will automatically update all other fields when a call is made to IOCTL_SMARTCARD_SET_PROTOCOL.