IOCTL_SMARTCARD_GET_LAST_ERROR IOCTL (winsmcrd.h)

The IOCTL_SMARTCARD_GET_LAST_ERROR request retrieves the error code of the most previous operation because there is no option to return an error code immediately after an overlapped operation is complete.

Major code

IRP_MJ_DEVICE_CONTROL

Input buffer

DiocParams->cbOutBuffer

Contains the size of the output buffer. Must be at least sizeof(ULONG).

Output buffer

DiocParams->lpvOutBuffer

Receives the error code.

DiocParams->lpcbBytesReturned

Must be set to sizeof(ULONG).

Status block

Irp->IoStatus.Status is set to STATUS_SUCCESS if the request is successful, and must be returned when using this IOCTL.

Be aware that when your driver uses the smart card driver library, you should store the result of the most previously overlapped operation in the smart card extension. ion. The library will use your stored value to answer this call automatically.

Requirements

Requirement Value
Header winsmcrd.h

See also

IOCTL_SMARTCARD_GET_STATE