jwacarderr.pas 13 KB

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