The IOCTL_SMARTCARD_GET_STATE control code gets the current status of the smart card.

Major code


Input buffer


Output buffer

(DWORD) one of the following states:

State Description
SCARD_UNKNOWN Unknown state
SCARD_ABSENT Card is not detected
SCARD_SWALLOWED Card is present but not powered. When SCARD_POWER_DOWN is set.
SCARD_SPECIFIC Card is present and communication protocols are established.

Status block

Irp->IoStatus.Status is set to STATUS_SUCCESS if the request is successful. Possible error codes are:

Return Code Description
STATUS_INVALID_PARAMETER This code is returned when the input or output buffers are invalid.
STATUS_BUFFER_TOO_SMALL This code is returned if the output buffer is too small for the return data.
STATUS_DEVICE_POWERED_OFF This code is returned if the proximity radio control is off.


Requirement Value
Header winsmcrd.h

See also

Near field communication (NFC) design guide

Smart card design guide