IOCTL_SMARTCARD_POWER

WDM driver version:

The IOCTL_SMARTCARD_POWER DeviceIoControl operation consists of three minor IOCTL codes. This code can be:

Code Meaning
SCARD_COLD_RESET Power down the card and power it up again.
SCARD_WARM_RESET Perform a warm reset of the card.
SCARD_POWER_DOWN Switch off the card power.

Input

Irp->AssociatedIrp.SystemBuffer
Contains the minor IOCTL code.
Parameters.DeviceIoControl.OutputBufferLength
The size of the output buffer. Must be at least 33 bytes to hold a complete ATR. (Does not apply to power down code.)

Output

Irp->AssociatedIrp.SystemBuffer
Used by SCARD_COLD_RESET and SCARD_WARM_RESET to store the ATR coming from the card.

I/O Status Block

Information is set to the length of the ATR returned by the card. Status is set to:

Status Meaning
STATUS_SUCCESS Successful operation.
STATUS_UNRECOGNIZED_MEDIA Unknown or unsupported card inserted.
STATUS_NO_MEDIA No card in reader.
STATUS_IO_TIMEOUT The operation has timed out.

VxD driver version:

The IOCTL_SMARTCARD_POWER DeviceIoControl operation consists of three minor IOCTL codes. This code can be:

Code Meaning
SCARD_COLD_RESET Power down the card and power it up again.
SCARD_WARM_RESET Perform a warm reset of the card.
SCARD_POWER_DOWN Switch off the card power.

Input

DiocParams->lpvInBuffer
Contains the minor IOCTL code.
DiocParams->cbOutBuffer
The size of the output buffer. Must be at least 33 bytes to hold a complete ATR.

Output

DiocParams->lpvOutBuffer
Used by SCARD_COLD_RESET and SCARD_WARM_RESET to store the ATR coming from the card.
DiocParams->lpcbBytesReturned
Must be set to the length of the ATR returned by the card. (Does not apply to power down code.)

Return Values

Following are possible return values.

Value Meaning
STATUS_SUCCESS Successful operation.
STATUS_UNRECOGNIZED_MEDIA Unknown or unsupported card inserted.
STATUS_NO_MEDIA No card in reader.
STATUS_IO_TIMEOUT The operation has timed out.