Subsections

IFD_EXCHANGE

This command is used to send a proprietary command to a reader.

The CCID specification [#!ccid_spec!#] describes a PC_to_RDR_Escape command to send proprietary commands to the reader.

Example:

#include <winscard.h>
#include <reader.h>

#define IOCTL_SMARTCARD_VENDOR_IFD_EXCHANGE SCARD_CTL_CODE(1)

SCARDHANDLE hCard;
unsigned char bSendBuffer[MAX_BUFFER_SIZE];
unsigned char bRecvBuffer[MAX_BUFFER_SIZE];
DWORD length;

/* get firmware */
bSendBuffer[0] = 0x02;	/* proprietary code for Gemplus CCID readers */
rv = SCardControl(hCard, IOCTL_SMARTCARD_VENDOR_IFD_EXCHANGE,
    bSendBuffer, 1, bRecvBuffer, sizeof(bRecvBuffer), &length);

printf(" Firmware: ");
for (i=0; i<length; i++)
	printf("%02X ", bRecvBuffer[i]);
printf("\n");



2007-06-17