Previous Next

IOCTL_SMARTCARD_POWER

WDM driver version

Operation

The IOCTL_SMARTCARD_POWER request consists of three minor IOCTL codes listed in the following table.

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 the answer to request (ATR) data. (Does not apply to power down code.)

Output

Irp->AssociatedIrp.SystemBuffer
Used by SCARD_COLD_RESET and SCARD_WARM_RESET to store the ATR data 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 one of the following values.

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

Headers

Defined in winsmcrd.h. Include winsmcrd.h.

VxD driver version

Operation

The IOCTL_SMARTCARD_POWER request consists of three minor IOCTL codes listed in the following table.

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 the answer to reset (ATR) data.

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.)

I/O Status Block

Following are possible status values.

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

Headers

Defined in winsmcrd.h. Include winsmcrd.h.