home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / scarderr.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  8KB  |  372 lines

  1. /*
  2.  scarderr.mc
  3.  
  4.    Error message codes from the Smart Card Resource Manager
  5.    These messages must be reconciled with winerror.w
  6.  
  7.    30-Jun-97 - DBarlow Created.  */
  8. #ifndef SCARD_S_SUCCESS
  9. //
  10. // =============================
  11. // Facility SCARD Error Messages
  12. // =============================
  13. //
  14. #define SCARD_S_SUCCESS NO_ERROR
  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. #define FACILITY_SYSTEM                  0x0
  45. #define FACILITY_SCARD                   0x10
  46.  
  47.  
  48. //
  49. // Define the severity codes
  50. //
  51.  
  52.  
  53. //
  54. // MessageId: SCARD_F_INTERNAL_ERROR
  55. //
  56. // MessageText:
  57. //
  58. //  An internal consistency check failed
  59. //
  60. #define SCARD_F_INTERNAL_ERROR           ((DWORD)0x80100001L)
  61.  
  62. //
  63. // MessageId: SCARD_E_CANCELLED
  64. //
  65. // MessageText:
  66. //
  67. //  The action was cancelled by an SCardCancel request
  68. //
  69. #define SCARD_E_CANCELLED                ((DWORD)0x80100002L)
  70.  
  71. //
  72. // MessageId: SCARD_E_INVALID_HANDLE
  73. //
  74. // MessageText:
  75. //
  76. //  The supplied handle was invalid
  77. //
  78. #define SCARD_E_INVALID_HANDLE           ((DWORD)0x80100003L)
  79.  
  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. #define SCARD_E_INVALID_PARAMETER        ((DWORD)0x80100004L)
  88.  
  89. //
  90. // MessageId: SCARD_E_INVALID_TARGET
  91. //
  92. // MessageText:
  93. //
  94. //  Registry startup information is missing or invalid
  95. //
  96. #define SCARD_E_INVALID_TARGET           ((DWORD)0x80100005L)
  97.  
  98. //
  99. // MessageId: SCARD_E_NO_MEMORY
  100. //
  101. // MessageText:
  102. //
  103. //  Not enough memory available to complete this command
  104. //
  105. #define SCARD_E_NO_MEMORY                ((DWORD)0x80100006L)
  106.  
  107. //
  108. // MessageId: SCARD_F_WAITED_TOO_LONG
  109. //
  110. // MessageText:
  111. //
  112. //  An internal consistency timer has expired
  113. //
  114. #define SCARD_F_WAITED_TOO_LONG          ((DWORD)0x80100007L)
  115.  
  116. //
  117. // MessageId: SCARD_E_INSUFFICIENT_BUFFER
  118. //
  119. // MessageText:
  120. //
  121. //  The data buffer to receive returned data is too small for the returned data
  122. //
  123. #define SCARD_E_INSUFFICIENT_BUFFER      ((DWORD)0x80100008L)
  124.  
  125. //
  126. // MessageId: SCARD_E_UNKNOWN_READER
  127. //
  128. // MessageText:
  129. //
  130. //  The specified reader name is not recognized
  131. //
  132. #define SCARD_E_UNKNOWN_READER           ((DWORD)0x80100009L)
  133.  
  134. //
  135. // MessageId: SCARD_E_TIMEOUT
  136. //
  137. // MessageText:
  138. //
  139. //  The user-specified timeout value has expired
  140. //
  141. #define SCARD_E_TIMEOUT                  ((DWORD)0x8010000AL)
  142.  
  143. //
  144. // MessageId: SCARD_E_SHARING_VIOLATION
  145. //
  146. // MessageText:
  147. //
  148. //  The smart card cannot be accessed because of other connections outstanding
  149. //
  150. #define SCARD_E_SHARING_VIOLATION        ((DWORD)0x8010000BL)
  151.  
  152. //
  153. // MessageId: SCARD_E_NO_SMARTCARD
  154. //
  155. // MessageText:
  156. //
  157. //  The operation requires a Smart Card, but no Smart Card is currently in the device
  158. //
  159. #define SCARD_E_NO_SMARTCARD             ((DWORD)0x8010000CL)
  160.  
  161. //
  162. // MessageId: SCARD_E_UNKNOWN_CARD
  163. //
  164. // MessageText:
  165. //
  166. //  The specified smart card name is not recognized
  167. //
  168. #define SCARD_E_UNKNOWN_CARD             ((DWORD)0x8010000DL)
  169.  
  170. //
  171. // MessageId: SCARD_E_CANT_DISPOSE
  172. //
  173. // MessageText:
  174. //
  175. //  The system could not dispose of the media in the requested manner
  176. //
  177. #define SCARD_E_CANT_DISPOSE             ((DWORD)0x8010000EL)
  178.  
  179. //
  180. // MessageId: SCARD_E_PROTO_MISMATCH
  181. //
  182. // MessageText:
  183. //
  184. //  The requested protocols are incompatible with the protocol currently in use with the smart card
  185. //
  186. #define SCARD_E_PROTO_MISMATCH           ((DWORD)0x8010000FL)
  187.  
  188. //
  189. // MessageId: SCARD_E_NOT_READY
  190. //
  191. // MessageText:
  192. //
  193. //  The reader or smart card is not ready to accept commands
  194. //
  195. #define SCARD_E_NOT_READY                ((DWORD)0x80100010L)
  196.  
  197. //
  198. // MessageId: SCARD_E_INVALID_VALUE
  199. //
  200. // MessageText:
  201. //
  202. //  One or more of the supplied parameters values could not be properly interpreted
  203. //
  204. #define SCARD_E_INVALID_VALUE            ((DWORD)0x80100011L)
  205.  
  206. //
  207. // MessageId: SCARD_E_SYSTEM_CANCELLED
  208. //
  209. // MessageText:
  210. //
  211. //  The action was cancelled by the system, presumably to log off or shut down
  212. //
  213. #define SCARD_E_SYSTEM_CANCELLED         ((DWORD)0x80100012L)
  214.  
  215. //
  216. // MessageId: SCARD_F_COMM_ERROR
  217. //
  218. // MessageText:
  219. //
  220. //  An internal communications error has been detected
  221. //
  222. #define SCARD_F_COMM_ERROR               ((DWORD)0x80100013L)
  223.  
  224. //
  225. // MessageId: SCARD_F_UNKNOWN_ERROR
  226. //
  227. // MessageText:
  228. //
  229. //  An internal error has been detected, but the source is unknown
  230. //
  231. #define SCARD_F_UNKNOWN_ERROR            ((DWORD)0x80100014L)
  232.  
  233. //
  234. // MessageId: SCARD_E_INVALID_ATR
  235. //
  236. // MessageText:
  237. //
  238. //  An ATR obtained from the registry is not a valid ATR string
  239. //
  240. #define SCARD_E_INVALID_ATR              ((DWORD)0x80100015L)
  241.  
  242. //
  243. // MessageId: SCARD_E_NOT_TRANSACTED
  244. //
  245. // MessageText:
  246. //
  247. //  An attempt was made to end a non-existent transaction
  248. //
  249. #define SCARD_E_NOT_TRANSACTED           ((DWORD)0x80100016L)
  250.  
  251. //
  252. // MessageId: SCARD_E_READER_UNAVAILABLE
  253. //
  254. // MessageText:
  255. //
  256. //  The specified reader is not currently available for use
  257. //
  258. #define SCARD_E_READER_UNAVAILABLE       ((DWORD)0x80100017L)
  259.  
  260. //
  261. // MessageId: SCARD_P_SHUTDOWN
  262. //
  263. // MessageText:
  264. //
  265. //  PRIVATE -- Internal flag to force server termination
  266. //
  267. #define SCARD_P_SHUTDOWN                 ((DWORD)0x80100018L)
  268.  
  269. //
  270. // MessageId: SCARD_E_PCI_TOO_SMALL
  271. //
  272. // MessageText:
  273. //
  274. //  The PCI Receive buffer was too small
  275. //
  276. #define SCARD_E_PCI_TOO_SMALL            ((DWORD)0x80100019L)
  277.  
  278. //
  279. // MessageId: SCARD_E_READER_UNSUPPORTED
  280. //
  281. // MessageText:
  282. //
  283. //  The reader driver does not meet minimal requirements for support
  284. //
  285. #define SCARD_E_READER_UNSUPPORTED       ((DWORD)0x8010001AL)
  286.  
  287. //
  288. // MessageId: SCARD_E_DUPLICATE_READER
  289. //
  290. // MessageText:
  291. //
  292. //  The reader driver did not produce a unique reader name
  293. //
  294. #define SCARD_E_DUPLICATE_READER         ((DWORD)0x8010001BL)
  295.  
  296. //
  297. // MessageId: SCARD_E_CARD_UNSUPPORTED
  298. //
  299. // MessageText:
  300. //
  301. //  The smart card does not meet minimal requirements for support
  302. //
  303. #define SCARD_E_CARD_UNSUPPORTED         ((DWORD)0x8010001CL)
  304.  
  305. //
  306. // MessageId: SCARD_E_NO_SERVICE
  307. //
  308. // MessageText:
  309. //
  310. //  The Smart card resource manager is not running
  311. //
  312. #define SCARD_E_NO_SERVICE               ((DWORD)0x8010001DL)
  313.  
  314. //
  315. // MessageId: SCARD_E_SERVICE_STOPPED
  316. //
  317. // MessageText:
  318. //
  319. //  The Smart card resource manager has shut down
  320. //
  321. #define SCARD_E_SERVICE_STOPPED          ((DWORD)0x8010001EL)
  322.  
  323. //
  324. // These are resettable warning codes.
  325. //
  326. //
  327. // MessageId: SCARD_W_UNSUPPORTED_CARD
  328. //
  329. // MessageText:
  330. //
  331. //  The reader cannot communicate with the smart card, due to ATR configuration conflicts
  332. //
  333. #define SCARD_W_UNSUPPORTED_CARD         ((DWORD)0x80100065L)
  334.  
  335. //
  336. // MessageId: SCARD_W_UNRESPONSIVE_CARD
  337. //
  338. // MessageText:
  339. //
  340. //  The smart card is not responding to a reset
  341. //
  342. #define SCARD_W_UNRESPONSIVE_CARD        ((DWORD)0x80100066L)
  343.  
  344. //
  345. // MessageId: SCARD_W_UNPOWERED_CARD
  346. //
  347. // MessageText:
  348. //
  349. //  Power has been removed from the smart card, so that further communication is not possible
  350. //
  351. #define SCARD_W_UNPOWERED_CARD           ((DWORD)0x80100067L)
  352.  
  353. //
  354. // MessageId: SCARD_W_RESET_CARD
  355. //
  356. // MessageText:
  357. //
  358. //  The smart card has been reset, so any shared state information is invalid
  359. //
  360. #define SCARD_W_RESET_CARD               ((DWORD)0x80100068L)
  361.  
  362. //
  363. // MessageId: SCARD_W_REMOVED_CARD
  364. //
  365. // MessageText:
  366. //
  367. //  The smart card has been removed, so that further communication is not possible
  368. //
  369. #define SCARD_W_REMOVED_CARD             ((DWORD)0x80100069L)
  370.  
  371. #endif // SCARD_S_SUCCESS
  372.