jwaissper16.pas 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  1. {******************************************************************************}
  2. { }
  3. { Security Package Error Codes API interface Unit for Object Pascal }
  4. { }
  5. { Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
  6. { Corporation. All Rights Reserved. }
  7. { }
  8. { The original file is: issper16.h, released June 2000. The original Pascal }
  9. { code is: IssPer16.pas, released December 2000. The initial developer of the }
  10. { Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
  11. { }
  12. { Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
  13. { Marcel van Brakel. All Rights Reserved. }
  14. { }
  15. { Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
  16. { }
  17. { You may retrieve the latest version of this file at the Project JEDI }
  18. { APILIB home page, located at http://jedi-apilib.sourceforge.net }
  19. { }
  20. { The contents of this file are used with permission, subject to the Mozilla }
  21. { Public License Version 1.1 (the "License"); you may not use this file except }
  22. { in compliance with the License. You may obtain a copy of the License at }
  23. { http://www.mozilla.org/MPL/MPL-1.1.html }
  24. { }
  25. { Software distributed under the License is distributed on an "AS IS" basis, }
  26. { WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
  27. { the specific language governing rights and limitations under the License. }
  28. { }
  29. { Alternatively, the contents of this file may be used under the terms of the }
  30. { GNU Lesser General Public License (the "LGPL License"), in which case the }
  31. { provisions of the LGPL License are applicable instead of those above. }
  32. { If you wish to allow use of your version of this file only under the terms }
  33. { of the LGPL License and not to allow others to use your version of this file }
  34. { under the MPL, indicate your decision by deleting the provisions above and }
  35. { replace them with the notice and other provisions required by the LGPL }
  36. { License. If you do not delete the provisions above, a recipient may use }
  37. { your version of this file under either the MPL or the LGPL License. }
  38. { }
  39. { For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
  40. { }
  41. {******************************************************************************}
  42. // $Id: JwaIssPer16.pas,v 1.5 2004/12/08 08:18:36 marquardt Exp $
  43. unit JwaIssPer16;
  44. {$WEAKPACKAGEUNIT}
  45. {$HPPEMIT ''}
  46. {$HPPEMIT '#include "issper16.h"'}
  47. {$HPPEMIT ''}
  48. {$I jediapilib.inc}
  49. interface
  50. uses
  51. JwaSSPI;
  52. // Define the severities
  53. //
  54. // Values are 32 bit values layed out as follows:
  55. //
  56. // 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
  57. // 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
  58. // +---+-+-+-----------------------+-------------------------------+
  59. // |Sev|C|R| Facility | Code |
  60. // +---+-+-+-----------------------+-------------------------------+
  61. //
  62. // where
  63. //
  64. // Sev - is the severity code
  65. //
  66. // 00 - Success
  67. // 01 - Informational
  68. // 10 - Warning
  69. // 11 - Error
  70. //
  71. // C - is the Customer code flag
  72. //
  73. // R - is a reserved bit
  74. //
  75. // Facility - is the facility code
  76. //
  77. // Code - is the facility's status code
  78. //
  79. //
  80. // Define the facility codes
  81. //
  82. const
  83. FACILITY_SECURITY = $9;
  84. {$EXTERNALSYM FACILITY_SECURITY}
  85. FACILITY_NULL = 0;
  86. {$EXTERNALSYM FACILITY_NULL}
  87. //
  88. // Define the severity codes
  89. //
  90. STATUS_SEVERITY_SUCCESS = $0;
  91. {$EXTERNALSYM STATUS_SEVERITY_SUCCESS}
  92. STATUS_SEVERITY_COERROR = $2;
  93. {$EXTERNALSYM STATUS_SEVERITY_COERROR}
  94. //
  95. // MessageId: SEC_E_INSUFFICIENT_MEMORY
  96. //
  97. // MessageText:
  98. //
  99. // Not enough memory is available to complete this request
  100. //
  101. SEC_E_INSUFFICIENT_MEMORY = SECURITY_STATUS($1300);
  102. {$EXTERNALSYM SEC_E_INSUFFICIENT_MEMORY}
  103. //
  104. // MessageId: SEC_E_INVALID_HANDLE
  105. //
  106. // MessageText:
  107. //
  108. // The handle specified is invalid
  109. //
  110. SEC_E_INVALID_HANDLE = SECURITY_STATUS($1301);
  111. {$EXTERNALSYM SEC_E_INVALID_HANDLE}
  112. //
  113. // MessageId: SEC_E_UNSUPPORTED_FUNCTION
  114. //
  115. // MessageText:
  116. //
  117. // The function requested is not supported
  118. //
  119. SEC_E_UNSUPPORTED_FUNCTION = SECURITY_STATUS($1302);
  120. {$EXTERNALSYM SEC_E_UNSUPPORTED_FUNCTION}
  121. //
  122. // MessageId: SEC_E_TARGET_UNKNOWN
  123. //
  124. // MessageText:
  125. //
  126. // The specified target is unknown or unreachable
  127. //
  128. SEC_E_TARGET_UNKNOWN = SECURITY_STATUS($1303);
  129. {$EXTERNALSYM SEC_E_TARGET_UNKNOWN}
  130. //
  131. // MessageId: SEC_E_INTERNAL_ERROR
  132. //
  133. // MessageText:
  134. //
  135. // The Local Security Authority cannot be contacted
  136. //
  137. SEC_E_INTERNAL_ERROR = SECURITY_STATUS($1304);
  138. {$EXTERNALSYM SEC_E_INTERNAL_ERROR}
  139. //
  140. // MessageId: SEC_E_SECPKG_NOT_FOUND
  141. //
  142. // MessageText:
  143. //
  144. // The requested security package does not exist
  145. //
  146. SEC_E_SECPKG_NOT_FOUND = SECURITY_STATUS($1305);
  147. {$EXTERNALSYM SEC_E_SECPKG_NOT_FOUND}
  148. //
  149. // MessageId: SEC_E_NOT_OWNER
  150. //
  151. // MessageText:
  152. //
  153. // The caller is not the owner of the desired credentials
  154. //
  155. SEC_E_NOT_OWNER = SECURITY_STATUS($1306);
  156. {$EXTERNALSYM SEC_E_NOT_OWNER}
  157. //
  158. // MessageId: SEC_E_CANNOT_INSTALL
  159. //
  160. // MessageText:
  161. //
  162. // The security package failed to initialize, and cannot be installed
  163. //
  164. SEC_E_CANNOT_INSTALL = SECURITY_STATUS($1307);
  165. {$EXTERNALSYM SEC_E_CANNOT_INSTALL}
  166. //
  167. // MessageId: SEC_E_INVALID_TOKEN
  168. //
  169. // MessageText:
  170. //
  171. // The token supplied to the function is invalid
  172. //
  173. SEC_E_INVALID_TOKEN = SECURITY_STATUS($1308);
  174. {$EXTERNALSYM SEC_E_INVALID_TOKEN}
  175. //
  176. // MessageId: SEC_E_CANNOT_PACK
  177. //
  178. // MessageText:
  179. //
  180. // The security package is not able to marshall the logon buffer,
  181. // so the logon attempt has failed
  182. //
  183. SEC_E_CANNOT_PACK = SECURITY_STATUS($1309);
  184. {$EXTERNALSYM SEC_E_CANNOT_PACK}
  185. //
  186. // MessageId: SEC_E_QOP_NOT_SUPPORTED
  187. //
  188. // MessageText:
  189. //
  190. // The per-message Quality of Protection is not supported by the
  191. // security package
  192. //
  193. SEC_E_QOP_NOT_SUPPORTED = SECURITY_STATUS($130A);
  194. {$EXTERNALSYM SEC_E_QOP_NOT_SUPPORTED}
  195. //
  196. // MessageId: SEC_E_NO_IMPERSONATION
  197. //
  198. // MessageText:
  199. //
  200. // The security context does not allow impersonation of the client
  201. //
  202. SEC_E_NO_IMPERSONATION = SECURITY_STATUS($130B);
  203. {$EXTERNALSYM SEC_E_NO_IMPERSONATION}
  204. //
  205. // MessageId: SEC_E_LOGON_DENIED
  206. //
  207. // MessageText:
  208. //
  209. // The logon attempt failed
  210. //
  211. SEC_E_LOGON_DENIED = SECURITY_STATUS($130C);
  212. {$EXTERNALSYM SEC_E_LOGON_DENIED}
  213. //
  214. // MessageId: SEC_E_UNKNOWN_CREDENTIALS
  215. //
  216. // MessageText:
  217. //
  218. // The credentials supplied to the package were not
  219. // recognized
  220. //
  221. SEC_E_UNKNOWN_CREDENTIALS = SECURITY_STATUS($130D);
  222. {$EXTERNALSYM SEC_E_UNKNOWN_CREDENTIALS}
  223. //
  224. // MessageId: SEC_E_NO_CREDENTIALS
  225. //
  226. // MessageText:
  227. //
  228. // No credentials are available in the security package
  229. //
  230. SEC_E_NO_CREDENTIALS = SECURITY_STATUS($130E);
  231. {$EXTERNALSYM SEC_E_NO_CREDENTIALS}
  232. //
  233. // MessageId: SEC_E_MESSAGE_ALTERED
  234. //
  235. // MessageText:
  236. //
  237. // The message supplied for verification has been altered
  238. //
  239. SEC_E_MESSAGE_ALTERED = SECURITY_STATUS($130F);
  240. {$EXTERNALSYM SEC_E_MESSAGE_ALTERED}
  241. //
  242. // MessageId: SEC_E_OUT_OF_SEQUENCE
  243. //
  244. // MessageText:
  245. //
  246. // The message supplied for verification is out of sequence
  247. //
  248. SEC_E_OUT_OF_SEQUENCE = SECURITY_STATUS($1310);
  249. {$EXTERNALSYM SEC_E_OUT_OF_SEQUENCE}
  250. //
  251. // MessageId: SEC_E_NO_AUTHENTICATING_AUTHORITY
  252. //
  253. // MessageText:
  254. //
  255. // No authority could be contacted for authentication.
  256. //
  257. SEC_E_NO_AUTHENTICATING_AUTHORITY = SECURITY_STATUS($1311);
  258. {$EXTERNALSYM SEC_E_NO_AUTHENTICATING_AUTHORITY}
  259. // MessageId: SEC_E_CONTEXT_EXPIRED
  260. //
  261. // MessageText:
  262. //
  263. // The context has expired and can no longer be used.
  264. //
  265. SEC_E_CONTEXT_EXPIRED = SECURITY_STATUS($1312);
  266. {$EXTERNALSYM SEC_E_CONTEXT_EXPIRED}
  267. //
  268. // MessageId: SEC_E_INCOMPLETE_MESSAGE
  269. //
  270. // MessageText:
  271. //
  272. // The supplied message is incomplete. The signature was not verified.
  273. //
  274. SEC_E_INCOMPLETE_MESSAGE = SECURITY_STATUS($1313);
  275. {$EXTERNALSYM SEC_E_INCOMPLETE_MESSAGE}
  276. //
  277. // MessageId: SEC_I_CONTINUE_NEEDED
  278. //
  279. // MessageText:
  280. //
  281. // The function completed successfully, but must be called
  282. // again to complete the context
  283. //
  284. SEC_I_CONTINUE_NEEDED = SECURITY_STATUS($1012);
  285. {$EXTERNALSYM SEC_I_CONTINUE_NEEDED}
  286. //
  287. // MessageId: SEC_I_COMPLETE_NEEDED
  288. //
  289. // MessageText:
  290. //
  291. // The function completed successfully, but CompleteToken
  292. // must be called
  293. //
  294. SEC_I_COMPLETE_NEEDED = SECURITY_STATUS($1013);
  295. {$EXTERNALSYM SEC_I_COMPLETE_NEEDED}
  296. //
  297. // MessageId: SEC_I_COMPLETE_AND_CONTINUE
  298. //
  299. // MessageText:
  300. //
  301. // The function completed successfully, but both CompleteToken
  302. // and this function must be called to complete the context
  303. //
  304. SEC_I_COMPLETE_AND_CONTINUE = SECURITY_STATUS($1014);
  305. {$EXTERNALSYM SEC_I_COMPLETE_AND_CONTINUE}
  306. //
  307. // MessageId: SEC_I_LOCAL_LOGON
  308. //
  309. // MessageText:
  310. //
  311. // The logon was completed, but no network authority was
  312. // available. The logon was made using locally known information
  313. //
  314. SEC_I_LOCAL_LOGON = SECURITY_STATUS($1015);
  315. {$EXTERNALSYM SEC_I_LOCAL_LOGON}
  316. //
  317. // MessageId: SEC_E_OK
  318. //
  319. // MessageText:
  320. //
  321. // Call completed successfully
  322. //
  323. SEC_E_OK = SECURITY_STATUS($0000);
  324. {$EXTERNALSYM SEC_E_OK}
  325. //
  326. // Older error names for backwards compatibility
  327. //
  328. SEC_E_NOT_SUPPORTED = SEC_E_UNSUPPORTED_FUNCTION;
  329. {$EXTERNALSYM SEC_E_NOT_SUPPORTED}
  330. SEC_E_NO_SPM = SEC_E_INTERNAL_ERROR;
  331. {$EXTERNALSYM SEC_E_NO_SPM}
  332. SEC_E_BAD_PKGID = SEC_E_SECPKG_NOT_FOUND;
  333. {$EXTERNALSYM SEC_E_BAD_PKGID}
  334. implementation
  335. end.