SmartcardRawRequest (WDM) routine

The SmartcardRawRequest routine copies data from the user buffer to the send buffer, which the driver uses to transmit data to the smart card reader.

Syntax

NTSTATUS SmartcardRawRequest(
   PSMARTCARD_EXTENSION SmartcardExtension
);

Parameters

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

Return value

SmartcardRawRequest returns one of the following NTSTATUS values:

Return code Description
STATUS_SUCCESS

The buffer was set up successfully.

STATUS_BUFFER_OVERFLOW

The internal buffer is too small to hold the data that should be sent to the smart card. To avoid this, allocate a larger send buffer. For more information, see SmartcardInitialize (WDM).

STATUS_BUFFER_TOO_SMALL

The user buffer is too small to hold the data.

 

Remarks

This routine copies data from the user buffer to SmartcardExtension->SmartcardRequest.Buffer, and it adjusts SmartcardExtension->SmartcardRequest.BufferLength to the number of bytes to be transmitted to the smart card. The driver then writes this buffer to the smart card and reads the bytes coming from the smart card into SmartcardExtension->SmartcardReply.Buffer, as described in SmartcardRawReply (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

SmartcardInitialize (WDM)

SmartcardRawReply (WDM)

SMARTCARD_EXTENSION

 

 

Send comments about this topic to Microsoft