ISCard interface

[The ISCard interface is available for use in the operating systems specified in the Requirements section. The Smart Card Modules provide similar functionality.]

The ISCard interface lets you open and manage a connection to a smart card. Each connection to a card requires a single, corresponding instance of the ISCard interface.

The smart card resource manager must be available whenever an instance of ISCard is created. If this service is unavailable, creation of the interface will fail.

The following example shows a typical use of the ISCard interface. The ISCard interface is used to connect to the smart card, submit a transaction, and release the smart card.

To submit a transaction to a specific card

  1. Create an ISCard interface.
  2. Attach to a smart card by specifying a smart card reader or by using a previously established, valid handle.
  3. Create transaction commands with ISCardCmd, and ISCardISO7816 smart card interfaces.
  4. Use ISCard to submit the transaction commands for processing by the smart card.
  5. Use ISCard to release the smart card.
  6. Release the ISCard interface.

Members

The ISCard interface inherits from the IDispatch interface. ISCard also has these types of members:

Methods

The ISCard interface has these methods.

Method Description
AttachByHandle Attaches an object to an open and configured smart card handle.
AttachByReader Opens the smart card in the named reader.
Detach Closes the open connection to the smart card.
LockSCard Claims exclusive access to the smart card.
ReAttach Resets and reinitializes the smart card.
Transaction Executes a write and read operation on the smart card command (application protocol data unit) object.
UnlockScard Releases exclusive access to the smart card.

 

Properties

The ISCard interface has these properties.

Property Access type Description
Atr
Read-only
Retrieves the ATR string of the smart card.
CardHandle
Read-only
Retrieves the handle for the connected smart card.
Context
Read-only
Retrieves the current resource manager context handle.
Protocol
Read-only
Retrieves the identifier of the protocol currently in use on the smart card.
Status
Read-only
Retrieves the current state the smart card is in.

 

Requirements

Requirement Value
Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
End of client support
Windows XP
End of server support
Windows Server 2003
Header
Scardmgr.h
Type library
Scardmgr.tlb
DLL
Scardssp.dll
IID
IID_ISCard is defined as 1461AAC3-6810-11D0-918F-00AA00C18068