[The ISCardISO7816 interface is available for use in the operating systems specified in the Requirements section. It is not available for use in Windows Server 2003 with Service Pack 1 (SP1) and later, Windows Vista, Windows Server 2008, and subsequent versions of the operating system. The Smart Card Modules provide similar functionality.]
The ISCardISO7816 interface provides methods for implementing ISO 7816-4 functionality. With the exception of SetDefaultClassId, these methods create an application protocol data unit (APDU) command that is encapsulated in a ISCardCmd object.
The ISO 7816-4 specification defines standard commands available on smart cards. The specification also defines how a smart card APDU command should be constructed and sent to the smart card for execution. This interface automates the building process.
The following example shows a typical use of the ISCardISO7816 interface. In this case, the ISCardISO7816 interface is used to build an APDU command.
To submit a transaction to a specific card
-
Create an ISCardISO7816 and ISCardCmd interface.
The ISCardCmd interface is used to encapsulate the APDU.
-
Call the appropriate method of the ISCardISO7816 interface, passing the required parameters and the ISCardCmd interface pointer.
The ISO 7816-4 APDU command will be built and encapsulated in the ISCardCmd interface.
-
Release the ISCardISO7816 and ISCardCmd interfaces.
Note:
In the method reference pages, if a bit sequence in a table is not defined, assume that bit sequence is reserved for future use or proprietary to a specific vendor.
Members
The ISCardISO7816 interface inherits from the IDispatch interface. ISCardISO7816 also has these types of members:
Methods
The ISCardISO7816 interface has these methods.
| Method | Description |
|---|---|
| AppendRecord | Constructs a command that appends a record to the end of an elementary file (EF). |
| EraseBinary | Sets part of the content of an EF to its logical erased state, sequentially, starting from a given offset. |
| ExternalAuthenticate | Conditionally updates the security status using the result of the computation by the card, based on a challenge previously issued by the card (for example, by the INS_GET_CHALLENGE command), a possibly secret key stored in the card, and authentication data transmitted by the interface device. |
| GetChallenge | Requires the issuing of a challenge for use in a security-related procedure. |
| GetData | Retrieves a single primitive data object or a set of data objects contained in a constructed data object, based on the type of file specified. |
| GetResponse | Transmits from the card to the interface device APDUs that otherwise could not be transmitted by the available protocols. |
| InternalAuthenticate | Initiates the computation of the authentication data by the card using the challenge data sent from the interface device and a relevant secret stored in the card. |
| ManageChannel | Opens and closes logical channels. |
| PutData | Stores one primitive data object, or one or more data objects contained in a constructed data object, within the current resource manager context. |
| ReadBinary | Constructs a command that acquires a response message that gives that part of the contents of an EF with transparent structure. |
| ReadRecord | Constructs a command that reads the contents of the specified records of an elementary file. |
| SelectFile | Sets a current file within a logical channel. |
| SetDefaultClassId | Assigns a standard class ID byte that will be used in all operations when constructing an ISO 7816-4 command APDU. |
| UpdateBinary | Initiates the update of the bits already present in an EF with the bits given in the command APDU. |
| UpdateRecord | Constructs a command that initiates the updating of a specific record. |
| Verify | Initiates the comparison in the card of the verification data sent from the interface device with the reference data stored in the card. |
| WriteBinary | Initiates the writing of binary values into an EF. |
| WriteRecord | Constructs a command that writes a record. |
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 | Scardssp.h |
| Type library | Scardsrv.tlb |
| DLL | Scardssp.dll |
| IID | IID_ISCardISO7816 is defined as 53B6AA68-3F56-11D0-916B-00AA00C18068 |
Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
