2
0

jwaissper16.pas 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  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. unit JwaIssPer16;
  43. {$WEAKPACKAGEUNIT}
  44. {$HPPEMIT ''}
  45. {$HPPEMIT '#include "issper16.h"'}
  46. {$HPPEMIT ''}
  47. {$I jediapilib.inc}
  48. interface
  49. uses
  50. JwaSSPI;
  51. // Define the severities
  52. //
  53. // Values are 32 bit values layed out as follows:
  54. //
  55. // 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
  56. // 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
  57. // +---+-+-+-----------------------+-------------------------------+
  58. // |Sev|C|R| Facility | Code |
  59. // +---+-+-+-----------------------+-------------------------------+
  60. //
  61. // where
  62. //
  63. // Sev - is the severity code
  64. //
  65. // 00 - Success
  66. // 01 - Informational
  67. // 10 - Warning
  68. // 11 - Error
  69. //
  70. // C - is the Customer code flag
  71. //
  72. // R - is a reserved bit
  73. //
  74. // Facility - is the facility code
  75. //
  76. // Code - is the facility's status code
  77. //
  78. //
  79. // Define the facility codes
  80. //
  81. const
  82. FACILITY_SECURITY = $9;
  83. {$EXTERNALSYM FACILITY_SECURITY}
  84. FACILITY_NULL = 0;
  85. {$EXTERNALSYM FACILITY_NULL}
  86. //
  87. // Define the severity codes
  88. //
  89. STATUS_SEVERITY_SUCCESS = $0;
  90. {$EXTERNALSYM STATUS_SEVERITY_SUCCESS}
  91. STATUS_SEVERITY_COERROR = $2;
  92. {$EXTERNALSYM STATUS_SEVERITY_COERROR}
  93. //
  94. // MessageId: SEC_E_INSUFFICIENT_MEMORY
  95. //
  96. // MessageText:
  97. //
  98. // Not enough memory is available to complete this request
  99. //
  100. SEC_E_INSUFFICIENT_MEMORY = SECURITY_STATUS($1300);
  101. {$EXTERNALSYM SEC_E_INSUFFICIENT_MEMORY}
  102. //
  103. // MessageId: SEC_E_INVALID_HANDLE
  104. //
  105. // MessageText:
  106. //
  107. // The handle specified is invalid
  108. //
  109. SEC_E_INVALID_HANDLE = SECURITY_STATUS($1301);
  110. {$EXTERNALSYM SEC_E_INVALID_HANDLE}
  111. //
  112. // MessageId: SEC_E_UNSUPPORTED_FUNCTION
  113. //
  114. // MessageText:
  115. //
  116. // The function requested is not supported
  117. //
  118. SEC_E_UNSUPPORTED_FUNCTION = SECURITY_STATUS($1302);
  119. {$EXTERNALSYM SEC_E_UNSUPPORTED_FUNCTION}
  120. //
  121. // MessageId: SEC_E_TARGET_UNKNOWN
  122. //
  123. // MessageText:
  124. //
  125. // The specified target is unknown or unreachable
  126. //
  127. SEC_E_TARGET_UNKNOWN = SECURITY_STATUS($1303);
  128. {$EXTERNALSYM SEC_E_TARGET_UNKNOWN}
  129. //
  130. // MessageId: SEC_E_INTERNAL_ERROR
  131. //
  132. // MessageText:
  133. //
  134. // The Local Security Authority cannot be contacted
  135. //
  136. SEC_E_INTERNAL_ERROR = SECURITY_STATUS($1304);
  137. {$EXTERNALSYM SEC_E_INTERNAL_ERROR}
  138. //
  139. // MessageId: SEC_E_SECPKG_NOT_FOUND
  140. //
  141. // MessageText:
  142. //
  143. // The requested security package does not exist
  144. //
  145. SEC_E_SECPKG_NOT_FOUND = SECURITY_STATUS($1305);
  146. {$EXTERNALSYM SEC_E_SECPKG_NOT_FOUND}
  147. //
  148. // MessageId: SEC_E_NOT_OWNER
  149. //
  150. // MessageText:
  151. //
  152. // The caller is not the owner of the desired credentials
  153. //
  154. SEC_E_NOT_OWNER = SECURITY_STATUS($1306);
  155. {$EXTERNALSYM SEC_E_NOT_OWNER}
  156. //
  157. // MessageId: SEC_E_CANNOT_INSTALL
  158. //
  159. // MessageText:
  160. //
  161. // The security package failed to initialize, and cannot be installed
  162. //
  163. SEC_E_CANNOT_INSTALL = SECURITY_STATUS($1307);
  164. {$EXTERNALSYM SEC_E_CANNOT_INSTALL}
  165. //
  166. // MessageId: SEC_E_INVALID_TOKEN
  167. //
  168. // MessageText:
  169. //
  170. // The token supplied to the function is invalid
  171. //
  172. SEC_E_INVALID_TOKEN = SECURITY_STATUS($1308);
  173. {$EXTERNALSYM SEC_E_INVALID_TOKEN}
  174. //
  175. // MessageId: SEC_E_CANNOT_PACK
  176. //
  177. // MessageText:
  178. //
  179. // The security package is not able to marshall the logon buffer,
  180. // so the logon attempt has failed
  181. //
  182. SEC_E_CANNOT_PACK = SECURITY_STATUS($1309);
  183. {$EXTERNALSYM SEC_E_CANNOT_PACK}
  184. //
  185. // MessageId: SEC_E_QOP_NOT_SUPPORTED
  186. //
  187. // MessageText:
  188. //
  189. // The per-message Quality of Protection is not supported by the
  190. // security package
  191. //
  192. SEC_E_QOP_NOT_SUPPORTED = SECURITY_STATUS($130A);
  193. {$EXTERNALSYM SEC_E_QOP_NOT_SUPPORTED}
  194. //
  195. // MessageId: SEC_E_NO_IMPERSONATION
  196. //
  197. // MessageText:
  198. //
  199. // The security context does not allow impersonation of the client
  200. //
  201. SEC_E_NO_IMPERSONATION = SECURITY_STATUS($130B);
  202. {$EXTERNALSYM SEC_E_NO_IMPERSONATION}
  203. //
  204. // MessageId: SEC_E_LOGON_DENIED
  205. //
  206. // MessageText:
  207. //
  208. // The logon attempt failed
  209. //
  210. SEC_E_LOGON_DENIED = SECURITY_STATUS($130C);
  211. {$EXTERNALSYM SEC_E_LOGON_DENIED}
  212. //
  213. // MessageId: SEC_E_UNKNOWN_CREDENTIALS
  214. //
  215. // MessageText:
  216. //
  217. // The credentials supplied to the package were not
  218. // recognized
  219. //
  220. SEC_E_UNKNOWN_CREDENTIALS = SECURITY_STATUS($130D);
  221. {$EXTERNALSYM SEC_E_UNKNOWN_CREDENTIALS}
  222. //
  223. // MessageId: SEC_E_NO_CREDENTIALS
  224. //
  225. // MessageText:
  226. //
  227. // No credentials are available in the security package
  228. //
  229. SEC_E_NO_CREDENTIALS = SECURITY_STATUS($130E);
  230. {$EXTERNALSYM SEC_E_NO_CREDENTIALS}
  231. //
  232. // MessageId: SEC_E_MESSAGE_ALTERED
  233. //
  234. // MessageText:
  235. //
  236. // The message supplied for verification has been altered
  237. //
  238. SEC_E_MESSAGE_ALTERED = SECURITY_STATUS($130F);
  239. {$EXTERNALSYM SEC_E_MESSAGE_ALTERED}
  240. //
  241. // MessageId: SEC_E_OUT_OF_SEQUENCE
  242. //
  243. // MessageText:
  244. //
  245. // The message supplied for verification is out of sequence
  246. //
  247. SEC_E_OUT_OF_SEQUENCE = SECURITY_STATUS($1310);
  248. {$EXTERNALSYM SEC_E_OUT_OF_SEQUENCE}
  249. //
  250. // MessageId: SEC_E_NO_AUTHENTICATING_AUTHORITY
  251. //
  252. // MessageText:
  253. //
  254. // No authority could be contacted for authentication.
  255. //
  256. SEC_E_NO_AUTHENTICATING_AUTHORITY = SECURITY_STATUS($1311);
  257. {$EXTERNALSYM SEC_E_NO_AUTHENTICATING_AUTHORITY}
  258. // MessageId: SEC_E_CONTEXT_EXPIRED
  259. //
  260. // MessageText:
  261. //
  262. // The context has expired and can no longer be used.
  263. //
  264. SEC_E_CONTEXT_EXPIRED = SECURITY_STATUS($1312);
  265. {$EXTERNALSYM SEC_E_CONTEXT_EXPIRED}
  266. //
  267. // MessageId: SEC_E_INCOMPLETE_MESSAGE
  268. //
  269. // MessageText:
  270. //
  271. // The supplied message is incomplete. The signature was not verified.
  272. //
  273. SEC_E_INCOMPLETE_MESSAGE = SECURITY_STATUS($1313);
  274. {$EXTERNALSYM SEC_E_INCOMPLETE_MESSAGE}
  275. //
  276. // MessageId: SEC_I_CONTINUE_NEEDED
  277. //
  278. // MessageText:
  279. //
  280. // The function completed successfully, but must be called
  281. // again to complete the context
  282. //
  283. SEC_I_CONTINUE_NEEDED = SECURITY_STATUS($1012);
  284. {$EXTERNALSYM SEC_I_CONTINUE_NEEDED}
  285. //
  286. // MessageId: SEC_I_COMPLETE_NEEDED
  287. //
  288. // MessageText:
  289. //
  290. // The function completed successfully, but CompleteToken
  291. // must be called
  292. //
  293. SEC_I_COMPLETE_NEEDED = SECURITY_STATUS($1013);
  294. {$EXTERNALSYM SEC_I_COMPLETE_NEEDED}
  295. //
  296. // MessageId: SEC_I_COMPLETE_AND_CONTINUE
  297. //
  298. // MessageText:
  299. //
  300. // The function completed successfully, but both CompleteToken
  301. // and this function must be called to complete the context
  302. //
  303. SEC_I_COMPLETE_AND_CONTINUE = SECURITY_STATUS($1014);
  304. {$EXTERNALSYM SEC_I_COMPLETE_AND_CONTINUE}
  305. //
  306. // MessageId: SEC_I_LOCAL_LOGON
  307. //
  308. // MessageText:
  309. //
  310. // The logon was completed, but no network authority was
  311. // available. The logon was made using locally known information
  312. //
  313. SEC_I_LOCAL_LOGON = SECURITY_STATUS($1015);
  314. {$EXTERNALSYM SEC_I_LOCAL_LOGON}
  315. //
  316. // MessageId: SEC_E_OK
  317. //
  318. // MessageText:
  319. //
  320. // Call completed successfully
  321. //
  322. SEC_E_OK = SECURITY_STATUS($0000);
  323. {$EXTERNALSYM SEC_E_OK}
  324. //
  325. // Older error names for backwards compatibility
  326. //
  327. SEC_E_NOT_SUPPORTED = SEC_E_UNSUPPORTED_FUNCTION;
  328. {$EXTERNALSYM SEC_E_NOT_SUPPORTED}
  329. SEC_E_NO_SPM = SEC_E_INTERNAL_ERROR;
  330. {$EXTERNALSYM SEC_E_NO_SPM}
  331. SEC_E_BAD_PKGID = SEC_E_SECPKG_NOT_FOUND;
  332. {$EXTERNALSYM SEC_E_BAD_PKGID}
  333. implementation
  334. end.