Leaked source code of windows server 2003
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.

720 lines
15 KiB

  1. /*
  2. Copyright (c) 1991-1993 Microsoft Corporation
  3. Module Name:
  4. ntstatus.h
  5. Abstract:
  6. Constant definitions for the NTSTATUS values.
  7. Notes:
  8. This file is from the NT SDK, a lot of these error codes are not
  9. being used in the reference implementation.
  10. */
  11. #ifndef _NTSTATUS_
  12. #define _NTSTATUS_
  13. /////////////////////////////////////////////////////////////////////////
  14. //
  15. // Standard Success values
  16. //
  17. //
  18. /////////////////////////////////////////////////////////////////////////
  19. //
  20. // The success status codes 0 - 63 are reserved for wait completion status.
  21. //
  22. #define STATUS_SUCCESS \
  23. ((NTSTATUS)0x00000000L)
  24. //
  25. // Values are 32 bit values layed out as follows:
  26. //
  27. // 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
  28. // 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
  29. // +---+-+-+-----------------------+-------------------------------+
  30. // |Sev|C|R| Facility | Code |
  31. // +---+-+-+-----------------------+-------------------------------+
  32. //
  33. // where
  34. //
  35. // Sev - is the severity code
  36. //
  37. // 00 - Success
  38. // 01 - Informational
  39. // 10 - Warning
  40. // 11 - Error
  41. //
  42. // C - is the Customer code flag
  43. //
  44. // R - is a reserved bit
  45. //
  46. // Facility - is the facility code
  47. //
  48. // Code - is the status code of facility
  49. //
  50. //
  51. // Define the facility codes
  52. //
  53. //
  54. // MessageId: STATUS_IMAGE_MACHINE_TYPE_MISMATCH
  55. //
  56. // MessageText:
  57. //
  58. // {Machine Type Mismatch}
  59. // The image file %s is valid, but is for a machine type other than the current machine. Select OK to continue, or CANCEL to fail the DLL load.
  60. //
  61. #define STATUS_IMAGE_MACHINE_TYPE_MISMATCH ((NTSTATUS)0x4000000EL)
  62. //
  63. // MessageId: STATUS_BUFFER_OVERFLOW
  64. //
  65. // MessageText:
  66. //
  67. // {Buffer Overflow}
  68. // The data was too large to fit into the specified buffer.
  69. //
  70. #define STATUS_BUFFER_OVERFLOW ((NTSTATUS)0x80000005L)
  71. //
  72. // MessageId: STATUS_UNSUCCESSFUL
  73. //
  74. // MessageText:
  75. //
  76. // {Operation Failed}
  77. // The requested operation was unsuccessful.
  78. //
  79. #define STATUS_UNSUCCESSFUL ((NTSTATUS)0xC0000001L)
  80. //
  81. // MessageId: STATUS_NOT_IMPLEMENTED
  82. //
  83. // MessageText:
  84. //
  85. // {Not Implemented}
  86. // The requested operation is not implemented.
  87. //
  88. #define STATUS_NOT_IMPLEMENTED ((NTSTATUS)0xC0000002L)
  89. //
  90. // MessageId: STATUS_ACCESS_VIOLATION
  91. //
  92. // MessageText:
  93. //
  94. // The instruction at "0x%08lx" referenced memory at "0x%08lx". The memory
  95. // could not be "%s".
  96. //
  97. #define STATUS_ACCESS_VIOLATION ((NTSTATUS)0xC0000005L) // winnt ntsubauth
  98. //
  99. // MessageId: STATUS_UNRECOGNIZED_MEDIA
  100. //
  101. // MessageText:
  102. //
  103. // {Unknown Disk Format}
  104. // The disk in drive %s is not formatted properly.
  105. // Please check the disk, and reformat if necessary.
  106. //
  107. #define STATUS_UNRECOGNIZED_MEDIA ((NTSTATUS)0xC0000014L)
  108. //
  109. // MessageId: STATUS_INVALID_HANDLE
  110. //
  111. // MessageText:
  112. //
  113. // An invalid HANDLE was specified.
  114. //
  115. #define STATUS_INVALID_HANDLE ((NTSTATUS)0xC0000008L) // winnt
  116. //
  117. // MessageId: STATUS_INVALID_PARAMETER
  118. //
  119. // MessageText:
  120. //
  121. // An invalid parameter was passed to a service or function.
  122. //
  123. #define STATUS_INVALID_PARAMETER ((NTSTATUS)0xC000000DL)
  124. //
  125. // MessageId: STATUS_NO_SUCH_DEVICE
  126. //
  127. // MessageText:
  128. //
  129. // A device which does not exist was specified.
  130. //
  131. #define STATUS_NO_SUCH_DEVICE ((NTSTATUS)0xC000000EL)
  132. //
  133. // MessageId: STATUS_NO_SUCH_FILE
  134. //
  135. // MessageText:
  136. //
  137. // {File Not Found}
  138. // The file %s does not exist.
  139. //
  140. #define STATUS_NO_SUCH_FILE ((NTSTATUS)0xC000000FL)
  141. //
  142. // MessageId: STATUS_INVALID_DEVICE_REQUEST
  143. //
  144. // MessageText:
  145. //
  146. // The specified request is not a valid operation for the target device.
  147. //
  148. #define STATUS_INVALID_DEVICE_REQUEST ((NTSTATUS)0xC0000010L)
  149. //
  150. // MessageId: STATUS_NO_MEDIA_IN_DEVICE
  151. //
  152. // MessageText:
  153. //
  154. // {No Disk}
  155. // There is no disk in the drive.
  156. // Please insert a disk into drive %s.
  157. //
  158. #define STATUS_NO_MEDIA_IN_DEVICE ((NTSTATUS)0xC0000013L)
  159. //
  160. // MessageId: STATUS_NO_MEDIA_IN_DEVICE
  161. //
  162. // MessageText:
  163. //
  164. // {No Disk}
  165. // There is no disk in the drive.
  166. // Please insert a disk into drive %s.
  167. //
  168. #define STATUS_NO_MEDIA_IN_DEVICE ((NTSTATUS)0xC0000013L)
  169. //
  170. // MessageId: STATUS_UNRECOGNIZED_MEDIA
  171. //
  172. // MessageText:
  173. //
  174. // {Unknown Disk Format}
  175. // The disk in drive %s is not formatted properly.
  176. // Please check the disk, and reformat if necessary.
  177. //
  178. #define STATUS_UNRECOGNIZED_MEDIA ((NTSTATUS)0xC0000014L)
  179. //
  180. // MessageId: STATUS_UNABLE_TO_DELETE_SECTION
  181. //
  182. // MessageText:
  183. //
  184. // Specified section cannot be deleted.
  185. //
  186. #define STATUS_UNABLE_TO_DELETE_SECTION ((NTSTATUS)0xC000001BL)
  187. //
  188. // MessageId: STATUS_INVALID_SYSTEM_SERVICE
  189. //
  190. // MessageText:
  191. //
  192. // An invalid system service was specified in a system service call.
  193. //
  194. #define STATUS_INVALID_SYSTEM_SERVICE ((NTSTATUS)0xC000001CL)
  195. //
  196. // MessageId: STATUS_NO_MEMORY
  197. //
  198. // MessageText:
  199. //
  200. // {Not Enough Quota}
  201. // Not enough virtual memory or paging file quota is available to complete
  202. // the specified operation.
  203. //
  204. #define STATUS_NO_MEMORY ((NTSTATUS)0xC0000017L) // winnt
  205. //
  206. // MessageId: STATUS_ACCESS_DENIED
  207. //
  208. // MessageText:
  209. //
  210. // {Access Denied}
  211. // A process has requested access to an object, but has not been granted
  212. // those access rights.
  213. //
  214. #define STATUS_ACCESS_DENIED ((NTSTATUS)0xC0000022L)
  215. //
  216. // MessageId: STATUS_OBJECT_TYPE_MISMATCH
  217. //
  218. // MessageText:
  219. //
  220. // {Wrong Type}
  221. // There is a mismatch between the type of object required by the requested
  222. // operation and the type of object that is specified in the request.
  223. //
  224. #define STATUS_OBJECT_TYPE_MISMATCH ((NTSTATUS)0xC0000024L)
  225. //
  226. // MessageId: STATUS_INVALID_PARAMETER_MIX
  227. //
  228. // MessageText:
  229. //
  230. // An invalid combination of parameters was specified.
  231. //
  232. #define STATUS_INVALID_PARAMETER_MIX ((NTSTATUS)0xC0000030L)
  233. //
  234. // MessageId: STATUS_DISK_CORRUPT_ERROR
  235. //
  236. // MessageText:
  237. //
  238. // {Corrupt Disk}
  239. // The file system structure on the disk is corrupt and unusable.
  240. // Please run the Chkdsk utility on the volume %s.
  241. //
  242. #define STATUS_DISK_CORRUPT_ERROR ((NTSTATUS)0xC0000032L)
  243. //
  244. // MessageId: STATUS_OBJECT_NAME_INVALID
  245. //
  246. // MessageText:
  247. //
  248. // Object Name invalid.
  249. //
  250. #define STATUS_OBJECT_NAME_INVALID ((NTSTATUS)0xC0000033L)
  251. //
  252. // MessageId: STATUS_OBJECT_NAME_NOT_FOUND
  253. //
  254. // MessageText:
  255. //
  256. // Object Name not found.
  257. //
  258. #define STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS)0xC0000034L)
  259. //
  260. // MessageId: STATUS_OBJECT_NAME_COLLISION
  261. //
  262. // MessageText:
  263. //
  264. // Object Name already exists.
  265. //
  266. #define STATUS_OBJECT_NAME_COLLISION ((NTSTATUS)0xC0000035L)
  267. //
  268. // MessageId: STATUS_OBJECT_PATH_INVALID
  269. //
  270. // MessageText:
  271. //
  272. // Object Path Component was not a directory object.
  273. //
  274. #define STATUS_OBJECT_PATH_INVALID ((NTSTATUS)0xC0000039L)
  275. //
  276. // MessageId: STATUS_OBJECT_PATH_NOT_FOUND
  277. //
  278. // MessageText:
  279. //
  280. // {Path Not Found}
  281. // The path %s does not exist.
  282. //
  283. #define STATUS_OBJECT_PATH_NOT_FOUND ((NTSTATUS)0xC000003AL)
  284. //
  285. // MessageId: STATUS_OBJECT_PATH_SYNTAX_BAD
  286. //
  287. // MessageText:
  288. //
  289. // Object Path Component was not a directory object.
  290. //
  291. #define STATUS_OBJECT_PATH_SYNTAX_BAD ((NTSTATUS)0xC000003BL)
  292. //
  293. // MessageId: STATUS_DATA_ERROR
  294. //
  295. // MessageText:
  296. //
  297. // {Data Error}
  298. // An error in reading or writing data occurred.
  299. //
  300. #define STATUS_DATA_ERROR ((NTSTATUS)0xC000003EL)
  301. //
  302. // MessageId: STATUS_NO_SUCH_FILE
  303. //
  304. // MessageText:
  305. //
  306. // {File Not Found}
  307. // The file %s does not exist.
  308. //
  309. #define STATUS_NO_SUCH_FILE ((NTSTATUS)0xC000000FL)
  310. //
  311. // MessageId: STATUS_SHARING_VIOLATION
  312. //
  313. // MessageText:
  314. //
  315. // A file cannot be opened because the share access flags are
  316. // incompatible.
  317. //
  318. #define STATUS_SHARING_VIOLATION ((NTSTATUS)0xC0000043L)
  319. //
  320. // MessageId: STATUS_FILE_LOCK_CONFLICT
  321. //
  322. // MessageText:
  323. //
  324. // A requested read/write cannot be granted due to a conflicting file lock.
  325. //
  326. #define STATUS_FILE_LOCK_CONFLICT ((NTSTATUS)0xC0000054L)
  327. //
  328. // MessageId: STATUS_LOCK_NOT_GRANTED
  329. //
  330. // MessageText:
  331. //
  332. // A requested file lock cannot be granted due to other existing locks.
  333. //
  334. #define STATUS_LOCK_NOT_GRANTED ((NTSTATUS)0xC0000055L)
  335. //
  336. // MessageId: STATUS_DELETE_PENDING
  337. //
  338. // MessageText:
  339. //
  340. // A non close operation has been requested of a file object with a
  341. // delete pending.
  342. //
  343. #define STATUS_DELETE_PENDING ((NTSTATUS)0xC0000056L)
  344. //
  345. // MessageId: STATUS_INTERNAL_DB_CORRUPTION
  346. //
  347. // MessageText:
  348. //
  349. // This error indicates that the requested operation cannot be
  350. // completed due to a catastrophic media failure or on-disk data
  351. // structure corruption.
  352. //
  353. #define STATUS_INTERNAL_DB_CORRUPTION ((NTSTATUS)0xC00000E4L)
  354. //
  355. // MessageId: STATUS_DISK_FULL
  356. //
  357. // MessageText:
  358. //
  359. // An operation failed because the disk was full.
  360. //
  361. #define STATUS_DISK_FULL ((NTSTATUS)0xC000007FL)
  362. //
  363. // MessageId: STATUS_FILE_INVALID
  364. //
  365. // MessageText:
  366. //
  367. // The volume for a file has been externally altered such that the
  368. // opened file is no longer valid.
  369. //
  370. #define STATUS_FILE_INVALID ((NTSTATUS)0xC0000098L)
  371. //
  372. // MessageId: STATUS_INSUFFICIENT_RESOURCES
  373. //
  374. // MessageText:
  375. //
  376. // Insufficient system resources exist to complete the API.
  377. //
  378. #define STATUS_INSUFFICIENT_RESOURCES ((NTSTATUS)0xC000009AL) // ntsubauth
  379. //
  380. // MessageId: STATUS_FILE_INVALID
  381. //
  382. // MessageText:
  383. //
  384. // The volume for a file has been externally altered such that the
  385. // opened file is no longer valid.
  386. //
  387. #define STATUS_FILE_INVALID ((NTSTATUS)0xC0000098L)
  388. //
  389. // MessageId: STATUS_FILE_FORCED_CLOSED
  390. //
  391. // MessageText:
  392. //
  393. // The specified file has been closed by another process.
  394. //
  395. #define STATUS_FILE_FORCED_CLOSED ((NTSTATUS)0xC00000B6L)
  396. //
  397. // MessageId: STATUS_FILE_IS_A_DIRECTORY
  398. //
  399. // MessageText:
  400. //
  401. // The file that was specified as a target is a directory and the caller
  402. // specified that it could be anything but a directory.
  403. //
  404. #define STATUS_FILE_IS_A_DIRECTORY ((NTSTATUS)0xC00000BAL)
  405. //
  406. // MessageId: STATUS_DUPLICATE_NAME
  407. //
  408. // MessageText:
  409. //
  410. // A duplicate name exists on the network.
  411. //
  412. #define STATUS_DUPLICATE_NAME ((NTSTATUS)0xC00000BDL)
  413. //
  414. // Status codes raised by the Cache Manager which must be considered as
  415. // "expected" by its callers.
  416. //
  417. //
  418. // MessageId: STATUS_INVALID_USER_BUFFER
  419. //
  420. // MessageText:
  421. //
  422. // An access to a user buffer failed at an "expected" point in time.
  423. // This code is defined since the caller does not want to accept
  424. // STATUS_ACCESS_VIOLATION in its filter.
  425. //
  426. #define STATUS_INVALID_USER_BUFFER ((NTSTATUS)0xC00000E8L)
  427. //
  428. // MessageId: STATUS_INVALID_PARAMETER_1
  429. //
  430. // MessageText:
  431. //
  432. // An invalid parameter was passed to a service or function as
  433. // the first argument.
  434. //
  435. #define STATUS_INVALID_PARAMETER_1 ((NTSTATUS)0xC00000EFL)
  436. //
  437. // MessageId: STATUS_INVALID_PARAMETER_2
  438. //
  439. // MessageText:
  440. //
  441. // An invalid parameter was passed to a service or function as
  442. // the second argument.
  443. //
  444. #define STATUS_INVALID_PARAMETER_2 ((NTSTATUS)0xC00000F0L)
  445. //
  446. // MessageId: STATUS_INVALID_PARAMETER_3
  447. //
  448. // MessageText:
  449. //
  450. // An invalid parameter was passed to a service or function as
  451. // the third argument.
  452. //
  453. #define STATUS_INVALID_PARAMETER_3 ((NTSTATUS)0xC00000F1L)
  454. //
  455. // MessageId: STATUS_INVALID_PARAMETER_4
  456. //
  457. // MessageText:
  458. //
  459. // An invalid parameter was passed to a service or function as
  460. // the fourth argument.
  461. //
  462. #define STATUS_INVALID_PARAMETER_4 ((NTSTATUS)0xC00000F2L)
  463. //
  464. // MessageId: STATUS_INVALID_PARAMETER_5
  465. //
  466. // MessageText:
  467. //
  468. // An invalid parameter was passed to a service or function as
  469. // the fifth argument.
  470. //
  471. #define STATUS_INVALID_PARAMETER_5 ((NTSTATUS)0xC00000F3L)
  472. //
  473. // MessageId: STATUS_INVALID_PARAMETER_6
  474. //
  475. // MessageText:
  476. //
  477. // An invalid parameter was passed to a service or function as
  478. // the sixth argument.
  479. //
  480. #define STATUS_INVALID_PARAMETER_6 ((NTSTATUS)0xC00000F4L)
  481. //
  482. // MessageId: STATUS_INVALID_PARAMETER_7
  483. //
  484. // MessageText:
  485. //
  486. // An invalid parameter was passed to a service or function as
  487. // the seventh argument.
  488. //
  489. #define STATUS_INVALID_PARAMETER_7 ((NTSTATUS)0xC00000F5L)
  490. //
  491. // MessageId: STATUS_INVALID_PARAMETER_8
  492. //
  493. // MessageText:
  494. //
  495. // An invalid parameter was passed to a service or function as
  496. // the eighth argument.
  497. //
  498. #define STATUS_INVALID_PARAMETER_8 ((NTSTATUS)0xC00000F6L)
  499. //
  500. // MessageId: STATUS_INVALID_PARAMETER_9
  501. //
  502. // MessageText:
  503. //
  504. // An invalid parameter was passed to a service or function as
  505. // the ninth argument.
  506. //
  507. #define STATUS_INVALID_PARAMETER_9 ((NTSTATUS)0xC00000F7L)
  508. //
  509. // MessageId: STATUS_INVALID_PARAMETER_10
  510. //
  511. // MessageText:
  512. //
  513. // An invalid parameter was passed to a service or function as
  514. // the tenth argument.
  515. //
  516. #define STATUS_INVALID_PARAMETER_10 ((NTSTATUS)0xC00000F8L)
  517. //
  518. // MessageId: STATUS_INVALID_PARAMETER_11
  519. //
  520. // MessageText:
  521. //
  522. // An invalid parameter was passed to a service or function as
  523. // the eleventh argument.
  524. //
  525. #define STATUS_INVALID_PARAMETER_11 ((NTSTATUS)0xC00000F9L)
  526. //
  527. // MessageId: STATUS_INVALID_PARAMETER_12
  528. //
  529. // MessageText:
  530. //
  531. // An invalid parameter was passed to a service or function as
  532. // the twelfth argument.
  533. //
  534. #define STATUS_INVALID_PARAMETER_12 ((NTSTATUS)0xC00000FAL)
  535. //
  536. // MessageId: STATUS_DIRECTORY_NOT_EMPTY
  537. //
  538. // MessageText:
  539. //
  540. // Indicates that the directory trying to be deleted is not empty.
  541. //
  542. #define STATUS_DIRECTORY_NOT_EMPTY ((NTSTATUS)0xC0000101L)
  543. //
  544. // MessageId: STATUS_FILE_CORRUPT_ERROR
  545. //
  546. // MessageText:
  547. //
  548. // {Corrupt File}
  549. // The file or directory %s is corrupt and unreadable.
  550. // Please run the Chkdsk utility.
  551. //
  552. #define STATUS_FILE_CORRUPT_ERROR ((NTSTATUS)0xC0000102L)
  553. //
  554. // MessageId: STATUS_NOT_A_DIRECTORY
  555. //
  556. // MessageText:
  557. //
  558. // A requested opened file is not a directory.
  559. //
  560. //
  561. // MessageId: STATUS_NOT_A_DIRECTORY
  562. //
  563. // MessageText:
  564. //
  565. // A requested opened file is not a directory.
  566. //
  567. #define STATUS_NOT_A_DIRECTORY ((NTSTATUS)0xC0000103L)
  568. //
  569. // MessageId: STATUS_NAME_TOO_LONG
  570. //
  571. // MessageText:
  572. //
  573. // A specified name string is too long for its intended use.
  574. //
  575. #define STATUS_NAME_TOO_LONG ((NTSTATUS)0xC0000106L)
  576. //
  577. // MessageId: STATUS_BUFFER_ALL_ZEROS
  578. //
  579. // MessageText:
  580. //
  581. // Specified buffer contains all zeros.
  582. //
  583. #define STATUS_BUFFER_ALL_ZEROS ((NTSTATUS)0x00000117L)
  584. //
  585. // MessageId: STATUS_TOO_MANY_OPENED_FILES
  586. //
  587. // MessageText:
  588. //
  589. // Too many files are opened on a remote server. This error should only
  590. // be returned by the NT redirector on a remote drive.
  591. //
  592. #define STATUS_TOO_MANY_OPENED_FILES ((NTSTATUS)0xC000011FL)
  593. //
  594. // MessageId: STATUS_UNMAPPABLE_CHARACTER
  595. //
  596. // MessageText:
  597. //
  598. // No mapping for the Unicode character exists in the target multi-byte code page.
  599. //
  600. #define STATUS_UNMAPPABLE_CHARACTER ((NTSTATUS)0xC0000162L)
  601. //
  602. // MessageId: STATUS_NOT_FOUND
  603. //
  604. // MessageText:
  605. //
  606. // The object was not found.
  607. //
  608. #define STATUS_NOT_FOUND ((NTSTATUS)0xC0000225L)
  609. //
  610. // MessageId: STATUS_DUPLICATE_OBJECTID
  611. //
  612. // MessageText:
  613. //
  614. // The attempt to insert the ID in the index failed because the
  615. // ID is already in the index.
  616. //
  617. #define STATUS_DUPLICATE_OBJECTID ((NTSTATUS)0xC000022AL)
  618. //
  619. // MessageId: STATUS_OBJECTID_EXISTS
  620. //
  621. // MessageText:
  622. //
  623. // The attempt to set the object's ID failed because the object
  624. // already has an ID.
  625. //
  626. #define STATUS_OBJECTID_EXISTS ((NTSTATUS)0xC000022BL)
  627. //
  628. // MessageId: STATUS_PROPSET_NOT_FOUND
  629. //
  630. // MessageText:
  631. //
  632. // The property set specified does not exist on the object.
  633. //
  634. #define STATUS_PROPSET_NOT_FOUND ((NTSTATUS)0xC0000230L)
  635. #endif // _NTSTATUS_