Microsoft Windows CE 3.0  

IOCTL_SMARTCARD_SET_PROTOCOL

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This code sets the protocol to be used with the currently inserted card.

Parameters

dwOpenData
Handle returned from a call to the smart card reader driver's XXX_Openfunction.
dwCode
Specifies this code.
pBufIn
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 SCODE_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, pBufInis ignored.

    dwLenIn
    Set to sizeof(ULONG).
    pBufOut
    The driver stores the code for whatever protocol it selects in pBufOut.
    dwLenOut
    Set to sizeof(ULONG).
    pdwActualOut
    Set to sizeof(ULONG).

    Return Values

    One of the following status values:

    Status Meaning
    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.

    Note: Smart card reader drivers return Windows NT status values, rather than Win32 error values, as the return values from the driver's callback function.



     Last updated on Tuesday, July 13, 2004

    © 2004 Microsoft Corporation. All rights reserved.