SmartcardT0Reply (WDM)

The SmartcardT0Reply function transfers the data received from the card to the user buffer.

NTSTATUS 
SmartcardT0Reply(
  PSMARTCARD_EXTENSION SmartcardExtension
);
 

Parameters

SmartcardExtension
Points to the smart card extension of the device.

Return Values

SmartcardT0Reply returns an NTSTATUS value. Possible values are the following.

Value Meaning
STATUS_SUCCESS Transmission successful.
STATUS_DEVICE_PROTOCOL_ERROR The card did not return a T=0 status word.
STATUS_BUFFER_TOO_SMALL The user buffer is too small to hold the data.

Remarks

The driver must store the data coming from the reader into SmartcardExtension->SmartcardReply.Buffer and store the number of bytes returned from the card into SmartcardExtension->SmartcardReply.BufferLength. SmartcardT0Reply then checks the validity of the data and copies the buffer back to the user buffer, including the protocol header. See SmartcardT0Request (WDM) for sample code.

SmartcardT0Reply functions the same for WDM and VxD drivers.