jwacarderr.pas 13 KB

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