RDF_TRANSMIT - NtDoc

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

NTSTATUS  (*ReaderFunction[RDF_TRANSMIT])(
   PSMARTCARD_EXTENSION SmartcardExtension
);
View the official Windows hardware development documentation

NtDoc

No description available.

Windows hardware development documentation (smartcard-rdf-transmit-callback)

RDF_TRANSMIT callback function

The RDF_TRANSMIT callback function performs data transmissions.

Parameters

Return value

This function returns an NTSTATUS value. Possible values include the following:

Return code Description
STATUS_SUCCESS Transmission successful.
STATUS_NO_MEDIA No smart card is inserted in the reader.
STATUS_IO_TIMEOUT The request timed out.
STATUS_INVALID_DEVICE_REQUEST The protocol, defined by dwProtocol, is invalid.

Remarks

Smart card reader drivers must implement this callback function.

On input, the caller must pass the following values to the function:

The request returns the following values:

When this function is called, SmartcardExtension->IoRequest.RequestBuffer points to an SCARD_IO_REQUEST structure followed by the data to transmit.

typedef struct _SCARD_IO_REQUEST{
  DWORD  dwProtocol;   // Protocol identifier
  DWORD  cbPciLength;  // Protocol Control Information Length
} SCARD_IO_REQUEST, *PSCARD_IO_REQUEST, *LPSCARD_IO_REQUEST;

The dwProtocol member must contain the protocol identifier that is returned by a call to IOCTL_SMARTCARD_SET_PROTOCOL.

The cbPciLength member contains the size, in bytes, of the SCARD_IO_REQUEST structure. The size of this structure is usually 8 bytes.

The SCARD_IO_REQUEST structure is followed by (protocol) data to transmit to the card. Depending on the protocol to use for the transmission, the library offers several support functions. For more information about these support functions, see SmartcardT0Request (WDM) and SmartcardT1Request (WDM).

RequestBuffer and ReplyBuffer point to the same system buffer. If you use the library function SmartcardxxRequest and SmartcardxxReply, you will not overwrite the input buffer. If you do not use these functions, make a copy of the RequestBuffer before you start transmissions.

You must copy the SCARD_IO_REQUEST structure to the ReplyBuffer parameter, followed by the data received from the card. Again, if you use the SmartcardxxRequest and SmartcardxxReply functions, the library will copy the structure for you.

Requirements

Target platform Desktop
Header Smclib.h (include Smclib.h)

See also

IOCTL_SMARTCARD_SET_PROTOCOL

IOCTL_SMARTCARD_TRANSMIT

SmartcardT0Request (WDM)

SmartcardT1Request (WDM)

SMARTCARD_EXTENSION