ISCardCmd interface

[The ISCardCmd 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 ISCardCmd interface provides the methods needed to construct and manage a smart card application protocol data unit (APDU). This interface encapsulates two buffers:

  • The APDU buffer contains the command sequence that will be sent to the card.
  • The APDUReply buffer contains data returned from the card after execution of the APDU command (this data is also referred to as the return APDU).

The following example shows a typical use of the ISCardCmd interface. The ISCardCmd interface is used to build an APDU.

To submit a transaction to a specific card

  1. Create an ISCard interface and connect to a smart card.
  2. Create an ISCardCmd interface.
  3. Build a smart card APDU command by using the ISCardISO7816 interface or one of ISCardCmd build methods.
  4. Execute the command on the smart card by calling the appropriate ISCard interface method.
  5. Evaluate the returned response.
  6. Repeat the procedure as needed.
  7. Release the ISCardCmd interface and others as needed.

Members

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

Methods

The ISCardCmd interface has these methods.

Method Description
BuildCmd Constructs a valid command APDU for transmission to a smart card.
Clear Clears the APDU and the reply APDU message buffers.
Encapsulate Encapsulates the given command APDU into another command APDU for transmission to a smart card.

 

Properties

The ISCardCmd interface has these properties.

Property Access type Description
AlternateClassId
Read/write
Current alternate class ID value.
Apdu
Read/write
Raw application protocol data unit (APDU).
ApduLength
Read-only
Length of the APDU.
ApduReply
Read/write
Reply APDU.
ApduReplyLength
Read/write
Length of the reply APDU.
ClassId
Read/write
Class ID of the APDU.
Data
Read-only
Data field of the APDU.
InstructionId
Read/write
Instruction ID byte from the APDU.
LeField
Read-only
Le field of the APDU.
Nad
Read/write
Node address.
P1
Read/write
First parameter byte of the APDU.
P2
Read/write
Second parameter byte of the APDU.
P3
Read-only
Third parameter byte of the APDU.
ReplyNad
Read/write
Node address used by the card in the reply message.
ReplyStatus
Read/write
Reply APDU message status word.
ReplyStatusSW1
Read-only
Reply APDU's message SW1 status byte.
ReplyStatusSW2
Read-only
Reply APDU's message SW2 status byte.
Type
Read-only
Reserved for future use.

 

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
Scarddat.h
Type library
Scarddat.tlb
DLL
Scardssp.dll
IID
IID_ISCardCmd is defined as D5778AE3-43DE-11D0-9171-00AA00C18068