2.2.8 Return Code
The following Smart Card Facility Codes for Windows-specific return codes MAY be returned by the protocol server to the protocol client and are of the data type NTSTATUS, with the sev field set to STATUS_SEVERITY_WARNING (0x2) and the reserved bit (N) set to 0.
ReturnCode (4 bytes): One of the following return codes:
No error has occurred.
An internal consistency check failed.
The action was canceled by a Cancel request.
The supplied handle was invalid.
One or more of the supplied parameters could not be properly interpreted.
Registry startup information is missing or invalid.
Not enough memory available to complete this command.
An internal consistency timer has expired.
The data buffer to receive returned data is too small for the returned data.
The specified reader name is not recognized.
The user-specified time-out value has expired.
The smart card cannot be accessed because of other connections outstanding.
The operation requires a smart card, but no smart card is currently in the device.
The specified smart card name is not recognized.
The system could not dispose of the media in the requested manner.
The requested protocols are incompatible with the protocol currently in use with the smart card.
The reader or smart card is not ready to accept commands.
One or more of the supplied parameters values could not be properly interpreted.
The action was canceled by the system, presumably to log off or shut down.
An internal communications error has been detected.
An internal error has been detected, but the source is unknown.
An ATR obtained from the registry is not a valid ATR string.
An attempt was made to end a non-existent transaction.
The specified reader is not currently available for use.
The operation has been stopped to allow the server application to exit.
The PCI Receive buffer was too small.
No primary provider can be found for the smart card.
The requested order of object creation is not supported.
This smart card does not support the requested feature.
The specified directory does not exist in the smart card.
The specified file does not exist in the smart card.
The supplied path does not represent a smart card directory.
The reader device driver does not meet minimal requirements for support.
The reader device driver did not produce a unique reader name.
The smart card does not meet minimal requirements for support.
Smart Cards for Windows is not running.
Smart Cards for Windows has shut down.
An unexpected card error has occurred.
The supplied path does not represent a smart card file.
Access is denied to this file.
The smart card does not have enough memory to store the information.
There was an error trying to set the smart card file object pointer.
The supplied PIN is incorrect.
An unrecognized error code was returned from a layered component.
The requested certificate does not exist.
The requested certificate could not be obtained.
Cannot find a smart card reader.
A communications error with the smart card has been detected. Retry the operation.
The requested key container does not exist.
Smart Cards for Windows is too busy to complete this operation.
The smart card PIN cache has expired.
The smart card PIN cannot be cached.
The smart card is read-only and cannot be written to.
The reader cannot communicate with the smart card due to ATR configuration conflicts.
The smart card is not responding to a reset.
Power has been removed from the smart card, so that further communication is impossible.
The smart card has been reset, so any shared state information is invalid.
The smart card has been removed, so that further communication is impossible.
Access was denied because of a security violation.
The card cannot be accessed because the wrong PIN was presented.
The card cannot be accessed because the maximum number of PIN entry attempts has been reached.
The end of the smart card file has been reached.
The action was canceled by the user.
No PIN was presented to the smart card.
The requested item could not be found in the cache.
The requested cache item is too old and was deleted from the cache.
The new cache item exceeds the maximum per-item size defined for the cache.