Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

323 lines
12 KiB

  1. /*****************************************************************/
  2. /** Microsoft Windows for Workgroups **/
  3. /** Copyright (C) Microsoft Corp., 1993-1995 **/
  4. /*****************************************************************/
  5. /* NWERROR.H -- Return codes from NetWare API
  6. *
  7. * History:
  8. * 03/16/93 vlads Created
  9. * 12/15/94 vlads Renamed and cleaned up
  10. *
  11. */
  12. #ifndef _nwerror_h_
  13. #define _nwerror_h_
  14. typedef long int NW_STATUS;
  15. //
  16. // NDS errors are -ve, local and NW3 errors are +ve
  17. //
  18. typedef long NDS_RETURN_CODE;
  19. /*
  20. * Bindery compatible error codes
  21. */
  22. #define NWSC_BAD_STATION_NUMBER 0xFD
  23. #define NWSC_NO_SUCH_OBJECT 0xFC
  24. #define NWSC_MESSAGE_QUEUE_FULL 0xFC
  25. #define NWSC_UNKNOWN_REQUEST 0xFB
  26. #define NWSC_NO_SUCH_PROPERTY 0xFB
  27. #define NWSC_NO_SUCH_PRIORITY 0xFB
  28. #define NWSC_TEMPORARY_REMAP_ERROR 0xFA
  29. #define NWSC_NO_PROPERTY_READ 0xF9
  30. #define NWSC_NO_PROPERTY_VALUE 0xF8
  31. #define NWSC_NO_PROPERTY_CREATE 0xF7
  32. #define NWSC_NO_PROPERTY_DELETE 0xF6
  33. #define NWSC_NO_OBJECT_CREATE 0xF5
  34. #define NWSC_NO_OBJECT_DELETE 0xF4
  35. #define NWSC_NO_OBJECT_RENAME 0xF3
  36. #define NWSC_NO_OBJECT_READ 0xF2
  37. #define NWSC_BINDERY_SECURITY 0xF1
  38. #define NWSC_ILLEGAL_WILDCARD 0xF0
  39. #define NWSC_ILLEGAL_NAME 0xEF
  40. #define NWSC_OBJECT_EXISTS 0xEE
  41. #define NWSC_PROPERTY_EXISTS 0xED
  42. #define NWSC_NO_SUCH_SET 0xEC
  43. #define NWSC_NO_SUCH_SEGMENT 0xEC
  44. #define NWSC_PROPERTY_NOT_SET 0xEB
  45. #define NWSC_NO_SUCH_MEMBER 0xEA
  46. #define NWSC_MEMBER_EXISTS 0xE9
  47. #define NWSC_WRITE_TO_GROUP 0xE8
  48. #define NWSC_NO_DISK_TRACK 0xE7
  49. #define NWSC_OLD_PASSWORD 0xDF
  50. #define NWSC_BAD_PASSWORD 0xDE
  51. #define NWSC_TALLY_CORRUPT 0xDD
  52. #define NWSC_EA_KEY_LIMIT 0xDC
  53. #define NWSC_ACCOUNT_DISABLED 0xDC
  54. #define NWSC_MAX_QUEUE_SERVERS 0xDB
  55. #define NWSC_BAD_LOGIN_STATION 0xDB
  56. #define NWSC_QUEUE_HALTED 0xDA
  57. #define NWSC_BAD_LOGIN_TIME 0xDA
  58. #define NWSC_STATION_NOT_SERVER 0xD9
  59. #define NWSC_TOO_MANY_LOGINS 0xD9
  60. #define NWSC_QUEUE_NOT_ACTIVE 0xD8
  61. #define NWSC_PASSWORD_TOO_SHORT 0xD8
  62. #define NWSC_QUEUE_SERVICING 0xD7
  63. #define NWSC_PASSWORD_NOT_UNIQUE 0xD7
  64. #define NWSC_NO_JOB_RIGHTS 0xD6
  65. #define NWSC_NO_QUEUE_JOB 0xD5
  66. #define NWSC_QUEUE_FULL 0xD4
  67. #define NWSC_NO_QUEUE_RIGHTS 0xD3
  68. #define NWSC_NO_QUEUE_SERVER 0xD2
  69. #define NWSC_NO_QUEUE 0xD1
  70. #define NWSC_ACCESS_DENIED 0xD1
  71. #define NWSC_QUEUE_ERROR 0xD0
  72. #define NWSC_INVALID_EA_HANDLE 0xCF
  73. #define NWSC_BAD_DIR_NUMBER 0xCE
  74. #define NWSC_DIR_OUT_OF_RANGE 0xCD
  75. #define NWSC_INTERNAL_FAILURE 0xCC
  76. #define NWSC_NO_KEY_NO_DATA 0xCB
  77. #define NWSC_INVALID_EA_HANDLE_TYPE 0xCA
  78. #define NWSC_EA_NOT_FOUND 0xC9
  79. #define NWSC_MISSING_EA_KEY 0xC8
  80. #define NWSC_NO_CONSOLE_RIGHTS 0xC6
  81. #define NWSC_LOGIN_LOCKOUT 0xC5
  82. #define NWSC_ACCOUNT_DISABLED1 0xC4
  83. #define NWSC_TOO_MANY_HOLDS 0xC3
  84. #define NWSC_CREDIT_LIMIT_EXCEEDED 0xC2
  85. #define NWSC_NO_ACCOUNT_BALANCE 0xC1
  86. #define NWSC_NO_ACCOUNT_PRIVILEGES 0xC0
  87. #define NWSC_INVALID_NAME_SPACE 0xBF
  88. #define NWSC_IO_LOCK_ERROR 0xA2
  89. #define NWSC_DIRECTORY_IO_ERROR 0xA1
  90. #define NWSC_DIRECTORY_NOT_EMPTY 0xA0
  91. #define NWSC_DIRECTORY_ACTIVE 0x9F
  92. #define NWSC_BAD_FILE_NAME 0x9E
  93. #define NWSC_NO_DIRECTORY_HANDLES 0x9D
  94. #define NWSC_INVALID_PATH 0x9C
  95. #define NWSC_BAD_DIRECTORY_ERROR 0x9B
  96. #define NWSC_RENAME_ACROSS_VOLUME 0x9A
  97. #define NWSC_DIRECTORY_FULL_ERROR 0x99
  98. #define NWSC_DISK_MAP_ERROR 0x98
  99. #define NWSC_ILLEGAL_VOLUME 0x98
  100. #define NWSC_SERVER_OUT_OF_MEMORY 0x96
  101. #define NWSC_FILE_DETACHED 0x95
  102. #define NWSC_NO_WRITE_PRIVILEGES 0x94
  103. #define NWSC_NO_READ_PRIVILEGES 0x93
  104. #define NWSC_ALL_NAMES_EXIST 0x92
  105. #define NWSC_SOME_NAMES_EXIST 0x91
  106. #define NWSC_ALL_READ_ONLY 0x90
  107. #define NWSC_SOME_READ_ONLY 0x8F
  108. #define NWSC_ALL_FILES_IN_USE 0x8E
  109. #define NWSC_SOME_FILES_IN_USE 0x8D
  110. #define NWSC_NO_SET_PRIVILEGES 0x8C
  111. #define NWSC_NO_RENAME_PRIVILEGES 0x8B
  112. #define NWSC_NO_DELETE_PRIVILEGES 0x8A
  113. #define NWSC_NO_SEARCH_PRIVILEGES 0x89
  114. #define NWSC_INVALID_FILE_HANDLE 0x88
  115. #define NWSC_CREATE_FILENAME_ERROR 0x87
  116. #define NWSC_NO_CREATE_DELETE_PRIVILEGES 0x85
  117. #define NWSC_NO_CREATE_PRIVILEGES 0x84
  118. #define NWSC_HARD_IO_ERROR 0x83
  119. #define NWSC_NO_OPEN_PRIVILEGES 0x82
  120. #define NWSC_OUT_OF_HANDLES 0x81
  121. #define NWSC_FILE_IN_USE 0x80
  122. #define NWSC_LOCK_FAIL 0x80
  123. #define NWSC_NWREDIR_EXCHANGE_ERROR 0x07
  124. #define NWSC_OUT_OF_DISK_SPACE 0x01
  125. #define NWSC_SUCCESS 0x00
  126. #define NWSC_SERVEROUTOFMEMORY 0x96
  127. #define NWSC_NOSPOOLDISKSPACE 0x97
  128. #define NWSC_NOSUCHVOLUME 0x98 // Volume does not exist
  129. #define NWSC_DIRECTORYFULL 0x99
  130. #define NWSC_BADDIRECTORYHANDLE 0x9B
  131. #define NWSC_NOSUCHPATH 0x9C
  132. #define NWSC_NOJOBRIGHTS 0xD6
  133. #define NWSC_PWD_NOT_UNIQUE 0xD7
  134. #define NWSC_PWD_TOO_SHORT 0xD8
  135. #define NWSC_PWD_LOGON_DENIED 0xD9
  136. #define NWSC_NO_QUEUE 0xD1
  137. #define NWSC_TIME_RESTRICTED 0xDA
  138. #define NWSC_STATION_RESTRICTED 0xDB
  139. #define NWSC_ACCOUNT_DISABLED 0xDC
  140. #define NWSC_PWD_EXPIRED_NO_GRACE 0xDE
  141. #define NWSC_EXPIREDPASSWORD 0xDF
  142. #define NWSC_NOSUCHSEGMENT 0xEC // Segment does not exist
  143. #define NWSC_INVALIDNAME 0xEF
  144. #define NWSC_NOWILDCARD 0xF0 // Wildcard not allowed
  145. #define NWSC_NOPERMBIND 0xF1 // Invalid bindery security
  146. #define NWSC_ALREADYATTACHED 0xF8 // Already attached to file server
  147. #define NWSC_NOPERMREADPROP 0xF9 // No property read privelege
  148. #define NWSC_NOFREESLOTS 0xF9 // No free connection slots locally
  149. #define NWSC_NOMORESERVERSLOTS 0xFA // No more server slots
  150. #define NWSC_NOSUCHPROPERTY 0xFB // Property does not exist
  151. #define NWSC_UNKNOWN_REQUEST 0xFB // Invalid NCP number
  152. #define NWSC_NOSUCHOBJECT 0xFC // End of Scan Bindery Object service
  153. // No such object
  154. #define NWSC_UNKNOWNSERVER 0xFC // Unknown file server
  155. #define NWSC_SERVERBINDERYLOCKED 0xFE // Server bindery locked
  156. #define NWSC_BINDERYFAILURE 0xFF // Bindery failure
  157. #define NWSC_ILLEGALSERVERADDRESS 0xFF // No response from server (illegal server address)
  158. #define NWSC_NOSUCHCONNECTION 0xFF // Connection ID does not exist
  159. #define NWSC_ERROR 0xFF
  160. #define NWSC_NET_ERROR 0xFD
  161. #define NWSC_DIRECTORY_LOCKED 0xFE
  162. #define NWSC_NO_NETWORK 0xFF
  163. // This is NOBALL specific error code
  164. //#define NWSC_NO_RESPONSE 7L
  165. //#define NWSC_BAD_CONNECTION 8L
  166. #define NWSC_NO_RESPONSE ERROR_REM_NOT_LIST
  167. #define NWSC_BAD_CONNECTION ERROR_DEV_NOT_EXIST
  168. // NW requester error codes
  169. // same as VLM return codes (Netware Client Assembly API)
  170. #define REQUESTR_ERR 0x8800
  171. #define NWRE_INVALID_CONNECTION (REQUESTR_ERR | 0x01) //connection handle is invalid
  172. #define NWRE_DRIVE_IN_USE (REQUESTR_ERR | 0x02)
  173. #define NWRE_CANT_ADD_CDS (REQUESTR_ERR | 0x03)
  174. #define NWRE_BAD_DRIVE_BASE (REQUESTR_ERR | 0x04)
  175. #define NWRE_NET_RECV_ERROR (REQUESTR_ERR | 0x05)
  176. #define NWRE_UNKNOWN_NET_ERROR (REQUESTR_ERR | 0x06)
  177. #define NWRE_SERVER_INVALID_SLOT (REQUESTR_ERR | 0x07)
  178. #define NWRE_NO_SERVER_SLOTS (REQUESTR_ERR | 0x08) //server refused attach
  179. #define NWRE_SERVER_NO_ROUTE (REQUESTR_ERR | 0x0A)
  180. #define NWRE_BAD_LOCAL_TARGET (REQUESTR_ERR | 0x0B)
  181. #define NWRE_TOO_MANY_REQ_FRAGS (REQUESTR_ERR | 0x0C) //request buffer too long
  182. #define NWRE_CONNECT_LIST_OVERFLOW (REQUESTR_ERR | 0x0D)
  183. #define NWRE_BUFFER_OVERFLOW (REQUESTR_ERR | 0x0E) //reply buffer not big enough
  184. #define NWRE_NO_ROUTER_FOUND (REQUESTR_ERR | 0x10)
  185. #define NWRE_PARAMETER_NOT_FOUND (REQUESTR_ERR | 0x10)
  186. #define NWRE_BAD_FUNC (REQUESTR_ERR | 0x11)
  187. #define NWRE_PRIMARY_CONN_NOT_SET (REQUESTR_ERR | 0x31) //no default connection set
  188. #define NWRE_INVALID_BUFFER_LENGTH (REQUESTR_ERR | 0x33)
  189. #define NWRE_INVALID_PARAMETER (REQUESTR_ERR | 0x36)
  190. #define NWRE_CONNECTION_TABLE_FULL (REQUESTR_ERR | 0x3F) // too many local connections
  191. #define NWRE_TDS_INVALID_TAG (REQUESTR_ERR | 0x44)
  192. #define NWRE_NO_SERVER (REQUESTR_ERR | 0x47)
  193. #define NWRE_DEVICE_NOT_REDIRECTED (REQUESTR_ERR | 0x4C)
  194. #define NWRE_TOO_MANY_REPLY_FRAGS (REQUESTR_ERR | 0x50) // too many fragments in reply buff
  195. #define NWRE_OUT_OF_MEMORY (REQUESTR_ERR | 0x53) // local memory allocation failure
  196. #define NWRE_PREFERRED_NOT_FOUND (REQUESTR_ERR | 0x55)
  197. #define NWRE_DEVICE_NOT_RECOGNIZED (REQUESTR_ERR | 0x56)
  198. #define NWRE_BAD_NET_TYPE (REQUESTR_ERR | 0x57)
  199. #define NWRE_INVALID_SERVER_NAME (REQUESTR_ERR | 0x59)
  200. #define NWRE_FAILURE (REQUESTR_ERR | 0xff) // internal shell failure
  201. //NDS errors
  202. #define NDSE_NO_MEM -301
  203. #define NDSE_BAD_KEY -302
  204. #define NDSE_BAD_CONTEXT -303
  205. #define NDSE_BUFFER_FULL -304
  206. #define NDSE_NULL_LIST -305
  207. #define NDSE_BAD_SYNTAX_ID -306
  208. #define NDSE_BUFFER_EMPTY -307
  209. #define NDSE_BAD_VERB -308
  210. #define NDSE_NOT_TYPED -309
  211. #define NDSE_EXPECTED_EQUALS -310
  212. #define NDSE_EXPECTED_TYPE -311
  213. #define NDSE_TYPE_NOT_EXPECTED -312
  214. #define NDSE_FILTER_EMPTY -313
  215. #define NDSE_BAD_OBJECT_NAME -314
  216. #define NDSE_EXPECTED_RDN -315
  217. #define NDSE_TOO_MANY_TOKENS -316
  218. #define NDSE_BAD_MULTI_AVA -317
  219. #define NDSE_BAD_COUNTRY_NAME -318
  220. #define NDSE_SYSTEM_ERROR -319
  221. #define NDSE_CANT_ADD_ROOT -320
  222. #define NDSE_CANT_ATTACH -321
  223. #define NDSE_INVALID_HANDLE -322
  224. #define NDSE_ZERO_LENGTH -323
  225. #define NDSE_REPLICA_TYPE -324
  226. #define NDSE_BAD_ATTR_SYNTAX_ID -325
  227. #define NDSE_CONTEXT_CREATION -328
  228. #define NDSE_INVALID_UNION_TAG -329
  229. #define NDSE_INVALID_SERVER_RESPONSE -330
  230. #define NDSE_NULL_POINTER -331
  231. #define NDSE_BAD_FILTER -332
  232. #define NDSE_RDN_TOO_LONG -334
  233. #define NDSE_DUPLICATE_TYPE -335
  234. #define NDSE_NOT_LOGGED_IN -337
  235. #define NDSE_BAD_PASSWORD_CHARS -338
  236. #define NDSE_AUTHENT_FAILED -339
  237. #define NDSE_TRANSPORT -340
  238. #define NDSE_NO_SUCH_SYNTAX -341
  239. #define NDSE_BAD_DS_NAME -342
  240. #define NDSE_ATTR_NAME_TOO_LONG -343
  241. #define NDSE_INVALID_TDS -344
  242. #define NDSE_INVALID_DS_VERSION -345
  243. #define NDSE_UNICODE_TRANSLATION -346
  244. #define NDSE_NO_WRITABLE_REPLICAS -352
  245. #define NDSE_DN_TOO_LONG -353
  246. #define NDSE_RENAME_NOT_ALLOWED -354
  247. //
  248. // Following are NDS server errors
  249. //
  250. #define NDSE_NAME_NOT_FOUND -601
  251. #define NDSE_VALUE_NOT_FOUND -602
  252. #define NDSE_ATTRIB_NOT_FOUND -603
  253. #define NDSE_NO_SUCH_CLASS -604
  254. #define NDSE_PARTITION_NOT_FOUND -605
  255. #define NDSE_ENTRY_EXISTS -606
  256. #define NDSE_ILLEGAL_ATTRIB -608
  257. #define NDSE_MISSING_MANDATORY -609
  258. #define NDSE_ILLEGAL_NAME -610
  259. #define NDSE_ILLEGAL_PARENT -611
  260. #define NDSE_SINGLE_VALUED -612
  261. #define NDSE_ILLEGAL_SYNTAX -613
  262. #define NDSE_DUPLICATE_VALUE -614
  263. #define NDSE_ATTRIB_EXISTS -615
  264. #define NDSE_MAXED_ENTRIES -616
  265. #define NDSE_DB_FORMAT -617
  266. #define NDSE_BAD_DATABASE -618
  267. #define NDSE_BAD_COMPARISON -619
  268. #define NDSE_COMPARISON_FAILED -620
  269. #define NDSE_TRANSACT_DISABLED -621
  270. #define NDSE_BAD_TRANSPORT -622
  271. #define NDSE_INVALID_NAME_SYNTAX -623
  272. #define NDSE_ALL_REFERRALS_FAILED -626
  273. #define NDSE_DIFFERENT_TREE -630 /* No clear meaning */
  274. #define NDSE_SYSTEM_FAILURE -632
  275. #define NDSE_NO_REFERRALS -634
  276. #define NDSE_INVALID_REQUEST -641
  277. #define NDSE_INVALID_ITERATION -642
  278. #define NDSE_TIME_OUT_OF_SYNC -659
  279. #define NDSE_DS_LOCKED -663
  280. #define NDSE_NOT_CONTAINER -668
  281. #define NDSE_BAD_AUTHENTICATION -669
  282. #define NDSE_NO_SUCH_PARENT -671
  283. #define NDSE_ACCESS_DENIED -672
  284. #define NDSE_ALIAS_OF_ALIAS -681
  285. #define NDSE_INVALID_VERSION -683
  286. #define NDSE_FATAL_ERROR -699
  287. #define NDSE_PASSWORD_EXPIRED NWSC_EXPIREDPASSWORD
  288. #define NDSE_BAD_PASSWORD NWSC_BAD_PASSWORD
  289. //
  290. // Error checking macros
  291. //
  292. #define NW_IS_SUCCESS(err) (err==NWSC_SUCCESS)
  293. #endif