The IOCTL_SMARTCARD_SET_PROTOCOL DeviceIoControl operation sets the protocol to be used with the currently inserted card.
The last two values are additional bit definitions telling the driver either to explicitly perform PTS selection (SCARD_PROTOCOL_OPTIMAL) with the best possible communication parameters or to use the implicit protocol of the card (SCARD_PROTOCOL_DEFAULT) with standard parameters. If the card supports only one protocol with one set of communication parameters, these bits are ignored.
Information must be set to sizeof(ULONG). Status can be:
Status | Meaning |
---|---|
STATUS_SUCCESS | One protocol has been successfully selected. |
STATUS_NO_MEDIA | No card in reader. |
STATUS_IO_TIMEOUT | The operation has timed out. |
STATUS_NOT_SUPPORTED | The card does not support any of the requested protocols. |
STATUS_INVALID_DEVICE_REQUEST | The mask contains no known protocol. |
The IOCTL_SMARTCARD_SET_PROTOCOL DeviceIoControl operation sets the protocol to be used with the currently inserted card.
The last two values are additional bit definitions telling the driver either to explicitly perform PTS selection (SCARD_PROTOCOL_OPTIMAL) with the best possible communication parameters or to use the implicit protocol of the card (SCARD_PROTOCOL_DEFAULT) with standard parameters. If the card supports only one protocol with one set of communication parameters, these bits are ignored.
Following are possible return values.
Value | Meaning |
---|---|
STATUS_SUCCESS | One protocol has been successfully selected. |
STATUS_NO_MEDIA | No card in reader. |
STATUS_IO_TIMEOUT | The operation has timed out. |
STATUS_NOT_SUPPORTED | The card does not support any of the requested protocols. |
STATUS_INVALID_DEVICE_REQUEST | The mask contains no known protocol. |