IOCTL_SMARTCARD_GET_STATE

WDM driver version:

The IOCTL_SMARTCARD_GET_STATE DeviceIoControl operation gets the current status of the smart card reader.

Input

Parameters.DeviceIoControl.OutputBufferLength
The size of the output buffer. Must be at least sizeof(ULONG).

Output

Irp->AssociatedIrp.SystemBuffer
Receives the status of the card. The status can be:
Status Meaning
SCARD_UNKNOWN The reader does not know the status.
SCARD_ABSENT No card is currently inserted.
SCARD_PRESENT A card is inserted.
SCARD_SWALLOWED A card is inserted and the reader has swallowed it.
SCARD_POWERED The card is powered but the reader does not know its mode.
SCARD_NEGOTIABLE A card is inserted and awaits protocol negotiation.
SCARD_SPECIFIC A card is inserted and a protocol has been selected.

I/O Status

Information must be set to sizeof(ULONG). Status must be STATUS_SUCCESS.

VxD driver version:

The IOCTL_SMARTCARD_GET_STATE DeviceIoControl operation gets the current status of the smart card reader.

Input

DiocParams->cbOutBuffer
The size of the output buffer. Must be at least sizeof(ULONG).

Output

DiocParams->lpvOutBuffer
Receives the status of the reader. The status can be:
Value Meaning
SCARD_UNKNOWN The reader does not know the status.
SCARD_ABSENT No card is currently inserted.
SCARD_PRESENT A card is inserted.
SCARD_SWALLOWED A card is inserted and the reader has swallowed it. If the reader does not support swallowing, it should go to this status after card insertion.
SCARD_POWERED The card is powered, but the reader does not know its mode.
SCARD_NEGOTIABLE A card is inserted and awaits protocol negotiation.
SCARD_SPECIFIC A card is inserted and a protocol has been selected.

DiocParams->lpcbBytesReturned
Must be set to sizeof(ULONG).

Return Values

The return value must be set to STATUS_SUCCESS.