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.
Contains the size of the output buffer. Must be at least sizeof(ULONG).
Receives the error code.
Must be set to sizeof(ULONG).
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.