// winsmcrd.h
// CTL_CODE(0x0031, 0x00e, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_SMARTCARD_GET_STATE 0x00310038
View the official Windows Driver Kit DDI referenceNo description available.
The IOCTL_SMARTCARD_GET_STATE control code gets the current status of the smart card.
None.
(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. |
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. |
Near field communication (NFC) design guide