IOCTL Codes

The following table lists the available smart card IOCTL codes. With the exception of IOCTL_SMARTCARD_GET_LAST_ERROR, these codes apply to both WDM and VxD drivers.

IOCTL Code Description
IOCTL_SMARTCARD_EJECT Ejects the currently inserted smart card from the smart card reader.
IOCTL_SMARTCARD_GET_ATTRIBUTE Queries smart card and smart card reader attributes
IOCTL_SMARTCARD_GET_LAST_ERROR VxD drivers only. Retrieves the error code of the last operation.
IOCTL_SMARTCARD_GET_STATE Gets the current status of the smart card reader.
IOCTL_SMARTCARD_IS_ABSENT Either returns immediately if no card is currently inserted, or installs an event handler to track card removals.
IOCTL_SMARTCARD_IS_PRESENT Either returns immediately if no card is currently inserted, or installs an event handler to track card insertions.
IOCTL_SMARTCARD_POWER Either powers down or warm resets the card.
IOCTL_SMARTCARD_SET_ATTRIBUTE Sets various attributes in the driver.
IOCTL_SMARTCARD_SET_PROTOCOL Sets the protocol to be used with the currently inserted card.
IOCTL_SMARTCARD_SWALLOW Causes the reader to swallow the card.
IOCTL_SMARTCARD_TRANSMIT Transmits data to and receives data from the currently inserted smart card.