Subsections

IFDHTransmitToICC

Synopsis:

#include <PCSC/ifdhandler.h>

RESPONSECODE IFDHTransmitToICC(DWORD Lun,
    SCARD_IO_HEADER SendPci,
    PUCHAR TxBuffer,
    DWORD TxLength,
    PUCHAR RxBuffer,
    PDWORD RxLength,
    PSCARD_IO_HEADER RecvPci);

Parameters:

Lun IN Logical Unit Number
SendPci IN Protocol structure
TxBuffer IN APDU to be sent
TxLength IN Length of sent APDU
RxBuffer OUT APDU response
RxLength INOUT Length of APDU response
RecvPci INOUT Receive protocol structure

Description:

This function performs an APDU exchange with the card/slot specified by Lun. The driver is responsible for performing any protocol specific exchanges such as T=0, 1, etc. differences. Calling this function will abstract all protocol differences.

Notes:

The driver is responsible for knowing what type of card it has. If the current slot/card contains a memory card then this command should ignore the Protocol and use the MCT style commands for support for these style cards and transmit them appropriately. If your reader does not support memory cards or you don't want to implement this functionality, then ignore this.

RxLength should be set to zero on error.

The driver is not responsible for doing an automatic Get Response command for received buffers containing 61 XX.

Returns:

IFD_SUCCESS Success
IFD_COMMUNICATION_ERROR An error has occurred
IFD_RESPONSE_TIMEOUT The response timed out
IFD_ICC_NOT_PRESENT ICC is not present
IFD_PROTOCOL_NOT_SUPPORTED Protocol is not supported
IFD_NO_SUCH_DEVICE The reader is no more present

Ludovic Rousseau 2008-01-18