Smart Card Callback Parameters

For all IOCTL requests except IOCTL_SMARTCARD_IS_ABSENT and IOCTL_SMARTCARD_IS_PRESENT, SmartcardDeviceControl (WDM) initializes the IoRequest member of the SMARTCARD_EXTENSION structure before it calls a callback routine. The following table indicates the sorts of initialization that SmartcardDeviceControl performs.

Member of IoRequest Initialization performed by SmartcardDeviceControl

IoRequest.RequestBuffer

Stores the user data to be sent to the card in the buffer that this member points to.

IoRequest.RequestBufferLength

Stores the length of the user buffer in this member.

IoRequest.ReplyBuffer

Stores the data returned by the smart card in the buffer that this member points to.

IoRequest.ReplyBufferLength

Stores the size of the reply buffer in this member.

IoRequest.Information

Stores the number of bytes that were actually received from the card in the variable that this member points to.

MajorIoControlCode

Stores the major I/O control code of the IOCTL request in this member.

MinorIoControlCode

Stores the minor I/O control code (if any) of the IOCTL request in this member.

The structure pointed to by SmartcardExtension->OsData is set up as described in the following table.

Member Description

CurrentIrp

Receives a pointer to the requesting IRP for every control request except IOCTL_SMARTCARD_IS_ABSENT and IOCTL_SMARTCARD_IS_PRESENT.

NotificationIrp

Receives a pointer to the requesting IRP for the IOCTL_SMARTCARD_IS_ABSENT or IOCTL_SMARTCARD_IS_PRESENT control request.