Previous Next

IOCTL_SMARTCARD_IS_ABSENT

WDM driver version

Operation

The IOCTL_SMARTCARD_IS_ABSENT request either returns immediately if no card is currently inserted, or it installs an event handler to track card removals.

The operation either returns immediately with STATUS_SUCCESS, which indicates that no card is in the reader, or it returns with STATUS_PENDING. This indicates that a card is currently in the reader and the driver will inform the caller of card removal through an I/O completion. Waiting for I/O completion can be accomplished with the following code fragment:

success = GetOverlappedResult(
    hDevice,
    &lpOverlapped,
    &lpBytesReturned,
    TRUE
    );
 

Completing the call in the driver can be accomplished with the following code fragment:

IoCompleteRequest(
    Irp,
    IO_NO_INCREMENT
    );

return STATUS_SUCCESS;
 

Input

None

Output

None

I/O Status

Information must be set to zero. Status can be one of the following values.

Status Meaning
STATUS_SUCCESS A smart card is inserted.
STATUS_PENDING The driver is waiting for a card to be inserted.
STATUS_DEVICE_BUSY Event tracking is already active.
STATUS_INVALID_DEVICE_STATE The device cannot accept the request.

Headers

Defined in winsmcrd.h. Include winsmcrd.h.

See Also

IOCTL_SMARTCARD_IS_PRESENT

VxD driver version

Operation

The IOCTL_SMARTCARD_IS_ABSENT request either returns immediately if no card is currently inserted, or it installs an event handler to track card removals.

The operation either returns immediately with STATUS_SUCCESS, which indicates that no card is in the reader, or it returns with STATUS_PENDING. This indicates that a card is currently in the reader and the driver will inform the caller of card removal through an I/O completion. Waiting for I/O completion can be accomplished with the following code fragment:

success = GetOverlappedResult(
    hDevice,
    &lpOverlapped,
    &lpBytesReturned,
    TRUE
    );
 

Completing the call in the driver can be accomplished with the following code fragment:

SmartcardCompleteCardTracking(
  SmartcardExtension
);
 

Input

None

Output

None

I/O Status Block

The following are possible status values.

Value Meaning
STATUS_SUCCESS A smart card is inserted.
STATUS_PENDING The driver is waiting for a card to be inserted.
STATUS_DEVICE_BUSY Event tracking is already active.
STATUS_INVALID_DEVICE_STATE The device cannot accept the request.

Headers

Defined in winsmcrd.h. Include winsmcrd.h.

See Also

IOCTL_SMARTCARD_IS_PRESENT