IOCTL_SMARTCARD_GET_STATE - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// winsmcrd.h

// CTL_CODE(0x0031, 0x00e, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_SMARTCARD_GET_STATE 0x00310038
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (ni-winsmcrd-ioctl_smartcard_get_state)

IOCTL_SMARTCARD_GET_STATE IOCTL

Description

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

Parameters

Major code

Input buffer

None.

Input buffer length

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.

Output buffer length

Input/output buffer

Input/output buffer length

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.

See also

Near field communication (NFC) design guide

Smart card design guide