IOCTL_SMARTCARD_SET_PROTOCOL (Windows Embedded CE 6.0)
1/6/2010
This code sets the protocol to be used with the currently inserted card.
Parameters
- dwOpenData
[in] Handle returned from a call to the smart card reader driver's XXX_Open (Device Manager) function.
- dwCode
[in] Specifies this code.
pBufIn
[in] Contains a mask of protocols that are acceptable for the following transmissions. This mask can contain any of the following protocol codes, which can be combined by using the bitwise-OR operator:- SCARD_PROTOCOL_RAW
- SCARD_PROTOCOL_T0
- SCARD_PROTOCOL_T1
- SCARD_PROTOCOL_DEFAULT
- SCARD_PROTOCOL_OPTIMAL
SCARD_PROTOCOL_DEFAULT and SCARD_PROTOCOL_OPTIMAL are not protocols themselves, but instead instruct the driver either to explicitly perform protocol selection with the best possible communication parameters or to use the implicit protocol of the card with standard parameters. If the card supports only one protocol with one set of communication parameters, pBufIn is ignored.
- dwLenIn
[in] Set to sizeof(ULONG).
- pBufOut
[out] The driver stores the code for whatever protocol it selects in pBufOut.
- dwLenOut
[out] Set to sizeof(ULONG).
- pdwActualOut
[out] Set to sizeof(ULONG).
Return Values
One of the following status values.
Status | Description |
---|---|
STATUS_SUCCESS |
One protocol has been successfully selected. |
STATUS_NO_MEDIA |
There is no smart card in the card reader. |
STATUS_IO_TIMEOUT |
The operation has timed out. |
STATUS_NOT_SUPPORTED |
The smart card does not support any of the requested protocols. |
STATUS_INVALID_DEVICE_REQUEST |
The mask contains no known protocol. |
Remarks
Smart card reader drivers return Windows NT status values, rather than Win32 error values, as the return values from the driver's callback function.
Requirements
Header | winsmcrd.h |
Windows Embedded CE | Windows CE 3.0 and later |