Using Vendor Attributes

Gemplus has incorporated a few vendor attributes to its drivers to circumvent a few very specific problems. Of them, two can be set. Generally, developers do not need to be aware of these attributes.

Manufacturer Name

All drivers manufactured by Gemplus dated from March 2000 and earlier will return "Gemplus" for the vendor attribute. You this attribute to determine if you can safely use other Gemplus defined attributes or control codes.

Original Driver Name

The original driver name, is the file name of the driver as submitted to the WHQL for Windows certification. For example, the driver name for the GemPC410 on Windows 98 is GrSerial.vxd.

Power Timeout

The power timeout attribute represents the duration of the power down upon cold reset. Some double reset smart cards require a longer power down value than normal smart cards. Conversely, a developer may want want to reduce this timeout to zero to reduce cold reset delays. The default power timeout value is 750ms.

APDU Timout

The APDU timeout attribute represents the maximum duration of a SCardTransmit call. When this timeout is reached, the driver sends a timeout error to the smart card resource manager, which in turn forwards the error to the application. This timeout value is most useful in cases where the smart card can ask for more time to answer to the reader. Note that the APDU timeout is used only for T=0 transactions on Gcr410p (GemCore R1-11 and later). The default APDU timeout value is 60000ms.  This attribute is not supported on all Gemplus reader.

Accessing Gemplus Attributes

Obtaining or setting vendor attributes is done through the SCardControl function.  To get a vendor defined attribute use SCardControl with dwControlCode equal to SCARD_CTL_CODE(2049).

To set a vendor defined attribute, use SCardControl with dwControlCode equal to SCARD_CTL_CODE(2050).