Base Service Providers

These service providers provide the basic smart card capabilities. They can be used to access a single smart card capability, or their COM interfaces can be combined to provide several capabilities within a single service provider. These service providers are the building blocks for developing additional functionality to other service providers.

The following tasks can be performed by base service provider interfaces supplied by the Smart Card SDK.

Task Base service provider interfaces DLL
Connect to a smart card, implement transactions, close connections, and so on. ISCard SCardSSP
Maintain a command APDU and reply APDU. ISCardCmd SCardSSP
Query the smart card database. ISCardDatabase SCardSSP
Locate a smart card or reader. ISCardLocate SCardSSP
Build an ISO7816-4 command APDU. ISCardISO7816 SCardSSP
Wrap an Istream buffer by using Visual Basic–compatible types. IByteBuffer SCardSSP

 

The following procedure shows a typical use of these base service provider interfaces. In this example, the ISCard, ISCardISO7816, and ISCardCmd interfaces are used to perform a transaction.

To perform a transaction

  1. Create an instance for all base service provider interfaces needed (for example, ISCard, ISCardISO7816, and ISCardCmd).
  2. Connect to a particular smart card by using the methods in the ISCard interface.
  3. Using ISCardISO7816 and an ISCardCmd object, build an ISO 7816-4 command by calling the ISCardISO7816 method. The command is contained in ISCardCmd as the command APDU.
  4. Do a transaction with the card by calling the ISCard transaction method and passing the created ISCardCmd object. When the transaction is complete, the results are stored in the ISCardCmd reply APDU.
  5. Interpret the ISCardCmd reply APDU and repeat.
  6. Release all interfaces when operations are complete.

For information about the APDU command built within the DLLs, see Building an ISO7816-4 APDU Command.