The IOCTL_SMARTCARD_SET_PROTOCOL request sets the protocol to be used with the currently inserted card.
The last two values are additional bit definitions indicating that the driver must either explicitly perform PTS selection (SCARD_PROTOCOL_OPTIMAL) with the best possible communication parameters or 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 one of the following values.
| Status | Meaning |
|---|---|
| STATUS_SUCCESS | One protocol has been successfully selected. |
| STATUS_NO_MEDIA | No card is in the 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. |
Defined in winsmcrd.h. Include winsmcrd.h.
The IOCTL_SMARTCARD_SET_PROTOCOL request sets the protocol to be used with the currently inserted card.
The last two values are additional bit definitions indicating to the driver that it must either explicitly perform PTS selection (SCARD_PROTOCOL_OPTIMAL) with the best possible communication parameters or 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 is in the 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. |
Defined in winsmcrd.h. Include winsmcrd.h.