IOCTL_SMARTCARD_TRANSMIT - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// winsmcrd.h

// CTL_CODE(0x0031, 0x005, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_SMARTCARD_TRANSMIT 0x00310014
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (ni-winsmcrd-ioctl_smartcard_transmit)

IOCTL_SMARTCARD_TRANSMIT IOCTL

Description

The IOCTL_SMARTCARD_TRANSMIT request transmits data to, and receives data from, the inserted smart card.

Parameters

Major code

Input buffer

Input buffer length

Output buffer

Bytes buffer contains the result of the transmission. The buffer points to the SCARD_IO_REQUEST structure immediately followed by the data received.

Output buffer length

Input/output buffer

Input/output buffer length

Status block

Irp->IoStatus.Status is set to one of the following values.

Value Meaning
STATUS_SUCCESS The transmission was successful.
STATUS_NO_MEDIA No smart card is detected in the reader.
STATUS_IO_TIMEOUT The operation timed out.
STATUS_INVALID_DEVICE_STATE The protocol in the header file does not match the smart card protocol that was previously selected.
STATUS_BUFFER_TOO_SMALL The output buffer is too small for the return data.
STATUS_DEVICE_POWERED_OFF The proximity radio control is off.

Remarks

IOCTL_SMARTCARD_TRANSMIT transmits data from the client to the detected smart card in ISO7816-4 compliant APDU. These APDUs are interpreted with respect to the PC/SC specification (Section 4.3.7 has more detailed requirements on support for different NFC contactless tag formats). Because the NFP feature shares the same driver with the smart card, the card should be connected right after the discovery, no explicit connect for the ‘Transmit’ is needed.

Because the input buffer and the output buffer are pointing to the same memory area, the driver must avoid overwriting the input data. Use the smart card driver library to make sure that the input data is not overwritten.

See also

Near field communication (NFC) design guide

Smart card design guide