Share via


SmartcardT1Reply (WDM) routine

The SmartcardT1Reply routine copies the reply data from the buffer that is managed by the smart card library routines to the caller's buffer, and it checks the T=1 protocol status.

Syntax

NTSTATUS SmartcardT1Reply(
   PSMARTCARD_EXTENSION SmartcardExtension
);

Parameters

  • SmartcardExtension
    A pointer to a SMARTCARD_EXTENSION structure that contains the device extension of the smart card device.

Return value

SmartcardT1Reply returns one of the following NTSTATUS values:

Return code Description
STATUS_SUCCESS

The transmission was successful.

STATUS_DEVICE_PROTOCOL_ERROR

Too many transmission errors occurred.

STATUS_BUFFER_TOO_SMALL

The user buffer is too small to hold the data.

STATUS_MORE_PROCESSING_REQUIRED

The protocol requires additional transmissions.

 

Remarks

The caller must allocate a SMARTCARD_EXTENSION structure and pass a pointer to this structure to the SmartcardInitialize (WDM) routine. SmartcardInitialize (WDM) allocates two internal buffers that the smart card library routines manage, and it initializes the SmartcardRequest and SmartcardReply members of the SMARTCARD_EXTENSION structure to point to these two internal buffers. Because SmartcardT1Reply uses one of these buffers, SmartcardInitialize (WDM) must be called before SmartcardT1Reply.

Before you call SmartcardInitialize (WDM), you must load the buffer that is located at SmartcardExtension->SmartcardReply.Buffer with the data that is read from the smart card.

If the read operation has not yet finished, SmartcardT1Reply returns STATUS_MORE_PROCESSING_REQUIRED. In this case, you must call SmartcardT1Reply again.

Every call to SmartcardT1Reply must be preceded by a call to SmartcardT1Request (WDM).

Requirements

Target platform

Desktop

Version

Available in Windows XP and later versions of Windows.

Header

Smclib.h (include Smclib.h)

Library

Smclib.lib

IRQL

<= DISPATCH_LEVEL

See also

SmartcardT1Request (WDM)

SMARTCARD_EXTENSION

 

 

Send comments about this topic to Microsoft