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

Input Parameters

  • Irp->AssociatedIrp.SystemBuffer
    A pointer to an SCARD_IO_REQUEST structure followed by the data to be transmitted. An SCARD_IO_REQUEST structure has the following definition:

    typedef struct _SCARD_IO_REQUEST{
        DWORD dwProtocol;   // Protocol identifier
        DWORD cbPciLength;  // Protocol Control Information Length
  • Irp->AssociatedIrp.SystemBuffer
    Contains the data to transmit to the inserted smart card.

  • Parameters.DeviceIoControl.InputBufferLength
    Contains the size of the structure plus the length of trailing data bytes (if any). The dwProtocol member must be set to the protocol that was previously selected, and the cbPciLength member must be set to the size of the SCARD_IO_REQUEST structure itself (usually eight bytes). The structure is used for future protocols. Data that will be transmitted to the card must immediately follow this structure.

  • Parameters.DeviceIoControl.OutputBufferLength
    Contains the length of the output buffer.

Output Parameters

  • Irp->AssociatedIrp.SystemBuffer
    Receives the result of the transmission. This buffer must also begin with an SCARD_IO_REQUEST structure. Any data that was received from the card must be stored immediately after the structure.

    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.

I/O Status Block

The Information member receives the size of the SCARD_IO_REQUEST structure plus the number of bytes received from the card.

The Status member is set to one of the values in the following table.

Value Meaning


The transmission was successful.


No smart card is in the reader.


The operation timed out.


The protocol in the header file does not match the smart card protocol that was previously selected



Winsmcrd.h (include Winsmcrd.h)

Send comments about this topic to Microsoft