PC/SC 错误代码中的单个字母是什么意思?

问题描述 投票:0回答:1

错误代码均以 SCARD_ 开头,然后是一个字母。

https://github.com/tpn/winsdk-10/blob/master/Include/10.0.16299.0/um/SCardErr.h

这封信是什么意思?

$ err.exe /:outputtocsv | grep ',SCARD' | cut -d, -f2 | cut -d_ -f1-2 | sort | uniq --count
     47 SCARD_E
      4 SCARD_F
      1 SCARD_P
     14 SCARD_W

err.exe 确实省略了“SCARD_S_SUCCESS”。但这里我猜“S”只是“Success”的缩写。

$ err.exe /:outputtocsv | grep ',SCARD'
0x80100001,SCARD_F_INTERNAL_ERROR,"An internal consistency check failed.",winerror.h
0x80100002,SCARD_E_CANCELLED,"The action was cancelled by an SCardCancel request.",winerror.h
0x80100003,SCARD_E_INVALID_HANDLE,"The supplied handle was invalid.",winerror.h
0x80100004,SCARD_E_INVALID_PARAMETER,"One or more of the supplied parameters could not be properly interpreted.",winerror.h
0x80100005,SCARD_E_INVALID_TARGET,"Registry startup information is missing or invalid.",winerror.h
0x80100006,SCARD_E_NO_MEMORY,"Not enough memory available to complete this command.",winerror.h
0x80100007,SCARD_F_WAITED_TOO_LONG,"An internal consistency timer has expired.",winerror.h
0x80100008,SCARD_E_INSUFFICIENT_BUFFER,"The data buffer to receive returned data is too small for the returned data.",winerror.h
0x80100009,SCARD_E_UNKNOWN_READER,"The specified reader name is not recognized.",winerror.h
0x8010000a,SCARD_E_TIMEOUT,"The user-specified timeout value has expired.",winerror.h
0x8010000b,SCARD_E_SHARING_VIOLATION,"The smart card cannot be accessed because of other connections outstanding.",winerror.h
0x8010000c,SCARD_E_NO_SMARTCARD,"The operation requires a smart card, but no smart card is currently in the device.",winerror.h
0x8010000d,SCARD_E_UNKNOWN_CARD,"The specified smart card name is not recognized.",winerror.h
0x8010000e,SCARD_E_CANT_DISPOSE,"The system could not dispose of the media in the requested manner.",winerror.h
0x8010000f,SCARD_E_PROTO_MISMATCH,"The requested protocols are incompatible with the protocol currently in use with the smart card.",winerror.h
0x80100010,SCARD_E_NOT_READY,"The reader or smart card is not ready to accept commands.",winerror.h
0x80100011,SCARD_E_INVALID_VALUE,"One or more of the supplied parameters values could not be properly interpreted.",winerror.h
0x80100012,SCARD_E_SYSTEM_CANCELLED,"The action was cancelled by the system, presumably to log off or shut down.",winerror.h
0x80100013,SCARD_F_COMM_ERROR,"An internal communications error has been detected.",winerror.h
0x80100014,SCARD_F_UNKNOWN_ERROR,"An internal error has been detected, but the source is unknown.",winerror.h
0x80100015,SCARD_E_INVALID_ATR,"An ATR obtained from the registry is not a valid ATR string.",winerror.h
0x80100016,SCARD_E_NOT_TRANSACTED,"An attempt was made to end a non-existent transaction.",winerror.h
0x80100017,SCARD_E_READER_UNAVAILABLE,"The specified reader is not currently available for use.",winerror.h
0x80100018,SCARD_P_SHUTDOWN,"The operation has been aborted to allow the server application to exit.",winerror.h
0x80100019,SCARD_E_PCI_TOO_SMALL,"The PCI Receive buffer was too small.",winerror.h
0x8010001a,SCARD_E_READER_UNSUPPORTED,"The reader driver does not meet minimal requirements for support.",winerror.h
0x8010001b,SCARD_E_DUPLICATE_READER,"The reader driver did not produce a unique reader name.",winerror.h
0x8010001c,SCARD_E_CARD_UNSUPPORTED,"The smart card does not meet minimal requirements for support.",winerror.h
0x8010001d,SCARD_E_NO_SERVICE,"The Smart Card Resource Manager is not running.",winerror.h
0x8010001e,SCARD_E_SERVICE_STOPPED,"The Smart Card Resource Manager has shut down.",winerror.h
0x8010001f,SCARD_E_UNEXPECTED,"An unexpected card error has occurred.",winerror.h
0x80100020,SCARD_E_ICC_INSTALLATION,"No Primary Provider can be found for the smart card.",winerror.h
0x80100021,SCARD_E_ICC_CREATEORDER,"The requested order of object creation is not supported.",winerror.h
0x80100022,SCARD_E_UNSUPPORTED_FEATURE,"This smart card does not support the requested feature.",winerror.h
0x80100023,SCARD_E_DIR_NOT_FOUND,"The identified directory does not exist in the smart card.",winerror.h
0x80100024,SCARD_E_FILE_NOT_FOUND,"The identified file does not exist in the smart card.",winerror.h
0x80100025,SCARD_E_NO_DIR,"The supplied path does not represent a smart card directory.",winerror.h
0x80100026,SCARD_E_NO_FILE,"The supplied path does not represent a smart card file.",winerror.h
0x80100027,SCARD_E_NO_ACCESS,"Access is denied to this file.",winerror.h
0x80100028,SCARD_E_WRITE_TOO_MANY,"The smart card does not have enough memory to store the information.",winerror.h
0x80100029,SCARD_E_BAD_SEEK,"There was an error trying to set the smart card file object pointer.",winerror.h
0x8010002a,SCARD_E_INVALID_CHV,"The supplied PIN is incorrect.",winerror.h
0x8010002b,SCARD_E_UNKNOWN_RES_MNG,"An unrecognized error code was returned from a layered component.",winerror.h
0x8010002c,SCARD_E_NO_SUCH_CERTIFICATE,"The requested certificate does not exist.",winerror.h
0x8010002d,SCARD_E_CERTIFICATE_UNAVAILABLE,"The requested certificate could not be obtained.",winerror.h
0x8010002e,SCARD_E_NO_READERS_AVAILABLE,"Cannot find a smart card reader.",winerror.h
0x8010002f,SCARD_E_COMM_DATA_LOST,"A communications error with the smart card has been detected. Retry the operation.",winerror.h
0x80100030,SCARD_E_NO_KEY_CONTAINER,"The requested key container does not exist on the smart card.",winerror.h
0x80100031,SCARD_E_SERVER_TOO_BUSY,"The Smart Card Resource Manager is too busy to complete this operation.",winerror.h
0x80100032,SCARD_E_PIN_CACHE_EXPIRED,"The smart card PIN cache has expired.",winerror.h
0x80100033,SCARD_E_NO_PIN_CACHE,"The smart card PIN cannot be cached.",winerror.h
0x80100034,SCARD_E_READ_ONLY_CARD,"The smart card is read only and cannot be written to.",winerror.h
0x80100065,SCARD_W_UNSUPPORTED_CARD,"The reader cannot communicate with the smart card, due to ATR configuration conflicts.",winerror.h
0x80100066,SCARD_W_UNRESPONSIVE_CARD,"The smart card is not responding to a reset.",winerror.h
0x80100067,SCARD_W_UNPOWERED_CARD,"Power has been removed from the smart card, so that further communication is not possible.",winerror.h
0x80100068,SCARD_W_RESET_CARD,"The smart card has been reset, so any shared state information is invalid.",winerror.h
0x80100069,SCARD_W_REMOVED_CARD,"The smart card has been removed, so that further communication is not possible.",winerror.h
0x8010006a,SCARD_W_SECURITY_VIOLATION,"Access was denied because of a security violation.",winerror.h
0x8010006b,SCARD_W_WRONG_CHV,"The card cannot be accessed because the wrong PIN was presented.",winerror.h
0x8010006c,SCARD_W_CHV_BLOCKED,"The card cannot be accessed because the maximum number of PIN entry attempts has been reached.",winerror.h
0x8010006d,SCARD_W_EOF,"The end of the smart card file has been reached.",winerror.h
0x8010006e,SCARD_W_CANCELLED_BY_USER,"The action was cancelled by the user.",winerror.h
0x8010006f,SCARD_W_CARD_NOT_AUTHENTICATED,"No PIN was presented to the smart card.",winerror.h
0x80100070,SCARD_W_CACHE_ITEM_NOT_FOUND,"The requested item could not be found in the cache.",winerror.h
0x80100071,SCARD_W_CACHE_ITEM_STALE,"The requested cache item is too old and was deleted from the cache.",winerror.h
0x80100072,SCARD_W_CACHE_ITEM_TOO_BIG,"The new cache item exceeds the maximum per-item size defined for the cache.",winerror.h
smartcard pcsc winscard
1个回答
0
投票

我最好的猜测是:

  • f:致命的
  • e:错误
  • w:警告
  • p:暂停(?!)
© www.soinside.com 2019 - 2024. All rights reserved.