SCARD_READER_CAPABILITIES

The SCARD_READER_CAPABILITIES structure holds state information about the reader. It must be completely maintained by the driver.

typedef struct _SCARD_READER_CAPABILITIES {

    //
    // Supported protocol by the reader/driver
    //
    struct {

        ULONG    Async;
        ULONG     Sync;

    } SupportedProtocols;

    //
    // Type of reader (Serial/USB/PCMCIA/Keyboard etc.)
    //
    ULONG    ReaderType;

    //
    // Mechanical characteristics like SCARD_READER_SWALLOWS etc.
    //
    ULONG    MechProperties;

    //
    // Current state of reader (card present/removed/activated)
    //
    ULONG     CurrentState;

    //
    // The channel ID the reader uses depending on the type of reader:
    //     - Port number for serial reader
    //    - Port number for par reader
    //    - Scsi id for scsi reader
    //    - 0 for keyboard reader
    //    - device number for USB
    //
    ULONG    Channel;

    //
    // Clock rates in KHz encoded as little endian
    // (I.e. 3.58MHz is encoded as 3580)
    //
    struct {
         
        ULONG Default;
        ULONG Max;

    } CLKFrequency;

    //
    // Data rates in bps encoded as little endian
    //
    struct {
         
        ULONG Default;
        ULONG Max;

    } DataRate;

    //
    // Maximum IFSD supported by IFD
    //
    ULONG   MaxIFSD;              

    //
    // Type of power management the card supports
    // (0 = IFD does not support power management)
    //
    ULONG   PowerMgmtSupport;

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

} SCARD_READER_CAPABILITIES, *PSCARD_READER_CAPABILITIES;
 

Members

The following members must be maintained by the driver:

SupportedProtocols
Mandatory. Must be set to a bit mask that reflects the protocols that this driver/reader supports (in hardware and software).
ReaderType
Mandatory. The type of this reader.
Type Meaning
SCARD_READER_TYPE_SERIAL Serial reader.
SCARD_READER_TYPE_PCMCIA PCMCIA reader.
SCARD_READER_TYPE_KEYBOARD Keyboard attached reader.
SCARD_READER_TYPE_USB USB reader.

CurrentState
Mandatory. Contains the status of the card.
Status Meaning
SCARD_UNKNOWN The reader does not know the status.
SCARD_ABSENT No card is currently inserted.
SCARD_PRESENT A card is inserted.
SCARD_SWALLOWED A card is inserted and the reader has swallowed it.
SCARD_POWERED The card is powered, but the reader does not know its mode.
SCARD_NEGOTIABLE A card is inserted and awaits protocol negotiation.
SCARD_SPECIFIC A card is inserted and a protocol has been selected.

MechProperties
Optional. Contains a mask of reader properties combined with the bitwise OR operator:
Property Meaning
SCARD_READER_SWALLOWS Reader has a swallowing mechanism.
SCARD_READER_EJECTS Reader is able to eject the card.
SCARD_READER_CONFISCATES Reader is able to capture the card.

Channel
Mandatory. Contains the logical channel number according to Part 3 of the Interoperability Specification for ICCs and Personal Computer Systems (see Documents at http://www.smartcardsys.com/).
ClkFrequency.Default
Mandatory. This is the standard clock frequency that the reader runs at, in KHz.
ClkFrequency.Max
Mandatory. This is the maximum clock frequency that the reader can run at, in KHz.
DataRate.Default
Mandatory. This is the standard data rate of the reader, in bps.
DataRate.Max
Mandatory. This is the maximum data rate of the reader, in bps.
MaxIFSD
Mandatory. This is the maximum buffer size of the reader. This value is used to inform the smart card at the beginning of a T=1 transmission about the maximum number of bytes that can be received in one packet.