IOCTL_SMARTCARD_GET_STATE control code

The IOCTL_SMARTCARD_GET_STATE request retrieves the current status of the smart card reader.

Input Parameters

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

Output Parameters

  • Irp->AssociatedIrp.SystemBuffer
    Receives the status of the card. The status can be one of the following values.

    Value Meaning

    SCARD_UNKNOWN

    The smart card reader does not know the status.

    SCARD_ABSENT

    No smart card is currently inserted.

    SCARD_PRESENT

    A smart card is inserted.

    SCARD_SWALLOWED

    A smart card is inserted and the smart card reader has swallowed it.

    SCARD_POWERED

    The smart card is turned on but the smart card reader cannot determine its mode.

    SCARD_NEGOTIABLE

    A smart card is inserted and awaits protocol negotiation.

    SCARD_SPECIFIC

    A smart card is inserted and a protocol has been selected.

I/O Status Block

The Information member must be set to sizeof(ULONG).

The Status member must be set to STATUS_SUCCESS.

Requirements

Header

Winsmcrd.h (include Winsmcrd.h)

See also

IOCTL_SMARTCARD_GET_LAST_ERROR

Send comments about this topic to Microsoft