PC/SC provides the SCardControl() function to send commands to the
driver and/or reader. Here is the list of supported commands by this
CCID driver.
See also SCardControl() in the pcsclite API documentation.
LONG SCardControl(
SCARDHANDLE hCard,
DWORD dwControlCode,
LPCVOID pbSendBuffer,
DWORD cbSendLength,
LPVOID pbRecvBuffer,
DWORD cbRecvLength,
LPDWORD lpBytesReturned
)Parameters:
- [in]
hCardConnection made fromSCardConnect(). - [in]
dwControlCodeControl code for the operation. - [in]
pbSendBufferCommand to send to the reader. - [in]
cbSendLengthLength of the command. - [out]
pbRecvBufferResponse from the reader. - [in]
cbRecvLengthLength of the response buffer. - [out]
lpBytesReturnedLength of the response.
If the dwControlCode is not supported the application receives the error
SCARD_E_UNSUPPORTED_FEATURE or SCARD_E_NOT_TRANSACTED as a general error
code.
-
IOCTL_SMARTCARD_VENDOR_IFD_EXCHANGEdefined as
SCARD_CTL_CODE(1)The
pbSendBuffer[]buffer is sent as aPC_to_RDR_EscapeCCID commandFor security possible problems this command in possible in the following cases only:
- the reader is a Gemalto (ex Gemplus) reader and the command is:
- get firmware version
- switch interface on a ProxDU
- the
ifdDriverOptions(in theInfo.plistfile) has the bitDRIVER_OPTION_CCID_EXCHANGE_AUTHORIZEDset
- the reader is a Gemalto (ex Gemplus) reader and the command is:
-
CM_IOCTL_GET_FEATURE_REQUESTdefined as
SCARD_CTL_CODE(3400)Implements the PC/SC v2.02.08 Part 10 IOCTL mechanism
-
IOCTL_FEATURE_VERIFY_PIN_DIRECT -
IOCTL_FEATURE_MODIFY_PIN_DIRECT -
IOCTL_FEATURE_IFD_PIN_PROPERTIES -
IOCTL_FEATURE_MCT_READERDIRECT -
IOCTL_FEATURE_GET_TLV_PROPERTIESSee PC/SC v2.02.08 Part 10