jwacarderr.pas 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606
  1. {*
  2. scarderr.mc
  3. Error message codes from the Smart Card Resource Manager
  4. These messages must be reconciled with winerror.w
  5. They exist here to provide error messages on pre-Win2K systems.
  6. *}
  7. unit JwaCardErr;
  8. interface
  9. const
  10. // =============================
  11. // Facility SCARD Error Messages
  12. // =============================
  13. //
  14. SCARD_S_SUCCESS = 0;
  15. //
  16. // Values are 32 bit values layed out as follows:
  17. //
  18. // 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
  19. // 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
  20. // +---+-+-+-----------------------+-------------------------------+
  21. // |Sev|C|R| Facility | Code |
  22. // +---+-+-+-----------------------+-------------------------------+
  23. //
  24. // where
  25. //
  26. // Sev - is the severity code
  27. //
  28. // 00 - Success
  29. // 01 - Informational
  30. // 10 - Warning
  31. // 11 - Error
  32. //
  33. // C - is the Customer code flag
  34. //
  35. // R - is a reserved bit
  36. //
  37. // Facility - is the facility code
  38. //
  39. // Code - is the facility's status code
  40. //
  41. //
  42. // Define the facility codes
  43. //
  44. FACILITY_SYSTEM = $0;
  45. FACILITY_SCARD = $10;
  46. //
  47. // Define the severity codes
  48. //
  49. STATUS_SEVERITY_WARNING = $2;
  50. STATUS_SEVERITY_INFORMATIONAL = $1;
  51. STATUS_SEVERITY_ERROR = $3;
  52. //
  53. // MessageId: SCARD_F_INTERNAL_ERROR
  54. //
  55. // MessageText:
  56. //
  57. // An internal consistency check failed.
  58. //
  59. SCARD_F_INTERNAL_ERROR = $80100001;
  60. //
  61. // MessageId: SCARD_E_CANCELLED
  62. //
  63. // MessageText:
  64. //
  65. // The action was cancelled by an SCardCancel request.
  66. //
  67. SCARD_E_CANCELLED = $80100002;
  68. //
  69. // MessageId: SCARD_E_INVALID_HANDLE
  70. //
  71. // MessageText:
  72. //
  73. // The supplied handle was invalid.
  74. //
  75. SCARD_E_INVALID_HANDLE = $80100003;
  76. //
  77. // MessageId: SCARD_E_INVALID_PARAMETER
  78. //
  79. // MessageText:
  80. //
  81. // One or more of the supplied parameters could not be properly interpreted.
  82. //
  83. SCARD_E_INVALID_PARAMETER = $80100004;
  84. //
  85. // MessageId: SCARD_E_INVALID_TARGET
  86. //
  87. // MessageText:
  88. //
  89. // Registry startup information is missing or invalid.
  90. //
  91. SCARD_E_INVALID_TARGET = $80100005;
  92. //
  93. // MessageId: SCARD_E_NO_MEMORY
  94. //
  95. // MessageText:
  96. //
  97. // Not enough memory available to complete this command.
  98. //
  99. SCARD_E_NO_MEMORY = $80100006;
  100. //
  101. // MessageId: SCARD_F_WAITED_TOO_LONG
  102. //
  103. // MessageText:
  104. //
  105. // An internal consistency timer has expired.
  106. //
  107. SCARD_F_WAITED_TOO_LONG = $80100007;
  108. //
  109. // MessageId: SCARD_E_INSUFFICIENT_BUFFER
  110. //
  111. // MessageText:
  112. //
  113. // The data buffer to receive returned data is too small for the returned data.
  114. //
  115. SCARD_E_INSUFFICIENT_BUFFER = $80100008;
  116. //
  117. // MessageId: SCARD_E_UNKNOWN_READER
  118. //
  119. // MessageText:
  120. //
  121. // The specified reader name is not recognized.
  122. //
  123. SCARD_E_UNKNOWN_READER = $80100009;
  124. //
  125. // MessageId: SCARD_E_TIMEOUT
  126. //
  127. // MessageText:
  128. //
  129. // The user-specified timeout value has expired.
  130. //
  131. SCARD_E_TIMEOUT = $8010000A;
  132. //
  133. // MessageId: SCARD_E_SHARING_VIOLATION
  134. //
  135. // MessageText:
  136. //
  137. // The smart card cannot be accessed because of other connections outstanding.
  138. //
  139. SCARD_E_SHARING_VIOLATION = $8010000B;
  140. //
  141. // MessageId: SCARD_E_NO_SMARTCARD
  142. //
  143. // MessageText:
  144. //
  145. // The operation requires a Smart Card, but no Smart Card is currently in the device.
  146. //
  147. SCARD_E_NO_SMARTCARD = $8010000C;
  148. //
  149. // MessageId: SCARD_E_UNKNOWN_CARD
  150. //
  151. // MessageText:
  152. //
  153. // The specified smart card name is not recognized.
  154. //
  155. SCARD_E_UNKNOWN_CARD = $8010000D;
  156. //
  157. // MessageId: SCARD_E_CANT_DISPOSE
  158. //
  159. // MessageText:
  160. //
  161. // The system could not dispose of the media in the requested manner.
  162. //
  163. SCARD_E_CANT_DISPOSE = $8010000E;
  164. //
  165. // MessageId: SCARD_E_PROTO_MISMATCH
  166. //
  167. // MessageText:
  168. //
  169. // The requested protocols are incompatible with the protocol currently in use with the smart card.
  170. //
  171. SCARD_E_PROTO_MISMATCH = $8010000F;
  172. //
  173. // MessageId: SCARD_E_NOT_READY
  174. //
  175. // MessageText:
  176. //
  177. // The reader or smart card is not ready to accept commands.
  178. //
  179. SCARD_E_NOT_READY = $80100010;
  180. //
  181. // MessageId: SCARD_E_INVALID_VALUE
  182. //
  183. // MessageText:
  184. //
  185. // One or more of the supplied parameters values could not be properly interpreted.
  186. //
  187. SCARD_E_INVALID_VALUE = $80100011;
  188. //
  189. // MessageId: SCARD_E_SYSTEM_CANCELLED
  190. //
  191. // MessageText:
  192. //
  193. // The action was cancelled by the system, presumably to log off or shut down.
  194. //
  195. SCARD_E_SYSTEM_CANCELLED = $80100012;
  196. //
  197. // MessageId: SCARD_F_COMM_ERROR
  198. //
  199. // MessageText:
  200. //
  201. // An internal communications error has been detected.
  202. //
  203. SCARD_F_COMM_ERROR = $80100013;
  204. //
  205. // MessageId: SCARD_F_UNKNOWN_ERROR
  206. //
  207. // MessageText:
  208. //
  209. // An internal error has been detected, but the source is unknown.
  210. //
  211. SCARD_F_UNKNOWN_ERROR = $80100014;
  212. //
  213. // MessageId: SCARD_E_INVALID_ATR
  214. //
  215. // MessageText:
  216. //
  217. // An ATR obtained from the registry is not a valid ATR string.
  218. //
  219. SCARD_E_INVALID_ATR = $80100015;
  220. //
  221. // MessageId: SCARD_E_NOT_TRANSACTED
  222. //
  223. // MessageText:
  224. //
  225. // An attempt was made to end a non-existent transaction.
  226. //
  227. SCARD_E_NOT_TRANSACTED = $80100016;
  228. //
  229. // MessageId: SCARD_E_READER_UNAVAILABLE
  230. //
  231. // MessageText:
  232. //
  233. // The specified reader is not currently available for use.
  234. //
  235. SCARD_E_READER_UNAVAILABLE = $80100017;
  236. //
  237. // MessageId: SCARD_P_SHUTDOWN
  238. //
  239. // MessageText:
  240. //
  241. // The operation has been aborted to allow the server application to exit.
  242. //
  243. SCARD_P_SHUTDOWN = $80100018;
  244. //
  245. // MessageId: SCARD_E_PCI_TOO_SMALL
  246. //
  247. // MessageText:
  248. //
  249. // The PCI Receive buffer was too small.
  250. //
  251. SCARD_E_PCI_TOO_SMALL = $80100019;
  252. //
  253. // MessageId: SCARD_E_READER_UNSUPPORTED
  254. //
  255. // MessageText:
  256. //
  257. // The reader driver does not meet minimal requirements for support.
  258. //
  259. SCARD_E_READER_UNSUPPORTED = $8010001A;
  260. //
  261. // MessageId: SCARD_E_DUPLICATE_READER
  262. //
  263. // MessageText:
  264. //
  265. // The reader driver did not produce a unique reader name.
  266. //
  267. SCARD_E_DUPLICATE_READER = $8010001B;
  268. //
  269. // MessageId: SCARD_E_CARD_UNSUPPORTED
  270. //
  271. // MessageText:
  272. //
  273. // The smart card does not meet minimal requirements for support.
  274. //
  275. SCARD_E_CARD_UNSUPPORTED = $8010001C;
  276. //
  277. // MessageId: SCARD_E_NO_SERVICE
  278. //
  279. // MessageText:
  280. //
  281. // The Smart card resource manager is not running.
  282. //
  283. SCARD_E_NO_SERVICE = $8010001D;
  284. //
  285. // MessageId: SCARD_E_SERVICE_STOPPED
  286. //
  287. // MessageText:
  288. //
  289. // The Smart card resource manager has shut down.
  290. //
  291. SCARD_E_SERVICE_STOPPED = $8010001E;
  292. //
  293. // MessageId: SCARD_E_UNEXPECTED
  294. //
  295. // MessageText:
  296. //
  297. // An unexpected card error has occurred.
  298. //
  299. SCARD_E_UNEXPECTED = $8010001F;
  300. //
  301. // MessageId: SCARD_E_ICC_INSTALLATION
  302. //
  303. // MessageText:
  304. //
  305. // No Primary Provider can be found for the smart card.
  306. //
  307. SCARD_E_ICC_INSTALLATION = $80100020;
  308. //
  309. // MessageId: SCARD_E_ICC_CREATEORDER
  310. //
  311. // MessageText:
  312. //
  313. // The requested order of object creation is not supported.
  314. //
  315. SCARD_E_ICC_CREATEORDER = $80100021;
  316. //
  317. // MessageId: SCARD_E_UNSUPPORTED_FEATURE
  318. //
  319. // MessageText:
  320. //
  321. // This smart card does not support the requested feature.
  322. //
  323. SCARD_E_UNSUPPORTED_FEATURE = $80100022;
  324. //
  325. // MessageId: SCARD_E_DIR_NOT_FOUND
  326. //
  327. // MessageText:
  328. //
  329. // The identified directory does not exist in the smart card.
  330. //
  331. SCARD_E_DIR_NOT_FOUND = $80100023;
  332. //
  333. // MessageId: SCARD_E_FILE_NOT_FOUND
  334. //
  335. // MessageText:
  336. //
  337. // The identified file does not exist in the smart card.
  338. //
  339. SCARD_E_FILE_NOT_FOUND = $80100024;
  340. //
  341. // MessageId: SCARD_E_NO_DIR
  342. //
  343. // MessageText:
  344. //
  345. // The supplied path does not represent a smart card directory.
  346. //
  347. SCARD_E_NO_DIR = $80100025;
  348. //
  349. // MessageId: SCARD_E_NO_FILE
  350. //
  351. // MessageText:
  352. //
  353. // The supplied path does not represent a smart card file.
  354. //
  355. SCARD_E_NO_FILE = $80100026;
  356. //
  357. // MessageId: SCARD_E_NO_ACCESS
  358. //
  359. // MessageText:
  360. //
  361. // Access is denied to this file.
  362. //
  363. SCARD_E_NO_ACCESS = $80100027;
  364. //
  365. // MessageId: SCARD_E_WRITE_TOO_MANY
  366. //
  367. // MessageText:
  368. //
  369. // The smartcard does not have enough memory to store the information.
  370. //
  371. SCARD_E_WRITE_TOO_MANY = $80100028;
  372. //
  373. // MessageId: SCARD_E_BAD_SEEK
  374. //
  375. // MessageText:
  376. //
  377. // There was an error trying to set the smart card file object pointer.
  378. //
  379. SCARD_E_BAD_SEEK = $80100029;
  380. //
  381. // MessageId: SCARD_E_INVALID_CHV
  382. //
  383. // MessageText:
  384. //
  385. // The supplied PIN is incorrect.
  386. //
  387. SCARD_E_INVALID_CHV = $8010002A;
  388. //
  389. // MessageId: SCARD_E_UNKNOWN_RES_MNG
  390. //
  391. // MessageText:
  392. //
  393. // An unrecognized error code was returned from a layered component.
  394. //
  395. SCARD_E_UNKNOWN_RES_MNG = $8010002B;
  396. //
  397. // MessageId: SCARD_E_NO_SUCH_CERTIFICATE
  398. //
  399. // MessageText:
  400. //
  401. // The requested certificate does not exist.
  402. //
  403. SCARD_E_NO_SUCH_CERTIFICATE = $8010002C;
  404. //
  405. // MessageId: SCARD_E_CERTIFICATE_UNAVAILABLE
  406. //
  407. // MessageText:
  408. //
  409. // The requested certificate could not be obtained.
  410. //
  411. SCARD_E_CERTIFICATE_UNAVAILABLE = $8010002D;
  412. //
  413. // MessageId: SCARD_E_NO_READERS_AVAILABLE
  414. //
  415. // MessageText:
  416. //
  417. // Cannot find a smart card reader.
  418. //
  419. SCARD_E_NO_READERS_AVAILABLE = $8010002E;
  420. //
  421. // MessageId: SCARD_E_COMM_DATA_LOST
  422. //
  423. // MessageText:
  424. //
  425. // A communications error with the smart card has been detected. Retry the operation.
  426. //
  427. SCARD_E_COMM_DATA_LOST = $8010002F;
  428. //
  429. // MessageId: SCARD_E_NO_KEY_CONTAINER
  430. //
  431. // MessageText:
  432. //
  433. // The requested key container does not exist on the smart card.
  434. //
  435. SCARD_E_NO_KEY_CONTAINER = $80100030;
  436. //
  437. // MessageId: SCARD_E_SERVER_TOO_BUSY
  438. //
  439. // MessageText:
  440. //
  441. // The Smart card resource manager is too busy to complete this operation.
  442. //
  443. SCARD_E_SERVER_TOO_BUSY = $80100031;
  444. //
  445. // These are warning codes.
  446. //
  447. //
  448. // MessageId: SCARD_W_UNSUPPORTED_CARD
  449. //
  450. // MessageText:
  451. //
  452. // The reader cannot communicate with the smart card, due to ATR configuration conflicts.
  453. //
  454. SCARD_W_UNSUPPORTED_CARD = $80100065;
  455. //
  456. // MessageId: SCARD_W_UNRESPONSIVE_CARD
  457. //
  458. // MessageText:
  459. //
  460. // The smart card is not responding to a reset.
  461. //
  462. SCARD_W_UNRESPONSIVE_CARD = $80100066;
  463. //
  464. // MessageId: SCARD_W_UNPOWERED_CARD
  465. //
  466. // MessageText:
  467. //
  468. // Power has been removed from the smart card, so that further communication is not possible.
  469. //
  470. SCARD_W_UNPOWERED_CARD = $80100067;
  471. //
  472. // MessageId: SCARD_W_RESET_CARD
  473. //
  474. // MessageText:
  475. //
  476. // The smart card has been reset, so any shared state information is invalid.
  477. //
  478. SCARD_W_RESET_CARD = $80100068;
  479. //
  480. // MessageId: SCARD_W_REMOVED_CARD
  481. //
  482. // MessageText:
  483. //
  484. // The smart card has been removed, so that further communication is not possible.
  485. //
  486. SCARD_W_REMOVED_CARD = $80100069;
  487. //
  488. // MessageId: SCARD_W_SECURITY_VIOLATION
  489. //
  490. // MessageText:
  491. //
  492. // Access was denied because of a security violation.
  493. //
  494. SCARD_W_SECURITY_VIOLATION = $8010006A;
  495. //
  496. // MessageId: SCARD_W_WRONG_CHV
  497. //
  498. // MessageText:
  499. //
  500. // The card cannot be accessed because the wrong PIN was presented.
  501. //
  502. SCARD_W_WRONG_CHV = $8010006B;
  503. //
  504. // MessageId: SCARD_W_CHV_BLOCKED
  505. //
  506. // MessageText:
  507. //
  508. // The card cannot be accessed because the maximum number of PIN entry attempts has been reached.
  509. //
  510. SCARD_W_CHV_BLOCKED = $8010006C;
  511. //
  512. // MessageId: SCARD_W_EOF
  513. //
  514. // MessageText:
  515. //
  516. // The end of the smart card file has been reached.
  517. //
  518. SCARD_W_EOF = $8010006D;
  519. //
  520. // MessageId: SCARD_W_CANCELLED_BY_USER
  521. //
  522. // MessageText:
  523. //
  524. // The action was cancelled by the user.
  525. //
  526. SCARD_W_CANCELLED_BY_USER = $8010006E;
  527. //
  528. // MessageId: SCARD_W_CARD_NOT_AUTHENTICATED
  529. //
  530. // MessageText:
  531. //
  532. // No PIN was presented to the smart card.
  533. //
  534. SCARD_W_CARD_NOT_AUTHENTICATED = $8010006F;
  535. implementation
  536. end.