http://fit.c2.com/fit/files/LispPlatform/lisp/clisp-2.28/src/errwin32.d

  1. # Calls a function, passing it information about a Win32 error code.
  2. # get_OS_error_info(errcode,func);
  3. # > errcode: error code
  4. # > func: will be called with name and msg (if available) as arguments
  5. typedef void OS_error_info_callback (const char* name, const char* msg);
  6. local void get_OS_error_info (DWORD errcode, OS_error_info_callback* func);
  7. local void get_OS_error_info(errcode,func)
  8. var DWORD errcode;
  9. var OS_error_info_callback* func;
  10. {
  11. var const char* errorname = NULL;
  12. var const char* errormsg = NULL;
  13. switch (errcode) {
  14. #ifdef ERROR_SUCCESS
  15. case ERROR_SUCCESS:
  16. errorname = "ERROR_SUCCESS";
  17. errormsg = "The operation completed successfully.";
  18. break;
  19. #endif
  20. #ifdef ERROR_INVALID_FUNCTION
  21. case ERROR_INVALID_FUNCTION:
  22. errorname = "ERROR_INVALID_FUNCTION";
  23. errormsg = "Incorrect function.";
  24. break;
  25. #endif
  26. #ifdef ERROR_FILE_NOT_FOUND
  27. case ERROR_FILE_NOT_FOUND:
  28. errorname = "ERROR_FILE_NOT_FOUND";
  29. errormsg = "The system cannot find the file specified.";
  30. break;
  31. #endif
  32. #ifdef ERROR_PATH_NOT_FOUND
  33. case ERROR_PATH_NOT_FOUND:
  34. errorname = "ERROR_PATH_NOT_FOUND";
  35. errormsg = "The system cannot find the path specified.";
  36. break;
  37. #endif
  38. #ifdef ERROR_TOO_MANY_OPEN_FILES
  39. case ERROR_TOO_MANY_OPEN_FILES:
  40. errorname = "ERROR_TOO_MANY_OPEN_FILES";
  41. errormsg = "The system cannot open the file.";
  42. break;
  43. #endif
  44. #ifdef ERROR_ACCESS_DENIED
  45. case ERROR_ACCESS_DENIED:
  46. errorname = "ERROR_ACCESS_DENIED";
  47. errormsg = "Access is denied.";
  48. break;
  49. #endif
  50. #ifdef ERROR_INVALID_HANDLE
  51. case ERROR_INVALID_HANDLE:
  52. errorname = "ERROR_INVALID_HANDLE";
  53. errormsg = "The handle is invalid.";
  54. break;
  55. #endif
  56. #ifdef ERROR_ARENA_TRASHED
  57. case ERROR_ARENA_TRASHED:
  58. errorname = "ERROR_ARENA_TRASHED";
  59. errormsg = "The storage control blocks were destroyed.";
  60. break;
  61. #endif
  62. #ifdef ERROR_NOT_ENOUGH_MEMORY
  63. case ERROR_NOT_ENOUGH_MEMORY:
  64. errorname = "ERROR_NOT_ENOUGH_MEMORY";
  65. errormsg = "Not enough storage is available to process this command.";
  66. break;
  67. #endif
  68. #ifdef ERROR_INVALID_BLOCK
  69. case ERROR_INVALID_BLOCK:
  70. errorname = "ERROR_INVALID_BLOCK";
  71. errormsg = "The storage control block address is invalid.";
  72. break;
  73. #endif
  74. #ifdef ERROR_BAD_ENVIRONMENT
  75. case ERROR_BAD_ENVIRONMENT:
  76. errorname = "ERROR_BAD_ENVIRONMENT";
  77. errormsg = "The environment is incorrect.";
  78. break;
  79. #endif
  80. #ifdef ERROR_BAD_FORMAT
  81. case ERROR_BAD_FORMAT:
  82. errorname = "ERROR_BAD_FORMAT";
  83. errormsg = "An attempt was made to load a program with an incorrect format.";
  84. break;
  85. #endif
  86. #ifdef ERROR_INVALID_ACCESS
  87. case ERROR_INVALID_ACCESS:
  88. errorname = "ERROR_INVALID_ACCESS";
  89. errormsg = "The access code is invalid.";
  90. break;
  91. #endif
  92. #ifdef ERROR_INVALID_DATA
  93. case ERROR_INVALID_DATA:
  94. errorname = "ERROR_INVALID_DATA";
  95. errormsg = "The data is invalid.";
  96. break;
  97. #endif
  98. #ifdef ERROR_OUTOFMEMORY
  99. case ERROR_OUTOFMEMORY:
  100. errorname = "ERROR_OUTOFMEMORY";
  101. errormsg = "Not enough storage is available to complete this operation.";
  102. break;
  103. #endif
  104. #ifdef ERROR_INVALID_DRIVE
  105. case ERROR_INVALID_DRIVE:
  106. errorname = "ERROR_INVALID_DRIVE";
  107. errormsg = "The system cannot find the drive specified.";
  108. break;
  109. #endif
  110. #ifdef ERROR_CURRENT_DIRECTORY
  111. case ERROR_CURRENT_DIRECTORY:
  112. errorname = "ERROR_CURRENT_DIRECTORY";
  113. errormsg = "The directory cannot be removed.";
  114. break;
  115. #endif
  116. #ifdef ERROR_NOT_SAME_DEVICE
  117. case ERROR_NOT_SAME_DEVICE:
  118. errorname = "ERROR_NOT_SAME_DEVICE";
  119. errormsg = "The system cannot move the file to a different disk drive.";
  120. break;
  121. #endif
  122. #ifdef ERROR_NO_MORE_FILES
  123. case ERROR_NO_MORE_FILES:
  124. errorname = "ERROR_NO_MORE_FILES";
  125. errormsg = "There are no more files.";
  126. break;
  127. #endif
  128. #ifdef ERROR_WRITE_PROTECT
  129. case ERROR_WRITE_PROTECT:
  130. errorname = "ERROR_WRITE_PROTECT";
  131. errormsg = "The media is write protected.";
  132. break;
  133. #endif
  134. #ifdef ERROR_BAD_UNIT
  135. case ERROR_BAD_UNIT:
  136. errorname = "ERROR_BAD_UNIT";
  137. errormsg = "The system cannot find the device specified.";
  138. break;
  139. #endif
  140. #ifdef ERROR_NOT_READY
  141. case ERROR_NOT_READY:
  142. errorname = "ERROR_NOT_READY";
  143. errormsg = "The device is not ready.";
  144. break;
  145. #endif
  146. #ifdef ERROR_BAD_COMMAND
  147. case ERROR_BAD_COMMAND:
  148. errorname = "ERROR_BAD_COMMAND";
  149. errormsg = "The device does not recognize the command.";
  150. break;
  151. #endif
  152. #ifdef ERROR_CRC
  153. case ERROR_CRC:
  154. errorname = "ERROR_CRC";
  155. errormsg = "Data error (cyclic redundancy check)";
  156. break;
  157. #endif
  158. #ifdef ERROR_BAD_LENGTH
  159. case ERROR_BAD_LENGTH:
  160. errorname = "ERROR_BAD_LENGTH";
  161. errormsg = "The program issued a command but the command length is incorrect.";
  162. break;
  163. #endif
  164. #ifdef ERROR_SEEK
  165. case ERROR_SEEK:
  166. errorname = "ERROR_SEEK";
  167. errormsg = "The drive cannot locate a specific area or track on the disk.";
  168. break;
  169. #endif
  170. #ifdef ERROR_NOT_DOS_DISK
  171. case ERROR_NOT_DOS_DISK:
  172. errorname = "ERROR_NOT_DOS_DISK";
  173. errormsg = "The specified disk or diskette cannot be accessed.";
  174. break;
  175. #endif
  176. #ifdef ERROR_SECTOR_NOT_FOUND
  177. case ERROR_SECTOR_NOT_FOUND:
  178. errorname = "ERROR_SECTOR_NOT_FOUND";
  179. errormsg = "The drive cannot find the sector requested.";
  180. break;
  181. #endif
  182. #ifdef ERROR_OUT_OF_PAPER
  183. case ERROR_OUT_OF_PAPER:
  184. errorname = "ERROR_OUT_OF_PAPER";
  185. errormsg = "The printer is out of paper.";
  186. break;
  187. #endif
  188. #ifdef ERROR_WRITE_FAULT
  189. case ERROR_WRITE_FAULT:
  190. errorname = "ERROR_WRITE_FAULT";
  191. errormsg = "The system cannot write to the specified device.";
  192. break;
  193. #endif
  194. #ifdef ERROR_READ_FAULT
  195. case ERROR_READ_FAULT:
  196. errorname = "ERROR_READ_FAULT";
  197. errormsg = "The system cannot read from the specified device.";
  198. break;
  199. #endif
  200. #ifdef ERROR_GEN_FAILURE
  201. case ERROR_GEN_FAILURE:
  202. errorname = "ERROR_GEN_FAILURE";
  203. errormsg = "A device attached to the system is not functioning.";
  204. break;
  205. #endif
  206. #ifdef ERROR_SHARING_VIOLATION
  207. case ERROR_SHARING_VIOLATION:
  208. errorname = "ERROR_SHARING_VIOLATION";
  209. errormsg = "The process cannot access the file because it is being used by another process.";
  210. break;
  211. #endif
  212. #ifdef ERROR_LOCK_VIOLATION
  213. case ERROR_LOCK_VIOLATION:
  214. errorname = "ERROR_LOCK_VIOLATION";
  215. errormsg = "The process cannot access the file because another process has locked a portion of the file.";
  216. break;
  217. #endif
  218. #ifdef ERROR_WRONG_DISK
  219. case ERROR_WRONG_DISK:
  220. errorname = "ERROR_WRONG_DISK";
  221. errormsg = "The wrong diskette is in the drive. Insert %2 (Volume Serial Number: %3) into drive %1.";
  222. break;
  223. #endif
  224. #ifdef ERROR_SHARING_BUFFER_EXCEEDED
  225. case ERROR_SHARING_BUFFER_EXCEEDED:
  226. errorname = "ERROR_SHARING_BUFFER_EXCEEDED";
  227. errormsg = "Too many files opened for sharing.";
  228. break;
  229. #endif
  230. #ifdef ERROR_HANDLE_EOF
  231. case ERROR_HANDLE_EOF:
  232. errorname = "ERROR_HANDLE_EOF";
  233. errormsg = "Reached end of file.";
  234. break;
  235. #endif
  236. #ifdef ERROR_HANDLE_DISK_FULL
  237. case ERROR_HANDLE_DISK_FULL:
  238. errorname = "ERROR_HANDLE_DISK_FULL";
  239. errormsg = "The disk is full.";
  240. break;
  241. #endif
  242. #ifdef ERROR_NOT_SUPPORTED
  243. case ERROR_NOT_SUPPORTED:
  244. errorname = "ERROR_NOT_SUPPORTED";
  245. errormsg = "The network request is not supported.";
  246. break;
  247. #endif
  248. #ifdef ERROR_REM_NOT_LIST
  249. case ERROR_REM_NOT_LIST:
  250. errorname = "ERROR_REM_NOT_LIST";
  251. errormsg = "The remote computer is not available.";
  252. break;
  253. #endif
  254. #ifdef ERROR_DUP_NAME
  255. case ERROR_DUP_NAME:
  256. errorname = "ERROR_DUP_NAME";
  257. errormsg = "A duplicate name exists on the network.";
  258. break;
  259. #endif
  260. #ifdef ERROR_BAD_NETPATH
  261. case ERROR_BAD_NETPATH:
  262. errorname = "ERROR_BAD_NETPATH";
  263. errormsg = "The network path was not found.";
  264. break;
  265. #endif
  266. #ifdef ERROR_NETWORK_BUSY
  267. case ERROR_NETWORK_BUSY:
  268. errorname = "ERROR_NETWORK_BUSY";
  269. errormsg = "The network is busy.";
  270. break;
  271. #endif
  272. #ifdef ERROR_DEV_NOT_EXIST
  273. case ERROR_DEV_NOT_EXIST:
  274. errorname = "ERROR_DEV_NOT_EXIST";
  275. errormsg = "The specified network resource or device is no longer available.";
  276. break;
  277. #endif
  278. #ifdef ERROR_TOO_MANY_CMDS
  279. case ERROR_TOO_MANY_CMDS:
  280. errorname = "ERROR_TOO_MANY_CMDS";
  281. errormsg = "The network BIOS command limit has been reached.";
  282. break;
  283. #endif
  284. #ifdef ERROR_ADAP_HDW_ERR
  285. case ERROR_ADAP_HDW_ERR:
  286. errorname = "ERROR_ADAP_HDW_ERR";
  287. errormsg = "A network adapter hardware error occurred.";
  288. break;
  289. #endif
  290. #ifdef ERROR_BAD_NET_RESP
  291. case ERROR_BAD_NET_RESP:
  292. errorname = "ERROR_BAD_NET_RESP";
  293. errormsg = "The specified server cannot perform the requested operation.";
  294. break;
  295. #endif
  296. #ifdef ERROR_UNEXP_NET_ERR
  297. case ERROR_UNEXP_NET_ERR:
  298. errorname = "ERROR_UNEXP_NET_ERR";
  299. errormsg = "An unexpected network error occurred.";
  300. break;
  301. #endif
  302. #ifdef ERROR_BAD_REM_ADAP
  303. case ERROR_BAD_REM_ADAP:
  304. errorname = "ERROR_BAD_REM_ADAP";
  305. errormsg = "The remote adapter is not compatible.";
  306. break;
  307. #endif
  308. #ifdef ERROR_PRINTQ_FULL
  309. case ERROR_PRINTQ_FULL:
  310. errorname = "ERROR_PRINTQ_FULL";
  311. errormsg = "The printer queue is full.";
  312. break;
  313. #endif
  314. #ifdef ERROR_NO_SPOOL_SPACE
  315. case ERROR_NO_SPOOL_SPACE:
  316. errorname = "ERROR_NO_SPOOL_SPACE";
  317. errormsg = "Space to store the file waiting to be printed is not available on the server.";
  318. break;
  319. #endif
  320. #ifdef ERROR_PRINT_CANCELLED
  321. case ERROR_PRINT_CANCELLED:
  322. errorname = "ERROR_PRINT_CANCELLED";
  323. errormsg = "Your file waiting to be printed was deleted.";
  324. break;
  325. #endif
  326. #ifdef ERROR_NETNAME_DELETED
  327. case ERROR_NETNAME_DELETED:
  328. errorname = "ERROR_NETNAME_DELETED";
  329. errormsg = "The specified network name is no longer available.";
  330. break;
  331. #endif
  332. #ifdef ERROR_NETWORK_ACCESS_DENIED
  333. case ERROR_NETWORK_ACCESS_DENIED:
  334. errorname = "ERROR_NETWORK_ACCESS_DENIED";
  335. errormsg = "Network access is denied.";
  336. break;
  337. #endif
  338. #ifdef ERROR_BAD_DEV_TYPE
  339. case ERROR_BAD_DEV_TYPE:
  340. errorname = "ERROR_BAD_DEV_TYPE";
  341. errormsg = "The network resource type is not correct.";
  342. break;
  343. #endif
  344. #ifdef ERROR_BAD_NET_NAME
  345. case ERROR_BAD_NET_NAME:
  346. errorname = "ERROR_BAD_NET_NAME";
  347. errormsg = "The network name cannot be found.";
  348. break;
  349. #endif
  350. #ifdef ERROR_TOO_MANY_NAMES
  351. case ERROR_TOO_MANY_NAMES:
  352. errorname = "ERROR_TOO_MANY_NAMES";
  353. errormsg = "The name limit for the local computer network adapter card was exceeded.";
  354. break;
  355. #endif
  356. #ifdef ERROR_TOO_MANY_SESS
  357. case ERROR_TOO_MANY_SESS:
  358. errorname = "ERROR_TOO_MANY_SESS";
  359. errormsg = "The network BIOS session limit was exceeded.";
  360. break;
  361. #endif
  362. #ifdef ERROR_SHARING_PAUSED
  363. case ERROR_SHARING_PAUSED:
  364. errorname = "ERROR_SHARING_PAUSED";
  365. errormsg = "The remote server has been paused or is in the process of being started.";
  366. break;
  367. #endif
  368. #ifdef ERROR_REQ_NOT_ACCEP
  369. case ERROR_REQ_NOT_ACCEP:
  370. errorname = "ERROR_REQ_NOT_ACCEP";
  371. errormsg = "No more connections can be made to this remote computer at this time because there are already as many connections as the computer can accept.";
  372. break;
  373. #endif
  374. #ifdef ERROR_REDIR_PAUSED
  375. case ERROR_REDIR_PAUSED:
  376. errorname = "ERROR_REDIR_PAUSED";
  377. errormsg = "The specified printer or disk device has been paused.";
  378. break;
  379. #endif
  380. #ifdef ERROR_FILE_EXISTS
  381. case ERROR_FILE_EXISTS:
  382. errorname = "ERROR_FILE_EXISTS";
  383. errormsg = "The file exists.";
  384. break;
  385. #endif
  386. #ifdef ERROR_CANNOT_MAKE
  387. case ERROR_CANNOT_MAKE:
  388. errorname = "ERROR_CANNOT_MAKE";
  389. errormsg = "The directory or file cannot be created.";
  390. break;
  391. #endif
  392. #ifdef ERROR_FAIL_I24
  393. case ERROR_FAIL_I24:
  394. errorname = "ERROR_FAIL_I24";
  395. errormsg = "Fail on INT 24";
  396. break;
  397. #endif
  398. #ifdef ERROR_OUT_OF_STRUCTURES
  399. case ERROR_OUT_OF_STRUCTURES:
  400. errorname = "ERROR_OUT_OF_STRUCTURES";
  401. errormsg = "Storage to process this request is not available.";
  402. break;
  403. #endif
  404. #ifdef ERROR_ALREADY_ASSIGNED
  405. case ERROR_ALREADY_ASSIGNED:
  406. errorname = "ERROR_ALREADY_ASSIGNED";
  407. errormsg = "The local device name is already in use.";
  408. break;
  409. #endif
  410. #ifdef ERROR_INVALID_PASSWORD
  411. case ERROR_INVALID_PASSWORD:
  412. errorname = "ERROR_INVALID_PASSWORD";
  413. errormsg = "The specified network password is not correct.";
  414. break;
  415. #endif
  416. #ifdef ERROR_INVALID_PARAMETER
  417. case ERROR_INVALID_PARAMETER:
  418. errorname = "ERROR_INVALID_PARAMETER";
  419. errormsg = "The parameter is incorrect.";
  420. break;
  421. #endif
  422. #ifdef ERROR_NET_WRITE_FAULT
  423. case ERROR_NET_WRITE_FAULT:
  424. errorname = "ERROR_NET_WRITE_FAULT";
  425. errormsg = "A write fault occurred on the network.";
  426. break;
  427. #endif
  428. #ifdef ERROR_NO_PROC_SLOTS
  429. case ERROR_NO_PROC_SLOTS:
  430. errorname = "ERROR_NO_PROC_SLOTS";
  431. errormsg = "The system cannot start another process at this time.";
  432. break;
  433. #endif
  434. #ifdef ERROR_TOO_MANY_SEMAPHORES
  435. case ERROR_TOO_MANY_SEMAPHORES:
  436. errorname = "ERROR_TOO_MANY_SEMAPHORES";
  437. errormsg = "Cannot create another system semaphore.";
  438. break;
  439. #endif
  440. #ifdef ERROR_EXCL_SEM_ALREADY_OWNED
  441. case ERROR_EXCL_SEM_ALREADY_OWNED:
  442. errorname = "ERROR_EXCL_SEM_ALREADY_OWNED";
  443. errormsg = "The exclusive semaphore is owned by another process.";
  444. break;
  445. #endif
  446. #ifdef ERROR_SEM_IS_SET
  447. case ERROR_SEM_IS_SET:
  448. errorname = "ERROR_SEM_IS_SET";
  449. errormsg = "The semaphore is set and cannot be closed.";
  450. break;
  451. #endif
  452. #ifdef ERROR_TOO_MANY_SEM_REQUESTS
  453. case ERROR_TOO_MANY_SEM_REQUESTS:
  454. errorname = "ERROR_TOO_MANY_SEM_REQUESTS";
  455. errormsg = "The semaphore cannot be set again.";
  456. break;
  457. #endif
  458. #ifdef ERROR_INVALID_AT_INTERRUPT_TIME
  459. case ERROR_INVALID_AT_INTERRUPT_TIME:
  460. errorname = "ERROR_INVALID_AT_INTERRUPT_TIME";
  461. errormsg = "Cannot request exclusive semaphores at interrupt time.";
  462. break;
  463. #endif
  464. #ifdef ERROR_SEM_OWNER_DIED
  465. case ERROR_SEM_OWNER_DIED:
  466. errorname = "ERROR_SEM_OWNER_DIED";
  467. errormsg = "The previous ownership of this semaphore has ended.";
  468. break;
  469. #endif
  470. #ifdef ERROR_SEM_USER_LIMIT
  471. case ERROR_SEM_USER_LIMIT:
  472. errorname = "ERROR_SEM_USER_LIMIT";
  473. errormsg = "Insert the diskette for drive %1.";
  474. break;
  475. #endif
  476. #ifdef ERROR_DISK_CHANGE
  477. case ERROR_DISK_CHANGE:
  478. errorname = "ERROR_DISK_CHANGE";
  479. errormsg = "Program stopped because alternate diskette was not inserted.";
  480. break;
  481. #endif
  482. #ifdef ERROR_DRIVE_LOCKED
  483. case ERROR_DRIVE_LOCKED:
  484. errorname = "ERROR_DRIVE_LOCKED";
  485. errormsg = "The disk is in use or locked by another process.";
  486. break;
  487. #endif
  488. #ifdef ERROR_BROKEN_PIPE
  489. case ERROR_BROKEN_PIPE:
  490. errorname = "ERROR_BROKEN_PIPE";
  491. errormsg = "The pipe has been ended.";
  492. break;
  493. #endif
  494. #ifdef ERROR_OPEN_FAILED
  495. case ERROR_OPEN_FAILED:
  496. errorname = "ERROR_OPEN_FAILED";
  497. errormsg = "The system cannot open the device or file specified.";
  498. break;
  499. #endif
  500. #ifdef ERROR_BUFFER_OVERFLOW
  501. case ERROR_BUFFER_OVERFLOW:
  502. errorname = "ERROR_BUFFER_OVERFLOW";
  503. errormsg = "The file name is too long.";
  504. break;
  505. #endif
  506. #ifdef ERROR_DISK_FULL
  507. case ERROR_DISK_FULL:
  508. errorname = "ERROR_DISK_FULL";
  509. errormsg = "There is not enough space on the disk.";
  510. break;
  511. #endif
  512. #ifdef ERROR_NO_MORE_SEARCH_HANDLES
  513. case ERROR_NO_MORE_SEARCH_HANDLES:
  514. errorname = "ERROR_NO_MORE_SEARCH_HANDLES";
  515. errormsg = "No more internal file identifiers available.";
  516. break;
  517. #endif
  518. #ifdef ERROR_INVALID_TARGET_HANDLE
  519. case ERROR_INVALID_TARGET_HANDLE:
  520. errorname = "ERROR_INVALID_TARGET_HANDLE";
  521. errormsg = "The target internal file identifier is incorrect.";
  522. break;
  523. #endif
  524. #ifdef ERROR_INVALID_CATEGORY
  525. case ERROR_INVALID_CATEGORY:
  526. errorname = "ERROR_INVALID_CATEGORY";
  527. errormsg = "The IOCTL call made by the application program is not correct.";
  528. break;
  529. #endif
  530. #ifdef ERROR_INVALID_VERIFY_SWITCH
  531. case ERROR_INVALID_VERIFY_SWITCH:
  532. errorname = "ERROR_INVALID_VERIFY_SWITCH";
  533. errormsg = "The verify-on-write switch parameter value is not correct.";
  534. break;
  535. #endif
  536. #ifdef ERROR_BAD_DRIVER_LEVEL
  537. case ERROR_BAD_DRIVER_LEVEL:
  538. errorname = "ERROR_BAD_DRIVER_LEVEL";
  539. errormsg = "The system does not support the command requested.";
  540. break;
  541. #endif
  542. #ifdef ERROR_CALL_NOT_IMPLEMENTED
  543. case ERROR_CALL_NOT_IMPLEMENTED:
  544. errorname = "ERROR_CALL_NOT_IMPLEMENTED";
  545. errormsg = "This function is only valid in Win32 mode.";
  546. break;
  547. #endif
  548. #ifdef ERROR_SEM_TIMEOUT
  549. case ERROR_SEM_TIMEOUT:
  550. errorname = "ERROR_SEM_TIMEOUT";
  551. errormsg = "The semaphore timeout period has expired.";
  552. break;
  553. #endif
  554. #ifdef ERROR_INSUFFICIENT_BUFFER
  555. case ERROR_INSUFFICIENT_BUFFER:
  556. errorname = "ERROR_INSUFFICIENT_BUFFER";
  557. errormsg = "The data area passed to a system call is too small.";
  558. break;
  559. #endif
  560. #ifdef ERROR_INVALID_NAME
  561. case ERROR_INVALID_NAME:
  562. errorname = "ERROR_INVALID_NAME";
  563. errormsg = "The filename, directory name, or volume label syntax is incorrect.";
  564. break;
  565. #endif
  566. #ifdef ERROR_INVALID_LEVEL
  567. case ERROR_INVALID_LEVEL:
  568. errorname = "ERROR_INVALID_LEVEL";
  569. errormsg = "The system call level is not correct.";
  570. break;
  571. #endif
  572. #ifdef ERROR_NO_VOLUME_LABEL
  573. case ERROR_NO_VOLUME_LABEL:
  574. errorname = "ERROR_NO_VOLUME_LABEL";
  575. errormsg = "The disk has no volume label.";
  576. break;
  577. #endif
  578. #ifdef ERROR_MOD_NOT_FOUND
  579. case ERROR_MOD_NOT_FOUND:
  580. errorname = "ERROR_MOD_NOT_FOUND";
  581. errormsg = "The specified module could not be found.";
  582. break;
  583. #endif
  584. #ifdef ERROR_PROC_NOT_FOUND
  585. case ERROR_PROC_NOT_FOUND:
  586. errorname = "ERROR_PROC_NOT_FOUND";
  587. errormsg = "The specified procedure could not be found.";
  588. break;
  589. #endif
  590. #ifdef ERROR_WAIT_NO_CHILDREN
  591. case ERROR_WAIT_NO_CHILDREN:
  592. errorname = "ERROR_WAIT_NO_CHILDREN";
  593. errormsg = "There are no child processes to wait for.";
  594. break;
  595. #endif
  596. #ifdef ERROR_CHILD_NOT_COMPLETE
  597. case ERROR_CHILD_NOT_COMPLETE:
  598. errorname = "ERROR_CHILD_NOT_COMPLETE";
  599. errormsg = "The %1 application cannot be run in Win32 mode.";
  600. break;
  601. #endif
  602. #ifdef ERROR_DIRECT_ACCESS_HANDLE
  603. case ERROR_DIRECT_ACCESS_HANDLE:
  604. errorname = "ERROR_DIRECT_ACCESS_HANDLE";
  605. errormsg = "Attempt to use a file handle to an open disk partition for an operation other than raw disk I/O.";
  606. break;
  607. #endif
  608. #ifdef ERROR_NEGATIVE_SEEK
  609. case ERROR_NEGATIVE_SEEK:
  610. errorname = "ERROR_NEGATIVE_SEEK";
  611. errormsg = "An attempt was made to move the file pointer before the beginning of the file.";
  612. break;
  613. #endif
  614. #ifdef ERROR_SEEK_ON_DEVICE
  615. case ERROR_SEEK_ON_DEVICE:
  616. errorname = "ERROR_SEEK_ON_DEVICE";
  617. errormsg = "The file pointer cannot be set on the specified device or file.";
  618. break;
  619. #endif
  620. #ifdef ERROR_IS_JOIN_TARGET
  621. case ERROR_IS_JOIN_TARGET:
  622. errorname = "ERROR_IS_JOIN_TARGET";
  623. errormsg = "A JOIN or SUBST command cannot be used for a drive that contains previously joined drives.";
  624. break;
  625. #endif
  626. #ifdef ERROR_IS_JOINED
  627. case ERROR_IS_JOINED:
  628. errorname = "ERROR_IS_JOINED";
  629. errormsg = "An attempt was made to use a JOIN or SUBST command on a drive that has already been joined.";
  630. break;
  631. #endif
  632. #ifdef ERROR_IS_SUBSTED
  633. case ERROR_IS_SUBSTED:
  634. errorname = "ERROR_IS_SUBSTED";
  635. errormsg = "An attempt was made to use a JOIN or SUBST command on a drive that has already been substituted.";
  636. break;
  637. #endif
  638. #ifdef ERROR_NOT_JOINED
  639. case ERROR_NOT_JOINED:
  640. errorname = "ERROR_NOT_JOINED";
  641. errormsg = "The system tried to delete the JOIN of a drive that is not joined.";
  642. break;
  643. #endif
  644. #ifdef ERROR_NOT_SUBSTED
  645. case ERROR_NOT_SUBSTED:
  646. errorname = "ERROR_NOT_SUBSTED";
  647. errormsg = "The system tried to delete the substitution of a drive that is not substituted.";
  648. break;
  649. #endif
  650. #ifdef ERROR_JOIN_TO_JOIN
  651. case ERROR_JOIN_TO_JOIN:
  652. errorname = "ERROR_JOIN_TO_JOIN";
  653. errormsg = "The system tried to join a drive to a directory on a joined drive.";
  654. break;
  655. #endif
  656. #ifdef ERROR_SUBST_TO_SUBST
  657. case ERROR_SUBST_TO_SUBST:
  658. errorname = "ERROR_SUBST_TO_SUBST";
  659. errormsg = "The system tried to substitute a drive to a directory on a substituted drive.";
  660. break;
  661. #endif
  662. #ifdef ERROR_JOIN_TO_SUBST
  663. case ERROR_JOIN_TO_SUBST:
  664. errorname = "ERROR_JOIN_TO_SUBST";
  665. errormsg = "The system tried to join a drive to a directory on a substituted drive.";
  666. break;
  667. #endif
  668. #ifdef ERROR_SUBST_TO_JOIN
  669. case ERROR_SUBST_TO_JOIN:
  670. errorname = "ERROR_SUBST_TO_JOIN";
  671. errormsg = "The system tried to SUBST a drive to a directory on a joined drive.";
  672. break;
  673. #endif
  674. #ifdef ERROR_BUSY_DRIVE
  675. case ERROR_BUSY_DRIVE:
  676. errorname = "ERROR_BUSY_DRIVE";
  677. errormsg = "The system cannot perform a JOIN or SUBST at this time.";
  678. break;
  679. #endif
  680. #ifdef ERROR_SAME_DRIVE
  681. case ERROR_SAME_DRIVE:
  682. errorname = "ERROR_SAME_DRIVE";
  683. errormsg = "The system cannot join or substitute a drive to or for a directory on the same drive.";
  684. break;
  685. #endif
  686. #ifdef ERROR_DIR_NOT_ROOT
  687. case ERROR_DIR_NOT_ROOT:
  688. errorname = "ERROR_DIR_NOT_ROOT";
  689. errormsg = "The directory is not a subdirectory of the root directory.";
  690. break;
  691. #endif
  692. #ifdef ERROR_DIR_NOT_EMPTY
  693. case ERROR_DIR_NOT_EMPTY:
  694. errorname = "ERROR_DIR_NOT_EMPTY";
  695. errormsg = "The directory is not empty.";
  696. break;
  697. #endif
  698. #ifdef ERROR_IS_SUBST_PATH
  699. case ERROR_IS_SUBST_PATH:
  700. errorname = "ERROR_IS_SUBST_PATH";
  701. errormsg = "The path specified is being used in a substitute.";
  702. break;
  703. #endif
  704. #ifdef ERROR_IS_JOIN_PATH
  705. case ERROR_IS_JOIN_PATH:
  706. errorname = "ERROR_IS_JOIN_PATH";
  707. errormsg = "Not enough resources are available to process this command.";
  708. break;
  709. #endif
  710. #ifdef ERROR_PATH_BUSY
  711. case ERROR_PATH_BUSY:
  712. errorname = "ERROR_PATH_BUSY";
  713. errormsg = "The path specified cannot be used at this time.";
  714. break;
  715. #endif
  716. #ifdef ERROR_IS_SUBST_TARGET
  717. case ERROR_IS_SUBST_TARGET:
  718. errorname = "ERROR_IS_SUBST_TARGET";
  719. errormsg = "An attempt was made to join or substitute a drive for which a directory on the drive is the target of a previous substitute.";
  720. break;
  721. #endif
  722. #ifdef ERROR_SYSTEM_TRACE
  723. case ERROR_SYSTEM_TRACE:
  724. errorname = "ERROR_SYSTEM_TRACE";
  725. errormsg = "System trace information was not specified in your CONFIG.SYS file, or tracing is disallowed.";
  726. break;
  727. #endif
  728. #ifdef ERROR_INVALID_EVENT_COUNT
  729. case ERROR_INVALID_EVENT_COUNT:
  730. errorname = "ERROR_INVALID_EVENT_COUNT";
  731. errormsg = "The number of specified semaphore events for DosMuxSemWait is not correct.";
  732. break;
  733. #endif
  734. #ifdef ERROR_TOO_MANY_MUXWAITERS
  735. case ERROR_TOO_MANY_MUXWAITERS:
  736. errorname = "ERROR_TOO_MANY_MUXWAITERS";
  737. errormsg = "DosMuxSemWait did not execute; too many semaphores are already set.";
  738. break;
  739. #endif
  740. #ifdef ERROR_INVALID_LIST_FORMAT
  741. case ERROR_INVALID_LIST_FORMAT:
  742. errorname = "ERROR_INVALID_LIST_FORMAT";
  743. errormsg = "The DosMuxSemWait list is not correct.";
  744. break;
  745. #endif
  746. #ifdef ERROR_LABEL_TOO_LONG
  747. case ERROR_LABEL_TOO_LONG:
  748. errorname = "ERROR_LABEL_TOO_LONG";
  749. errormsg = "The volume label you entered exceeds the label character limit of the target file system.";
  750. break;
  751. #endif
  752. #ifdef ERROR_TOO_MANY_TCBS
  753. case ERROR_TOO_MANY_TCBS:
  754. errorname = "ERROR_TOO_MANY_TCBS";
  755. errormsg = "Cannot create another thread.";
  756. break;
  757. #endif
  758. #ifdef ERROR_SIGNAL_REFUSED
  759. case ERROR_SIGNAL_REFUSED:
  760. errorname = "ERROR_SIGNAL_REFUSED";
  761. errormsg = "The recipient process has refused the signal.";
  762. break;
  763. #endif
  764. #ifdef ERROR_DISCARDED
  765. case ERROR_DISCARDED:
  766. errorname = "ERROR_DISCARDED";
  767. errormsg = "The segment is already discarded and cannot be locked.";
  768. break;
  769. #endif
  770. #ifdef ERROR_NOT_LOCKED
  771. case ERROR_NOT_LOCKED:
  772. errorname = "ERROR_NOT_LOCKED";
  773. errormsg = "The segment is already unlocked.";
  774. break;
  775. #endif
  776. #ifdef ERROR_BAD_THREADID_ADDR
  777. case ERROR_BAD_THREADID_ADDR:
  778. errorname = "ERROR_BAD_THREADID_ADDR";
  779. errormsg = "The address for the thread ID is not correct.";
  780. break;
  781. #endif
  782. #ifdef ERROR_BAD_ARGUMENTS
  783. case ERROR_BAD_ARGUMENTS:
  784. errorname = "ERROR_BAD_ARGUMENTS";
  785. errormsg = "The argument string passed to DosExecPgm is not correct.";
  786. break;
  787. #endif
  788. #ifdef ERROR_BAD_PATHNAME
  789. case ERROR_BAD_PATHNAME:
  790. errorname = "ERROR_BAD_PATHNAME";
  791. errormsg = "The specified path is invalid.";
  792. break;
  793. #endif
  794. #ifdef ERROR_SIGNAL_PENDING
  795. case ERROR_SIGNAL_PENDING:
  796. errorname = "ERROR_SIGNAL_PENDING";
  797. errormsg = "A signal is already pending.";
  798. break;
  799. #endif
  800. #ifdef ERROR_MAX_THRDS_REACHED
  801. case ERROR_MAX_THRDS_REACHED:
  802. errorname = "ERROR_MAX_THRDS_REACHED";
  803. errormsg = "No more threads can be created in the system.";
  804. break;
  805. #endif
  806. #ifdef ERROR_LOCK_FAILED
  807. case ERROR_LOCK_FAILED:
  808. errorname = "ERROR_LOCK_FAILED";
  809. errormsg = "Unable to lock a region of a file.";
  810. break;
  811. #endif
  812. #ifdef ERROR_BUSY
  813. case ERROR_BUSY:
  814. errorname = "ERROR_BUSY";
  815. errormsg = "The requested resource is in use.";
  816. break;
  817. #endif
  818. #ifdef ERROR_CANCEL_VIOLATION
  819. case ERROR_CANCEL_VIOLATION:
  820. errorname = "ERROR_CANCEL_VIOLATION";
  821. errormsg = "A lock request was not outstanding for the supplied cancel region.";
  822. break;
  823. #endif
  824. #ifdef ERROR_ATOMIC_LOCKS_NOT_SUPPORTED
  825. case ERROR_ATOMIC_LOCKS_NOT_SUPPORTED:
  826. errorname = "ERROR_ATOMIC_LOCKS_NOT_SUPPORTED";
  827. errormsg = "The file system does not support atomic changes to the lock type.";
  828. break;
  829. #endif
  830. #ifdef ERROR_INVALID_SEGMENT_NUMBER
  831. case ERROR_INVALID_SEGMENT_NUMBER:
  832. errorname = "ERROR_INVALID_SEGMENT_NUMBER";
  833. errormsg = "The system detected a segment number that was not correct.";
  834. break;
  835. #endif
  836. #ifdef ERROR_INVALID_ORDINAL
  837. case ERROR_INVALID_ORDINAL:
  838. errorname = "ERROR_INVALID_ORDINAL";
  839. errormsg = "The operating system cannot run %1.";
  840. break;
  841. #endif
  842. #ifdef ERROR_ALREADY_EXISTS
  843. case ERROR_ALREADY_EXISTS:
  844. errorname = "ERROR_ALREADY_EXISTS";
  845. errormsg = "Cannot create a file when that file already exists.";
  846. break;
  847. #endif
  848. #ifdef ERROR_INVALID_FLAG_NUMBER
  849. case ERROR_INVALID_FLAG_NUMBER:
  850. errorname = "ERROR_INVALID_FLAG_NUMBER";
  851. errormsg = "The flag passed is not correct.";
  852. break;
  853. #endif
  854. #ifdef ERROR_SEM_NOT_FOUND
  855. case ERROR_SEM_NOT_FOUND:
  856. errorname = "ERROR_SEM_NOT_FOUND";
  857. errormsg = "The specified system semaphore name was not found.";
  858. break;
  859. #endif
  860. #ifdef ERROR_INVALID_STARTING_CODESEG
  861. case ERROR_INVALID_STARTING_CODESEG:
  862. errorname = "ERROR_INVALID_STARTING_CODESEG";
  863. errormsg = "The operating system cannot run %1.";
  864. break;
  865. #endif
  866. #ifdef ERROR_INVALID_STACKSEG
  867. case ERROR_INVALID_STACKSEG:
  868. errorname = "ERROR_INVALID_STACKSEG";
  869. errormsg = "The operating system cannot run %1.";
  870. break;
  871. #endif
  872. #ifdef ERROR_INVALID_MODULETYPE
  873. case ERROR_INVALID_MODULETYPE:
  874. errorname = "ERROR_INVALID_MODULETYPE";
  875. errormsg = "The operating system cannot run %1.";
  876. break;
  877. #endif
  878. #ifdef ERROR_INVALID_EXE_SIGNATURE
  879. case ERROR_INVALID_EXE_SIGNATURE:
  880. errorname = "ERROR_INVALID_EXE_SIGNATURE";
  881. errormsg = "Cannot run %1 in Win32 mode.";
  882. break;
  883. #endif
  884. #ifdef ERROR_EXE_MARKED_INVALID
  885. case ERROR_EXE_MARKED_INVALID:
  886. errorname = "ERROR_EXE_MARKED_INVALID";
  887. errormsg = "The operating system cannot run %1.";
  888. break;
  889. #endif
  890. #ifdef ERROR_BAD_EXE_FORMAT
  891. case ERROR_BAD_EXE_FORMAT:
  892. errorname = "ERROR_BAD_EXE_FORMAT";
  893. errormsg = "%1 is not a valid Win32 application.";
  894. break;
  895. #endif
  896. #ifdef ERROR_ITERATED_DATA_EXCEEDS_64k
  897. case ERROR_ITERATED_DATA_EXCEEDS_64k:
  898. errorname = "ERROR_ITERATED_DATA_EXCEEDS_64k";
  899. errormsg = "The operating system cannot run %1.";
  900. break;
  901. #endif
  902. #ifdef ERROR_INVALID_MINALLOCSIZE
  903. case ERROR_INVALID_MINALLOCSIZE:
  904. errorname = "ERROR_INVALID_MINALLOCSIZE";
  905. errormsg = "The operating system cannot run %1.";
  906. break;
  907. #endif
  908. #ifdef ERROR_DYNLINK_FROM_INVALID_RING
  909. case ERROR_DYNLINK_FROM_INVALID_RING:
  910. errorname = "ERROR_DYNLINK_FROM_INVALID_RING";
  911. errormsg = "The operating system cannot run this application program.";
  912. break;
  913. #endif
  914. #ifdef ERROR_IOPL_NOT_ENABLED
  915. case ERROR_IOPL_NOT_ENABLED:
  916. errorname = "ERROR_IOPL_NOT_ENABLED";
  917. errormsg = "The operating system is not presently configured to run this application.";
  918. break;
  919. #endif
  920. #ifdef ERROR_INVALID_SEGDPL
  921. case ERROR_INVALID_SEGDPL:
  922. errorname = "ERROR_INVALID_SEGDPL";
  923. errormsg = "The operating system cannot run %1.";
  924. break;
  925. #endif
  926. #ifdef ERROR_AUTODATASEG_EXCEEDS_64k
  927. case ERROR_AUTODATASEG_EXCEEDS_64k:
  928. errorname = "ERROR_AUTODATASEG_EXCEEDS_64k";
  929. errormsg = "The operating system cannot run this application program.";
  930. break;
  931. #endif
  932. #ifdef ERROR_RING2SEG_MUST_BE_MOVABLE
  933. case ERROR_RING2SEG_MUST_BE_MOVABLE:
  934. errorname = "ERROR_RING2SEG_MUST_BE_MOVABLE";
  935. errormsg = "The code segment cannot be greater than or equal to 64KB.";
  936. break;
  937. #endif
  938. #ifdef ERROR_RELOC_CHAIN_XEEDS_SEGLIM
  939. case ERROR_RELOC_CHAIN_XEEDS_SEGLIM:
  940. errorname = "ERROR_RELOC_CHAIN_XEEDS_SEGLIM";
  941. errormsg = "The operating system cannot run %1.";
  942. break;
  943. #endif
  944. #ifdef ERROR_INFLOOP_IN_RELOC_CHAIN
  945. case ERROR_INFLOOP_IN_RELOC_CHAIN:
  946. errorname = "ERROR_INFLOOP_IN_RELOC_CHAIN";
  947. errormsg = "The operating system cannot run %1.";
  948. break;
  949. #endif
  950. #ifdef ERROR_ENVVAR_NOT_FOUND
  951. case ERROR_ENVVAR_NOT_FOUND:
  952. errorname = "ERROR_ENVVAR_NOT_FOUND";
  953. errormsg = "The system could not find the environment option that was entered.";
  954. break;
  955. #endif
  956. #ifdef ERROR_NO_SIGNAL_SENT
  957. case ERROR_NO_SIGNAL_SENT:
  958. errorname = "ERROR_NO_SIGNAL_SENT";
  959. errormsg = "No process in the command subtree has a signal handler.";
  960. break;
  961. #endif
  962. #ifdef ERROR_FILENAME_EXCED_RANGE
  963. case ERROR_FILENAME_EXCED_RANGE:
  964. errorname = "ERROR_FILENAME_EXCED_RANGE";
  965. errormsg = "The filename or extension is too long.";
  966. break;
  967. #endif
  968. #ifdef ERROR_RING2_STACK_IN_USE
  969. case ERROR_RING2_STACK_IN_USE:
  970. errorname = "ERROR_RING2_STACK_IN_USE";
  971. errormsg = "The ring 2 stack is in use.";
  972. break;
  973. #endif
  974. #ifdef ERROR_META_EXPANSION_TOO_LONG
  975. case ERROR_META_EXPANSION_TOO_LONG:
  976. errorname = "ERROR_META_EXPANSION_TOO_LONG";
  977. errormsg = "The global filename characters, * or ?, are entered incorrectly or too many global filename characters are specified.";
  978. break;
  979. #endif
  980. #ifdef ERROR_INVALID_SIGNAL_NUMBER
  981. case ERROR_INVALID_SIGNAL_NUMBER:
  982. errorname = "ERROR_INVALID_SIGNAL_NUMBER";
  983. errormsg = "The signal being posted is not correct.";
  984. break;
  985. #endif
  986. #ifdef ERROR_THREAD_1_INACTIVE
  987. case ERROR_THREAD_1_INACTIVE:
  988. errorname = "ERROR_THREAD_1_INACTIVE";
  989. errormsg = "The signal handler cannot be set.";
  990. break;
  991. #endif
  992. #ifdef ERROR_LOCKED
  993. case ERROR_LOCKED:
  994. errorname = "ERROR_LOCKED";
  995. errormsg = "The segment is locked and cannot be reallocated.";
  996. break;
  997. #endif
  998. #ifdef ERROR_TOO_MANY_MODULES
  999. case ERROR_TOO_MANY_MODULES:
  1000. errorname = "ERROR_TOO_MANY_MODULES";
  1001. errormsg = "Too many dynamic link modules are attached to this program or dynamic link module.";
  1002. break;
  1003. #endif
  1004. #ifdef ERROR_NESTING_NOT_ALLOWED
  1005. case ERROR_NESTING_NOT_ALLOWED:
  1006. errorname = "ERROR_NESTING_NOT_ALLOWED";
  1007. errormsg = "Cannot nest calls to LoadModule.";
  1008. break;
  1009. #endif
  1010. #ifdef ERROR_BAD_PIPE
  1011. case ERROR_BAD_PIPE:
  1012. errorname = "ERROR_BAD_PIPE";
  1013. errormsg = "The pipe state is invalid.";
  1014. break;
  1015. #endif
  1016. #ifdef ERROR_PIPE_BUSY
  1017. case ERROR_PIPE_BUSY:
  1018. errorname = "ERROR_PIPE_BUSY";
  1019. errormsg = "All pipe instances are busy.";
  1020. break;
  1021. #endif
  1022. #ifdef ERROR_NO_DATA
  1023. case ERROR_NO_DATA:
  1024. errorname = "ERROR_NO_DATA";
  1025. errormsg = "The pipe is being closed.";
  1026. break;
  1027. #endif
  1028. #ifdef ERROR_PIPE_NOT_CONNECTED
  1029. case ERROR_PIPE_NOT_CONNECTED:
  1030. errorname = "ERROR_PIPE_NOT_CONNECTED";
  1031. errormsg = "No process is on the other end of the pipe.";
  1032. break;
  1033. #endif
  1034. #ifdef ERROR_MORE_DATA
  1035. case ERROR_MORE_DATA:
  1036. errorname = "ERROR_MORE_DATA";
  1037. errormsg = "More data is available.";
  1038. break;
  1039. #endif
  1040. #ifdef ERROR_VC_DISCONNECTED
  1041. case ERROR_VC_DISCONNECTED:
  1042. errorname = "ERROR_VC_DISCONNECTED";
  1043. errormsg = "The session was cancelled.";
  1044. break;
  1045. #endif
  1046. #ifdef ERROR_INVALID_EA_NAME
  1047. case ERROR_INVALID_EA_NAME:
  1048. errorname = "ERROR_INVALID_EA_NAME";
  1049. errormsg = "The specified extended attribute name was invalid.";
  1050. break;
  1051. #endif
  1052. #ifdef ERROR_EA_LIST_INCONSISTENT
  1053. case ERROR_EA_LIST_INCONSISTENT:
  1054. errorname = "ERROR_EA_LIST_INCONSISTENT";
  1055. errormsg = "The extended attributes are inconsistent.";
  1056. break;
  1057. #endif
  1058. #ifdef ERROR_NO_MORE_ITEMS
  1059. case ERROR_NO_MORE_ITEMS:
  1060. errorname = "ERROR_NO_MORE_ITEMS";
  1061. errormsg = "No more data is available.";
  1062. break;
  1063. #endif
  1064. #ifdef ERROR_CANNOT_COPY
  1065. case ERROR_CANNOT_COPY:
  1066. errorname = "ERROR_CANNOT_COPY";
  1067. errormsg = "The Copy API cannot be used.";
  1068. break;
  1069. #endif
  1070. #ifdef ERROR_DIRECTORY
  1071. case ERROR_DIRECTORY:
  1072. errorname = "ERROR_DIRECTORY";
  1073. errormsg = "The directory name is invalid.";
  1074. break;
  1075. #endif
  1076. #ifdef ERROR_EAS_DIDNT_FIT
  1077. case ERROR_EAS_DIDNT_FIT:
  1078. errorname = "ERROR_EAS_DIDNT_FIT";
  1079. errormsg = "The extended attributes did not fit in the buffer.";
  1080. break;
  1081. #endif
  1082. #ifdef ERROR_EA_FILE_CORRUPT
  1083. case ERROR_EA_FILE_CORRUPT:
  1084. errorname = "ERROR_EA_FILE_CORRUPT";
  1085. errormsg = "The extended attribute file on the mounted file system is corrupt.";
  1086. break;
  1087. #endif
  1088. #ifdef ERROR_EA_TABLE_FULL
  1089. case ERROR_EA_TABLE_FULL:
  1090. errorname = "ERROR_EA_TABLE_FULL";
  1091. errormsg = "The extended attribute table file is full.";
  1092. break;
  1093. #endif
  1094. #ifdef ERROR_INVALID_EA_HANDLE
  1095. case ERROR_INVALID_EA_HANDLE:
  1096. errorname = "ERROR_INVALID_EA_HANDLE";
  1097. errormsg = "The specified extended attribute handle is invalid.";
  1098. break;
  1099. #endif
  1100. #ifdef ERROR_EAS_NOT_SUPPORTED
  1101. case ERROR_EAS_NOT_SUPPORTED:
  1102. errorname = "ERROR_EAS_NOT_SUPPORTED";
  1103. errormsg = "The mounted file system does not support extended attributes.";
  1104. break;
  1105. #endif
  1106. #ifdef ERROR_NOT_OWNER
  1107. case ERROR_NOT_OWNER:
  1108. errorname = "ERROR_NOT_OWNER";
  1109. errormsg = "Attempt to release mutex not owned by caller.";
  1110. break;
  1111. #endif
  1112. #ifdef ERROR_TOO_MANY_POSTS
  1113. case ERROR_TOO_MANY_POSTS:
  1114. errorname = "ERROR_TOO_MANY_POSTS";
  1115. errormsg = "Too many posts were made to a semaphore.";
  1116. break;
  1117. #endif
  1118. #ifdef ERROR_PARTIAL_COPY
  1119. case ERROR_PARTIAL_COPY:
  1120. errorname = "ERROR_PARTIAL_COPY";
  1121. errormsg = "Only part of a Read/WriteProcessMemory request was completed.";
  1122. break;
  1123. #endif
  1124. #ifdef ERROR_MR_MID_NOT_FOUND
  1125. case ERROR_MR_MID_NOT_FOUND:
  1126. errorname = "ERROR_MR_MID_NOT_FOUND";
  1127. errormsg = "The system cannot find message for message number 0x%1 in message file for %2.";
  1128. break;
  1129. #endif
  1130. #ifdef ERROR_INVALID_ADDRESS
  1131. case ERROR_INVALID_ADDRESS:
  1132. errorname = "ERROR_INVALID_ADDRESS";
  1133. errormsg = "Attempt to access invalid address.";
  1134. break;
  1135. #endif
  1136. #ifdef ERROR_ARITHMETIC_OVERFLOW
  1137. case ERROR_ARITHMETIC_OVERFLOW:
  1138. errorname = "ERROR_ARITHMETIC_OVERFLOW";
  1139. errormsg = "Arithmetic result exceeded 32 bits.";
  1140. break;
  1141. #endif
  1142. #ifdef ERROR_PIPE_CONNECTED
  1143. case ERROR_PIPE_CONNECTED:
  1144. errorname = "ERROR_PIPE_CONNECTED";
  1145. errormsg = "There is a process on other end of the pipe.";
  1146. break;
  1147. #endif
  1148. #ifdef ERROR_PIPE_LISTENING
  1149. case ERROR_PIPE_LISTENING:
  1150. errorname = "ERROR_PIPE_LISTENING";
  1151. errormsg = "Waiting for a process to open the other end of the pipe.";
  1152. break;
  1153. #endif
  1154. #ifdef ERROR_EA_ACCESS_DENIED
  1155. case ERROR_EA_ACCESS_DENIED:
  1156. errorname = "ERROR_EA_ACCESS_DENIED";
  1157. errormsg = "Access to the extended attribute was denied.";
  1158. break;
  1159. #endif
  1160. #ifdef ERROR_OPERATION_ABORTED
  1161. case ERROR_OPERATION_ABORTED:
  1162. errorname = "ERROR_OPERATION_ABORTED";
  1163. errormsg = "The I/O operation has been aborted because of either a thread exit or an application request.";
  1164. break;
  1165. #endif
  1166. #ifdef ERROR_IO_INCOMPLETE
  1167. case ERROR_IO_INCOMPLETE:
  1168. errorname = "ERROR_IO_INCOMPLETE";
  1169. errormsg = "Overlapped I/O event is not in a signalled state.";
  1170. break;
  1171. #endif
  1172. #ifdef ERROR_IO_PENDING
  1173. case ERROR_IO_PENDING:
  1174. errorname = "ERROR_IO_PENDING";
  1175. errormsg = "Overlapped I/O operation is in progress.";
  1176. break;
  1177. #endif
  1178. #ifdef ERROR_NOACCESS
  1179. case ERROR_NOACCESS:
  1180. errorname = "ERROR_NOACCESS";
  1181. errormsg = "Invalid access to memory location.";
  1182. break;
  1183. #endif
  1184. #ifdef ERROR_SWAPERROR
  1185. case ERROR_SWAPERROR:
  1186. errorname = "ERROR_SWAPERROR";
  1187. errormsg = "Error performing inpage operation.";
  1188. break;
  1189. #endif
  1190. #ifdef ERROR_STACK_OVERFLOW
  1191. case ERROR_STACK_OVERFLOW:
  1192. errorname = "ERROR_STACK_OVERFLOW";
  1193. errormsg = "Recursion too deep, stack overflowed.";
  1194. break;
  1195. #endif
  1196. #ifdef ERROR_INVALID_MESSAGE
  1197. case ERROR_INVALID_MESSAGE:
  1198. errorname = "ERROR_INVALID_MESSAGE";
  1199. errormsg = "The window cannot act on the sent message.";
  1200. break;
  1201. #endif
  1202. #ifdef ERROR_CAN_NOT_COMPLETE
  1203. case ERROR_CAN_NOT_COMPLETE:
  1204. errorname = "ERROR_CAN_NOT_COMPLETE";
  1205. errormsg = "Cannot complete this function.";
  1206. break;
  1207. #endif
  1208. #ifdef ERROR_INVALID_FLAGS
  1209. case ERROR_INVALID_FLAGS:
  1210. errorname = "ERROR_INVALID_FLAGS";
  1211. errormsg = "Invalid flags.";
  1212. break;
  1213. #endif
  1214. #ifdef ERROR_UNRECOGNIZED_VOLUME
  1215. case ERROR_UNRECOGNIZED_VOLUME:
  1216. errorname = "ERROR_UNRECOGNIZED_VOLUME";
  1217. errormsg = "The volume does not contain a recognized file system. Please make sure that all required file system drivers are loaded and that the volume is not corrupt.";
  1218. break;
  1219. #endif
  1220. #ifdef ERROR_FILE_INVALID
  1221. case ERROR_FILE_INVALID:
  1222. errorname = "ERROR_FILE_INVALID";
  1223. errormsg = "The volume for a file has been externally altered such that the opened file is no longer valid.";
  1224. break;
  1225. #endif
  1226. #ifdef ERROR_FULLSCREEN_MODE
  1227. case ERROR_FULLSCREEN_MODE:
  1228. errorname = "ERROR_FULLSCREEN_MODE";
  1229. errormsg = "The requested operation cannot be performed in full-screen mode.";
  1230. break;
  1231. #endif
  1232. #ifdef ERROR_NO_TOKEN
  1233. case ERROR_NO_TOKEN:
  1234. errorname = "ERROR_NO_TOKEN";
  1235. errormsg = "An attempt was made to reference a token that does not exist.";
  1236. break;
  1237. #endif
  1238. #ifdef ERROR_BADDB
  1239. case ERROR_BADDB:
  1240. errorname = "ERROR_BADDB";
  1241. errormsg = "The configuration registry database is corrupt.";
  1242. break;
  1243. #endif
  1244. #ifdef ERROR_BADKEY
  1245. case ERROR_BADKEY:
  1246. errorname = "ERROR_BADKEY";
  1247. errormsg = "The configuration registry key is invalid.";
  1248. break;
  1249. #endif
  1250. #ifdef ERROR_CANTOPEN
  1251. case ERROR_CANTOPEN:
  1252. errorname = "ERROR_CANTOPEN";
  1253. errormsg = "The configuration registry key could not be opened.";
  1254. break;
  1255. #endif
  1256. #ifdef ERROR_CANTREAD
  1257. case ERROR_CANTREAD:
  1258. errorname = "ERROR_CANTREAD";
  1259. errormsg = "The configuration registry key could not be read.";
  1260. break;
  1261. #endif
  1262. #ifdef ERROR_CANTWRITE
  1263. case ERROR_CANTWRITE:
  1264. errorname = "ERROR_CANTWRITE";
  1265. errormsg = "The configuration registry key could not be written.";
  1266. break;
  1267. #endif
  1268. #ifdef ERROR_REGISTRY_RECOVERED
  1269. case ERROR_REGISTRY_RECOVERED:
  1270. errorname = "ERROR_REGISTRY_RECOVERED";
  1271. errormsg = "One of the files in the Registry database had to be recovered by use of a log or alternate copy. The recovery was successful.";
  1272. break;
  1273. #endif
  1274. #ifdef ERROR_REGISTRY_CORRUPT
  1275. case ERROR_REGISTRY_CORRUPT:
  1276. errorname = "ERROR_REGISTRY_CORRUPT";
  1277. errormsg = "The Registry is corrupt. The structure of one of the files that contains Registry data is corrupt, or the system's image of the file in memory is corrupt, or the file could not be recovered because the alternate copy or log was absent or corrupt.";
  1278. break;
  1279. #endif
  1280. #ifdef ERROR_REGISTRY_IO_FAILED
  1281. case ERROR_REGISTRY_IO_FAILED:
  1282. errorname = "ERROR_REGISTRY_IO_FAILED";
  1283. errormsg = "An I/O operation initiated by the Registry failed unrecoverably. The Registry could not read in, or write out, or flush, one of the files that contain the system's image of the Registry.";
  1284. break;
  1285. #endif
  1286. #ifdef ERROR_NOT_REGISTRY_FILE
  1287. case ERROR_NOT_REGISTRY_FILE:
  1288. errorname = "ERROR_NOT_REGISTRY_FILE";
  1289. errormsg = "The system has attempted to load or restore a file into the Registry, but the specified file is not in a Registry file format.";
  1290. break;
  1291. #endif
  1292. #ifdef ERROR_KEY_DELETED
  1293. case ERROR_KEY_DELETED:
  1294. errorname = "ERROR_KEY_DELETED";
  1295. errormsg = "Illegal operation attempted on a Registry key which has been marked for deletion.";
  1296. break;
  1297. #endif
  1298. #ifdef ERROR_NO_LOG_SPACE
  1299. case ERROR_NO_LOG_SPACE:
  1300. errorname = "ERROR_NO_LOG_SPACE";
  1301. errormsg = "System could not allocate the required space in a Registry log.";
  1302. break;
  1303. #endif
  1304. #ifdef ERROR_KEY_HAS_CHILDREN
  1305. case ERROR_KEY_HAS_CHILDREN:
  1306. errorname = "ERROR_KEY_HAS_CHILDREN";
  1307. errormsg = "Cannot create a symbolic link in a Registry key that already has subkeys or values.";
  1308. break;
  1309. #endif
  1310. #ifdef ERROR_CHILD_MUST_BE_VOLATILE
  1311. case ERROR_CHILD_MUST_BE_VOLATILE:
  1312. errorname = "ERROR_CHILD_MUST_BE_VOLATILE";
  1313. errormsg = "Cannot create a stable subkey under a volatile parent key.";
  1314. break;
  1315. #endif
  1316. #ifdef ERROR_NOTIFY_ENUM_DIR
  1317. case ERROR_NOTIFY_ENUM_DIR:
  1318. errorname = "ERROR_NOTIFY_ENUM_DIR";
  1319. errormsg = "A notify change request is being completed and the information is not being returned in the caller's buffer. The caller now needs to enumerate the files to find the changes.";
  1320. break;
  1321. #endif
  1322. #ifdef ERROR_DEPENDENT_SERVICES_RUNNING
  1323. case ERROR_DEPENDENT_SERVICES_RUNNING:
  1324. errorname = "ERROR_DEPENDENT_SERVICES_RUNNING";
  1325. errormsg = "A stop control has been sent to a service which other running services are dependent on.";
  1326. break;
  1327. #endif
  1328. #ifdef ERROR_INVALID_SERVICE_CONTROL
  1329. case ERROR_INVALID_SERVICE_CONTROL:
  1330. errorname = "ERROR_INVALID_SERVICE_CONTROL";
  1331. errormsg = "The requested control is not valid for this service.";
  1332. break;
  1333. #endif
  1334. #ifdef ERROR_SERVICE_REQUEST_TIMEOUT
  1335. case ERROR_SERVICE_REQUEST_TIMEOUT:
  1336. errorname = "ERROR_SERVICE_REQUEST_TIMEOUT";
  1337. errormsg = "The service did not respond to the start or control request in a timely fashion.";
  1338. break;
  1339. #endif
  1340. #ifdef ERROR_SERVICE_NO_THREAD
  1341. case ERROR_SERVICE_NO_THREAD:
  1342. errorname = "ERROR_SERVICE_NO_THREAD";
  1343. errormsg = "A thread could not be created for the service.";
  1344. break;
  1345. #endif
  1346. #ifdef ERROR_SERVICE_DATABASE_LOCKED
  1347. case ERROR_SERVICE_DATABASE_LOCKED:
  1348. errorname = "ERROR_SERVICE_DATABASE_LOCKED";
  1349. errormsg = "The service database is locked.";
  1350. break;
  1351. #endif
  1352. #ifdef ERROR_SERVICE_ALREADY_RUNNING
  1353. case ERROR_SERVICE_ALREADY_RUNNING:
  1354. errorname = "ERROR_SERVICE_ALREADY_RUNNING";
  1355. errormsg = "An instance of the service is already running.";
  1356. break;
  1357. #endif
  1358. #ifdef ERROR_INVALID_SERVICE_ACCOUNT
  1359. case ERROR_INVALID_SERVICE_ACCOUNT:
  1360. errorname = "ERROR_INVALID_SERVICE_ACCOUNT";
  1361. errormsg = "The account name is invalid or does not exist.";
  1362. break;
  1363. #endif
  1364. #ifdef ERROR_SERVICE_DISABLED
  1365. case ERROR_SERVICE_DISABLED:
  1366. errorname = "ERROR_SERVICE_DISABLED";
  1367. errormsg = "The specified service is disabled and cannot be started.";
  1368. break;
  1369. #endif
  1370. #ifdef ERROR_CIRCULAR_DEPENDENCY
  1371. case ERROR_CIRCULAR_DEPENDENCY:
  1372. errorname = "ERROR_CIRCULAR_DEPENDENCY";
  1373. errormsg = "Circular service dependency was specified.";
  1374. break;
  1375. #endif
  1376. #ifdef ERROR_SERVICE_DOES_NOT_EXIST
  1377. case ERROR_SERVICE_DOES_NOT_EXIST:
  1378. errorname = "ERROR_SERVICE_DOES_NOT_EXIST";
  1379. errormsg = "The specified service does not exist as an installed service.";
  1380. break;
  1381. #endif
  1382. #ifdef ERROR_SERVICE_CANNOT_ACCEPT_CTRL
  1383. case ERROR_SERVICE_CANNOT_ACCEPT_CTRL:
  1384. errorname = "ERROR_SERVICE_CANNOT_ACCEPT_CTRL";
  1385. errormsg = "The service cannot accept control messages at this time.";
  1386. break;
  1387. #endif
  1388. #ifdef ERROR_SERVICE_NOT_ACTIVE
  1389. case ERROR_SERVICE_NOT_ACTIVE:
  1390. errorname = "ERROR_SERVICE_NOT_ACTIVE";
  1391. errormsg = "The service has not been started.";
  1392. break;
  1393. #endif
  1394. #ifdef ERROR_FAILED_SERVICE_CONTROLLER_CONNECT
  1395. case ERROR_FAILED_SERVICE_CONTROLLER_CONNECT:
  1396. errorname = "ERROR_FAILED_SERVICE_CONTROLLER_CONNECT";
  1397. errormsg = "The service process could not connect to the service controller.";
  1398. break;
  1399. #endif
  1400. #ifdef ERROR_EXCEPTION_IN_SERVICE
  1401. case ERROR_EXCEPTION_IN_SERVICE:
  1402. errorname = "ERROR_EXCEPTION_IN_SERVICE";
  1403. errormsg = "An exception occurred in the service when handling the control request.";
  1404. break;
  1405. #endif
  1406. #ifdef ERROR_DATABASE_DOES_NOT_EXIST
  1407. case ERROR_DATABASE_DOES_NOT_EXIST:
  1408. errorname = "ERROR_DATABASE_DOES_NOT_EXIST";
  1409. errormsg = "The database specified does not exist.";
  1410. break;
  1411. #endif
  1412. #ifdef ERROR_SERVICE_SPECIFIC_ERROR
  1413. case ERROR_SERVICE_SPECIFIC_ERROR:
  1414. errorname = "ERROR_SERVICE_SPECIFIC_ERROR";
  1415. errormsg = "The service has returned a service-specific error code.";
  1416. break;
  1417. #endif
  1418. #ifdef ERROR_PROCESS_ABORTED
  1419. case ERROR_PROCESS_ABORTED:
  1420. errorname = "ERROR_PROCESS_ABORTED";
  1421. errormsg = "The process terminated unexpectedly.";
  1422. break;
  1423. #endif
  1424. #ifdef ERROR_SERVICE_DEPENDENCY_FAIL
  1425. case ERROR_SERVICE_DEPENDENCY_FAIL:
  1426. errorname = "ERROR_SERVICE_DEPENDENCY_FAIL";
  1427. errormsg = "The dependency service or group failed to start.";
  1428. break;
  1429. #endif
  1430. #ifdef ERROR_SERVICE_LOGON_FAILED
  1431. case ERROR_SERVICE_LOGON_FAILED:
  1432. errorname = "ERROR_SERVICE_LOGON_FAILED";
  1433. errormsg = "The service did not start due to a logon failure.";
  1434. break;
  1435. #endif
  1436. #ifdef ERROR_SERVICE_START_HANG
  1437. case ERROR_SERVICE_START_HANG:
  1438. errorname = "ERROR_SERVICE_START_HANG";
  1439. errormsg = "After starting, the service hung in a start-pending state.";
  1440. break;
  1441. #endif
  1442. #ifdef ERROR_INVALID_SERVICE_LOCK
  1443. case ERROR_INVALID_SERVICE_LOCK:
  1444. errorname = "ERROR_INVALID_SERVICE_LOCK";
  1445. errormsg = "The specified service database lock is invalid.";
  1446. break;
  1447. #endif
  1448. #ifdef ERROR_SERVICE_MARKED_FOR_DELETE
  1449. case ERROR_SERVICE_MARKED_FOR_DELETE:
  1450. errorname = "ERROR_SERVICE_MARKED_FOR_DELETE";
  1451. errormsg = "The specified service has been marked for deletion.";
  1452. break;
  1453. #endif
  1454. #ifdef ERROR_SERVICE_EXISTS
  1455. case ERROR_SERVICE_EXISTS:
  1456. errorname = "ERROR_SERVICE_EXISTS";
  1457. errormsg = "The specified service already exists.";
  1458. break;
  1459. #endif
  1460. #ifdef ERROR_ALREADY_RUNNING_LKG
  1461. case ERROR_ALREADY_RUNNING_LKG:
  1462. errorname = "ERROR_ALREADY_RUNNING_LKG";
  1463. errormsg = "The system is currently running with the last-known-good configuration.";
  1464. break;
  1465. #endif
  1466. #ifdef ERROR_SERVICE_DEPENDENCY_DELETED
  1467. case ERROR_SERVICE_DEPENDENCY_DELETED:
  1468. errorname = "ERROR_SERVICE_DEPENDENCY_DELETED";
  1469. errormsg = "The dependency service does not exist or has been marked for deletion.";
  1470. break;
  1471. #endif
  1472. #ifdef ERROR_BOOT_ALREADY_ACCEPTED
  1473. case ERROR_BOOT_ALREADY_ACCEPTED:
  1474. errorname = "ERROR_BOOT_ALREADY_ACCEPTED";
  1475. errormsg = "The current boot has already been accepted for use as the last-known-good control set.";
  1476. break;
  1477. #endif
  1478. #ifdef ERROR_SERVICE_NEVER_STARTED
  1479. case ERROR_SERVICE_NEVER_STARTED:
  1480. errorname = "ERROR_SERVICE_NEVER_STARTED";
  1481. errormsg = "No attempts to start the service have been made since the last boot.";
  1482. break;
  1483. #endif
  1484. #ifdef ERROR_DUPLICATE_SERVICE_NAME
  1485. case ERROR_DUPLICATE_SERVICE_NAME:
  1486. errorname = "ERROR_DUPLICATE_SERVICE_NAME";
  1487. errormsg = "The name is already in use as either a service name or a service display name.";
  1488. break;
  1489. #endif
  1490. #ifdef ERROR_END_OF_MEDIA
  1491. case ERROR_END_OF_MEDIA:
  1492. errorname = "ERROR_END_OF_MEDIA";
  1493. errormsg = "The physical end of the tape has been reached.";
  1494. break;
  1495. #endif
  1496. #ifdef ERROR_FILEMARK_DETECTED
  1497. case ERROR_FILEMARK_DETECTED:
  1498. errorname = "ERROR_FILEMARK_DETECTED";
  1499. errormsg = "A tape access reached a filemark.";
  1500. break;
  1501. #endif
  1502. #ifdef ERROR_BEGINNING_OF_MEDIA
  1503. case ERROR_BEGINNING_OF_MEDIA:
  1504. errorname = "ERROR_BEGINNING_OF_MEDIA";
  1505. errormsg = "Beginning of tape or partition was encountered.";
  1506. break;
  1507. #endif
  1508. #ifdef ERROR_SETMARK_DETECTED
  1509. case ERROR_SETMARK_DETECTED:
  1510. errorname = "ERROR_SETMARK_DETECTED";
  1511. errormsg = "A tape access reached the end of a set of files.";
  1512. break;
  1513. #endif
  1514. #ifdef ERROR_NO_DATA_DETECTED
  1515. case ERROR_NO_DATA_DETECTED:
  1516. errorname = "ERROR_NO_DATA_DETECTED";
  1517. errormsg = "No more data is on the tape.";
  1518. break;
  1519. #endif
  1520. #ifdef ERROR_PARTITION_FAILURE
  1521. case ERROR_PARTITION_FAILURE:
  1522. errorname = "ERROR_PARTITION_FAILURE";
  1523. errormsg = "Tape could not be partitioned.";
  1524. break;
  1525. #endif
  1526. #ifdef ERROR_INVALID_BLOCK_LENGTH
  1527. case ERROR_INVALID_BLOCK_LENGTH:
  1528. errorname = "ERROR_INVALID_BLOCK_LENGTH";
  1529. errormsg = "When accessing a new tape of a multivolume partition, the current blocksize is incorrect.";
  1530. break;
  1531. #endif
  1532. #ifdef ERROR_DEVICE_NOT_PARTITIONED
  1533. case ERROR_DEVICE_NOT_PARTITIONED:
  1534. errorname = "ERROR_DEVICE_NOT_PARTITIONED";
  1535. errormsg = "Tape partition information could not be found when loading a tape.";
  1536. break;
  1537. #endif
  1538. #ifdef ERROR_UNABLE_TO_LOCK_MEDIA
  1539. case ERROR_UNABLE_TO_LOCK_MEDIA:
  1540. errorname = "ERROR_UNABLE_TO_LOCK_MEDIA";
  1541. errormsg = "Unable to lock the media eject mechanism.";
  1542. break;
  1543. #endif
  1544. #ifdef ERROR_UNABLE_TO_UNLOAD_MEDIA
  1545. case ERROR_UNABLE_TO_UNLOAD_MEDIA:
  1546. errorname = "ERROR_UNABLE_TO_UNLOAD_MEDIA";
  1547. errormsg = "Unable to unload the media.";
  1548. break;
  1549. #endif
  1550. #ifdef ERROR_MEDIA_CHANGED
  1551. case ERROR_MEDIA_CHANGED:
  1552. errorname = "ERROR_MEDIA_CHANGED";
  1553. errormsg = "Media in drive may have changed.";
  1554. break;
  1555. #endif
  1556. #ifdef ERROR_BUS_RESET
  1557. case ERROR_BUS_RESET:
  1558. errorname = "ERROR_BUS_RESET";
  1559. errormsg = "The I/O bus was reset.";
  1560. break;
  1561. #endif
  1562. #ifdef ERROR_NO_MEDIA_IN_DRIVE
  1563. case ERROR_NO_MEDIA_IN_DRIVE:
  1564. errorname = "ERROR_NO_MEDIA_IN_DRIVE";
  1565. errormsg = "No media in drive.";
  1566. break;
  1567. #endif
  1568. #ifdef ERROR_NO_UNICODE_TRANSLATION
  1569. case ERROR_NO_UNICODE_TRANSLATION:
  1570. errorname = "ERROR_NO_UNICODE_TRANSLATION";
  1571. errormsg = "No mapping for the Unicode character exists in the target multi-byte code page.";
  1572. break;
  1573. #endif
  1574. #ifdef ERROR_DLL_INIT_FAILED
  1575. case ERROR_DLL_INIT_FAILED:
  1576. errorname = "ERROR_DLL_INIT_FAILED";
  1577. errormsg = "A dynamic link library (DLL) initialization routine failed.";
  1578. break;
  1579. #endif
  1580. #ifdef ERROR_SHUTDOWN_IN_PROGRESS
  1581. case ERROR_SHUTDOWN_IN_PROGRESS:
  1582. errorname = "ERROR_SHUTDOWN_IN_PROGRESS";
  1583. errormsg = "A system shutdown is in progress.";
  1584. break;
  1585. #endif
  1586. #ifdef ERROR_NO_SHUTDOWN_IN_PROGRESS
  1587. case ERROR_NO_SHUTDOWN_IN_PROGRESS:
  1588. errorname = "ERROR_NO_SHUTDOWN_IN_PROGRESS";
  1589. errormsg = "Unable to abort the system shutdown because no shutdown was in progress.";
  1590. break;
  1591. #endif
  1592. #ifdef ERROR_IO_DEVICE
  1593. case ERROR_IO_DEVICE:
  1594. errorname = "ERROR_IO_DEVICE";
  1595. errormsg = "The request could not be performed because of an I/O device error.";
  1596. break;
  1597. #endif
  1598. #ifdef ERROR_SERIAL_NO_DEVICE
  1599. case ERROR_SERIAL_NO_DEVICE:
  1600. errorname = "ERROR_SERIAL_NO_DEVICE";
  1601. errormsg = "No serial device was successfully initialized. The serial driver will unload.";
  1602. break;
  1603. #endif
  1604. #ifdef ERROR_IRQ_BUSY
  1605. case ERROR_IRQ_BUSY:
  1606. errorname = "ERROR_IRQ_BUSY";
  1607. errormsg = "Unable to open a device that was sharing an interrupt request (IRQ) with other devices. At least one other device that uses that IRQ was already opened.";
  1608. break;
  1609. #endif
  1610. #ifdef ERROR_MORE_WRITES
  1611. case ERROR_MORE_WRITES:
  1612. errorname = "ERROR_MORE_WRITES";
  1613. errormsg = "A serial I/O operation was completed by another write to the serial port. (The IOCTL_SERIAL_XOFF_COUNTER reached zero.)";
  1614. break;
  1615. #endif
  1616. #ifdef ERROR_COUNTER_TIMEOUT
  1617. case ERROR_COUNTER_TIMEOUT:
  1618. errorname = "ERROR_COUNTER_TIMEOUT";
  1619. errormsg = "A serial I/O operation completed because the time-out period expired. (The IOCTL_SERIAL_XOFF_COUNTER did not reach zero.)";
  1620. break;
  1621. #endif
  1622. #ifdef ERROR_FLOPPY_ID_MARK_NOT_FOUND
  1623. case ERROR_FLOPPY_ID_MARK_NOT_FOUND:
  1624. errorname = "ERROR_FLOPPY_ID_MARK_NOT_FOUND";
  1625. errormsg = "No ID address mark was found on the floppy disk.";
  1626. break;
  1627. #endif
  1628. #ifdef ERROR_FLOPPY_WRONG_CYLINDER
  1629. case ERROR_FLOPPY_WRONG_CYLINDER:
  1630. errorname = "ERROR_FLOPPY_WRONG_CYLINDER";
  1631. errormsg = "Mismatch between the floppy disk sector ID field and the floppy disk controller track address.";
  1632. break;
  1633. #endif
  1634. #ifdef ERROR_FLOPPY_UNKNOWN_ERROR
  1635. case ERROR_FLOPPY_UNKNOWN_ERROR:
  1636. errorname = "ERROR_FLOPPY_UNKNOWN_ERROR";
  1637. errormsg = "The floppy disk controller reported an error that is not recognized by the floppy disk driver.";
  1638. break;
  1639. #endif
  1640. #ifdef ERROR_FLOPPY_BAD_REGISTERS
  1641. case ERROR_FLOPPY_BAD_REGISTERS:
  1642. errorname = "ERROR_FLOPPY_BAD_REGISTERS";
  1643. errormsg = "The floppy disk controller returned inconsistent results in its registers.";
  1644. break;
  1645. #endif
  1646. #ifdef ERROR_DISK_RECALIBRATE_FAILED
  1647. case ERROR_DISK_RECALIBRATE_FAILED:
  1648. errorname = "ERROR_DISK_RECALIBRATE_FAILED";
  1649. errormsg = "While accessing the hard disk, a recalibrate operation failed, even after retries.";
  1650. break;
  1651. #endif
  1652. #ifdef ERROR_DISK_OPERATION_FAILED
  1653. case ERROR_DISK_OPERATION_FAILED:
  1654. errorname = "ERROR_DISK_OPERATION_FAILED";
  1655. errormsg = "While accessing the hard disk, a disk operation failed even after retries.";
  1656. break;
  1657. #endif
  1658. #ifdef ERROR_DISK_RESET_FAILED
  1659. case ERROR_DISK_RESET_FAILED:
  1660. errorname = "ERROR_DISK_RESET_FAILED";
  1661. errormsg = "While accessing the hard disk, a disk controller reset was needed, but even that failed.";
  1662. break;
  1663. #endif
  1664. #ifdef ERROR_EOM_OVERFLOW
  1665. case ERROR_EOM_OVERFLOW:
  1666. errorname = "ERROR_EOM_OVERFLOW";
  1667. errormsg = "Physical end of tape encountered.";
  1668. break;
  1669. #endif
  1670. #ifdef ERROR_NOT_ENOUGH_SERVER_MEMORY
  1671. case ERROR_NOT_ENOUGH_SERVER_MEMORY:
  1672. errorname = "ERROR_NOT_ENOUGH_SERVER_MEMORY";
  1673. errormsg = "Not enough server storage is available to process this command.";
  1674. break;
  1675. #endif
  1676. #ifdef ERROR_POSSIBLE_DEADLOCK
  1677. case ERROR_POSSIBLE_DEADLOCK:
  1678. errorname = "ERROR_POSSIBLE_DEADLOCK";
  1679. errormsg = "A potential deadlock condition has been detected.";
  1680. break;
  1681. #endif
  1682. #ifdef ERROR_MAPPED_ALIGNMENT
  1683. case ERROR_MAPPED_ALIGNMENT:
  1684. errorname = "ERROR_MAPPED_ALIGNMENT";
  1685. errormsg = "The base address or the file offset specified does not have the proper alignment.";
  1686. break;
  1687. #endif
  1688. #ifdef ERROR_SET_POWER_STATE_VETOED
  1689. case ERROR_SET_POWER_STATE_VETOED:
  1690. errorname = "ERROR_SET_POWER_STATE_VETOED";
  1691. errormsg = "An attempt to change the system power state was vetoed by another application or driver.";
  1692. break;
  1693. #endif
  1694. #ifdef ERROR_SET_POWER_STATE_FAILED
  1695. case ERROR_SET_POWER_STATE_FAILED:
  1696. errorname = "ERROR_SET_POWER_STATE_FAILED";
  1697. errormsg = "The system BIOS failed an attempt to change the system power state.";
  1698. break;
  1699. #endif
  1700. #ifdef ERROR_OLD_WIN_VERSION
  1701. case ERROR_OLD_WIN_VERSION:
  1702. errorname = "ERROR_OLD_WIN_VERSION";
  1703. errormsg = "The specified program requires a newer version of Windows.";
  1704. break;
  1705. #endif
  1706. #ifdef ERROR_APP_WRONG_OS
  1707. case ERROR_APP_WRONG_OS:
  1708. errorname = "ERROR_APP_WRONG_OS";
  1709. errormsg = "The specified program is not a Windows or MS-DOS program.";
  1710. break;
  1711. #endif
  1712. #ifdef ERROR_SINGLE_INSTANCE_APP
  1713. case ERROR_SINGLE_INSTANCE_APP:
  1714. errorname = "ERROR_SINGLE_INSTANCE_APP";
  1715. errormsg = "Cannot start more than one instance of the specified program.";
  1716. break;
  1717. #endif
  1718. #ifdef ERROR_RMODE_APP
  1719. case ERROR_RMODE_APP:
  1720. errorname = "ERROR_RMODE_APP";
  1721. errormsg = "The specified program was written for an older version of Windows.";
  1722. break;
  1723. #endif
  1724. #ifdef ERROR_INVALID_DLL
  1725. case ERROR_INVALID_DLL:
  1726. errorname = "ERROR_INVALID_DLL";
  1727. errormsg = "One of the library files needed to run this application is damaged.";
  1728. break;
  1729. #endif
  1730. #ifdef ERROR_NO_ASSOCIATION
  1731. case ERROR_NO_ASSOCIATION:
  1732. errorname = "ERROR_NO_ASSOCIATION";
  1733. errormsg = "No application is associated with the specified file for this operation.";
  1734. break;
  1735. #endif
  1736. #ifdef ERROR_DDE_FAIL
  1737. case ERROR_DDE_FAIL:
  1738. errorname = "ERROR_DDE_FAIL";
  1739. errormsg = "An error occurred in sending the command to the application.";
  1740. break;
  1741. #endif
  1742. #ifdef ERROR_DLL_NOT_FOUND
  1743. case ERROR_DLL_NOT_FOUND:
  1744. errorname = "ERROR_DLL_NOT_FOUND";
  1745. errormsg = "One of the library files needed to run this application cannot be found.";
  1746. break;
  1747. #endif
  1748. #ifdef ERROR_BAD_USERNAME
  1749. case ERROR_BAD_USERNAME:
  1750. errorname = "ERROR_BAD_USERNAME";
  1751. errormsg = "The specified username is invalid.";
  1752. break;
  1753. #endif
  1754. #ifdef ERROR_NOT_CONNECTED
  1755. case ERROR_NOT_CONNECTED:
  1756. errorname = "ERROR_NOT_CONNECTED";
  1757. errormsg = "This network connection does not exist.";
  1758. break;
  1759. #endif
  1760. #ifdef ERROR_OPEN_FILES
  1761. case ERROR_OPEN_FILES:
  1762. errorname = "ERROR_OPEN_FILES";
  1763. errormsg = "This network connection has files open or requests pending.";
  1764. break;
  1765. #endif
  1766. #ifdef ERROR_ACTIVE_CONNECTIONS
  1767. case ERROR_ACTIVE_CONNECTIONS:
  1768. errorname = "ERROR_ACTIVE_CONNECTIONS";
  1769. errormsg = "Active connections still exist.";
  1770. break;
  1771. #endif
  1772. #ifdef ERROR_DEVICE_IN_USE
  1773. case ERROR_DEVICE_IN_USE:
  1774. errorname = "ERROR_DEVICE_IN_USE";
  1775. errormsg = "The device is in use by an active process and cannot be disconnected.";
  1776. break;
  1777. #endif
  1778. #ifdef ERROR_BAD_DEVICE
  1779. case ERROR_BAD_DEVICE:
  1780. errorname = "ERROR_BAD_DEVICE";
  1781. errormsg = "The specified device name is invalid.";
  1782. break;
  1783. #endif
  1784. #ifdef ERROR_CONNECTION_UNAVAIL
  1785. case ERROR_CONNECTION_UNAVAIL:
  1786. errorname = "ERROR_CONNECTION_UNAVAIL";
  1787. errormsg = "The device is not currently connected but it is a remembered connection.";
  1788. break;
  1789. #endif
  1790. #ifdef ERROR_DEVICE_ALREADY_REMEMBERED
  1791. case ERROR_DEVICE_ALREADY_REMEMBERED:
  1792. errorname = "ERROR_DEVICE_ALREADY_REMEMBERED";
  1793. errormsg = "An attempt was made to remember a device that had previously been remembered.";
  1794. break;
  1795. #endif
  1796. #ifdef ERROR_NO_NET_OR_BAD_PATH
  1797. case ERROR_NO_NET_OR_BAD_PATH:
  1798. errorname = "ERROR_NO_NET_OR_BAD_PATH";
  1799. errormsg = "No network provider accepted the given network path.";
  1800. break;
  1801. #endif
  1802. #ifdef ERROR_BAD_PROVIDER
  1803. case ERROR_BAD_PROVIDER:
  1804. errorname = "ERROR_BAD_PROVIDER";
  1805. errormsg = "The specified network provider name is invalid.";
  1806. break;
  1807. #endif
  1808. #ifdef ERROR_CANNOT_OPEN_PROFILE
  1809. case ERROR_CANNOT_OPEN_PROFILE:
  1810. errorname = "ERROR_CANNOT_OPEN_PROFILE";
  1811. errormsg = "Unable to open the network connection profile.";
  1812. break;
  1813. #endif
  1814. #ifdef ERROR_BAD_PROFILE
  1815. case ERROR_BAD_PROFILE:
  1816. errorname = "ERROR_BAD_PROFILE";
  1817. errormsg = "The network connection profile is corrupt.";
  1818. break;
  1819. #endif
  1820. #ifdef ERROR_NOT_CONTAINER
  1821. case ERROR_NOT_CONTAINER:
  1822. errorname = "ERROR_NOT_CONTAINER";
  1823. errormsg = "Cannot enumerate a non-container.";
  1824. break;
  1825. #endif
  1826. #ifdef ERROR_EXTENDED_ERROR
  1827. case ERROR_EXTENDED_ERROR:
  1828. errorname = "ERROR_EXTENDED_ERROR";
  1829. errormsg = "An extended error has occurred.";
  1830. break;
  1831. #endif
  1832. #ifdef ERROR_INVALID_GROUPNAME
  1833. case ERROR_INVALID_GROUPNAME:
  1834. errorname = "ERROR_INVALID_GROUPNAME";
  1835. errormsg = "The format of the specified group name is invalid.";
  1836. break;
  1837. #endif
  1838. #ifdef ERROR_INVALID_COMPUTERNAME
  1839. case ERROR_INVALID_COMPUTERNAME:
  1840. errorname = "ERROR_INVALID_COMPUTERNAME";
  1841. errormsg = "The format of the specified computer name is invalid.";
  1842. break;
  1843. #endif
  1844. #ifdef ERROR_INVALID_EVENTNAME
  1845. case ERROR_INVALID_EVENTNAME:
  1846. errorname = "ERROR_INVALID_EVENTNAME";
  1847. errormsg = "The format of the specified event name is invalid.";
  1848. break;
  1849. #endif
  1850. #ifdef ERROR_INVALID_DOMAINNAME
  1851. case ERROR_INVALID_DOMAINNAME:
  1852. errorname = "ERROR_INVALID_DOMAINNAME";
  1853. errormsg = "The format of the specified domain name is invalid.";
  1854. break;
  1855. #endif
  1856. #ifdef ERROR_INVALID_SERVICENAME
  1857. case ERROR_INVALID_SERVICENAME:
  1858. errorname = "ERROR_INVALID_SERVICENAME";
  1859. errormsg = "The format of the specified service name is invalid.";
  1860. break;
  1861. #endif
  1862. #ifdef ERROR_INVALID_NETNAME
  1863. case ERROR_INVALID_NETNAME:
  1864. errorname = "ERROR_INVALID_NETNAME";
  1865. errormsg = "The format of the specified network name is invalid.";
  1866. break;
  1867. #endif
  1868. #ifdef ERROR_INVALID_SHARENAME
  1869. case ERROR_INVALID_SHARENAME:
  1870. errorname = "ERROR_INVALID_SHARENAME";
  1871. errormsg = "The format of the specified share name is invalid.";
  1872. break;
  1873. #endif
  1874. #ifdef ERROR_INVALID_PASSWORDNAME
  1875. case ERROR_INVALID_PASSWORDNAME:
  1876. errorname = "ERROR_INVALID_PASSWORDNAME";
  1877. errormsg = "The format of the specified password is invalid.";
  1878. break;
  1879. #endif
  1880. #ifdef ERROR_INVALID_MESSAGENAME
  1881. case ERROR_INVALID_MESSAGENAME:
  1882. errorname = "ERROR_INVALID_MESSAGENAME";
  1883. errormsg = "The format of the specified message name is invalid.";
  1884. break;
  1885. #endif
  1886. #ifdef ERROR_INVALID_MESSAGEDEST
  1887. case ERROR_INVALID_MESSAGEDEST:
  1888. errorname = "ERROR_INVALID_MESSAGEDEST";
  1889. errormsg = "The format of the specified message destination is invalid.";
  1890. break;
  1891. #endif
  1892. #ifdef ERROR_SESSION_CREDENTIAL_CONFLICT
  1893. case ERROR_SESSION_CREDENTIAL_CONFLICT:
  1894. errorname = "ERROR_SESSION_CREDENTIAL_CONFLICT";
  1895. errormsg = "The credentials supplied conflict with an existing set of credentials.";
  1896. break;
  1897. #endif
  1898. #ifdef ERROR_REMOTE_SESSION_LIMIT_EXCEEDED
  1899. case ERROR_REMOTE_SESSION_LIMIT_EXCEEDED:
  1900. errorname = "ERROR_REMOTE_SESSION_LIMIT_EXCEEDED";
  1901. errormsg = "An attempt was made to establish a session to a network server, but there are already too many sessions established to that server.";
  1902. break;
  1903. #endif
  1904. #ifdef ERROR_DUP_DOMAINNAME
  1905. case ERROR_DUP_DOMAINNAME:
  1906. errorname = "ERROR_DUP_DOMAINNAME";
  1907. errormsg = "The workgroup or domain name is already in use by another computer on the network.";
  1908. break;
  1909. #endif
  1910. #ifdef ERROR_NO_NETWORK
  1911. case ERROR_NO_NETWORK:
  1912. errorname = "ERROR_NO_NETWORK";
  1913. errormsg = "The network is not present or not started.";
  1914. break;
  1915. #endif
  1916. #ifdef ERROR_CANCELLED
  1917. case ERROR_CANCELLED:
  1918. errorname = "ERROR_CANCELLED";
  1919. errormsg = "The operation was cancelled by the user.";
  1920. break;
  1921. #endif
  1922. #ifdef ERROR_USER_MAPPED_FILE
  1923. case ERROR_USER_MAPPED_FILE:
  1924. errorname = "ERROR_USER_MAPPED_FILE";
  1925. errormsg = "The requested operation cannot be performed on a file with a user mapped section open.";
  1926. break;
  1927. #endif
  1928. #ifdef ERROR_CONNECTION_REFUSED
  1929. case ERROR_CONNECTION_REFUSED:
  1930. errorname = "ERROR_CONNECTION_REFUSED";
  1931. errormsg = "The remote system refused the network connection.";
  1932. break;
  1933. #endif
  1934. #ifdef ERROR_GRACEFUL_DISCONNECT
  1935. case ERROR_GRACEFUL_DISCONNECT:
  1936. errorname = "ERROR_GRACEFUL_DISCONNECT";
  1937. errormsg = "The network connection was gracefully closed.";
  1938. break;
  1939. #endif
  1940. #ifdef ERROR_ADDRESS_ALREADY_ASSOCIATED
  1941. case ERROR_ADDRESS_ALREADY_ASSOCIATED:
  1942. errorname = "ERROR_ADDRESS_ALREADY_ASSOCIATED";
  1943. errormsg = "The network transport endpoint already has an address associated with it.";
  1944. break;
  1945. #endif
  1946. #ifdef ERROR_ADDRESS_NOT_ASSOCIATED
  1947. case ERROR_ADDRESS_NOT_ASSOCIATED:
  1948. errorname = "ERROR_ADDRESS_NOT_ASSOCIATED";
  1949. errormsg = "An address has not yet been associated with the network endpoint.";
  1950. break;
  1951. #endif
  1952. #ifdef ERROR_CONNECTION_INVALID
  1953. case ERROR_CONNECTION_INVALID:
  1954. errorname = "ERROR_CONNECTION_INVALID";
  1955. errormsg = "An operation was attempted on a non-existent network connection.";
  1956. break;
  1957. #endif
  1958. #ifdef ERROR_CONNECTION_ACTIVE
  1959. case ERROR_CONNECTION_ACTIVE:
  1960. errorname = "ERROR_CONNECTION_ACTIVE";
  1961. errormsg = "An invalid operation was attempted on an active network connection.";
  1962. break;
  1963. #endif
  1964. #ifdef ERROR_NETWORK_UNREACHABLE
  1965. case ERROR_NETWORK_UNREACHABLE:
  1966. errorname = "ERROR_NETWORK_UNREACHABLE";
  1967. errormsg = "The remote network is not reachable by the transport.";
  1968. break;
  1969. #endif
  1970. #ifdef ERROR_HOST_UNREACHABLE
  1971. case ERROR_HOST_UNREACHABLE:
  1972. errorname = "ERROR_HOST_UNREACHABLE";
  1973. errormsg = "The remote system is not reachable by the transport.";
  1974. break;
  1975. #endif
  1976. #ifdef ERROR_PROTOCOL_UNREACHABLE
  1977. case ERROR_PROTOCOL_UNREACHABLE:
  1978. errorname = "ERROR_PROTOCOL_UNREACHABLE";
  1979. errormsg = "The remote system does not support the transport protocol.";
  1980. break;
  1981. #endif
  1982. #ifdef ERROR_PORT_UNREACHABLE
  1983. case ERROR_PORT_UNREACHABLE:
  1984. errorname = "ERROR_PORT_UNREACHABLE";
  1985. errormsg = "No service is operating at the destination network endpoint on the remote system.";
  1986. break;
  1987. #endif
  1988. #ifdef ERROR_REQUEST_ABORTED
  1989. case ERROR_REQUEST_ABORTED:
  1990. errorname = "ERROR_REQUEST_ABORTED";
  1991. errormsg = "The request was aborted.";
  1992. break;
  1993. #endif
  1994. #ifdef ERROR_CONNECTION_ABORTED
  1995. case ERROR_CONNECTION_ABORTED:
  1996. errorname = "ERROR_CONNECTION_ABORTED";
  1997. errormsg = "The network connection was aborted by the local system.";
  1998. break;
  1999. #endif
  2000. #ifdef ERROR_RETRY
  2001. case ERROR_RETRY:
  2002. errorname = "ERROR_RETRY";
  2003. errormsg = "The operation could not be completed. A retry should be performed.";
  2004. break;
  2005. #endif
  2006. #ifdef ERROR_CONNECTION_COUNT_LIMIT
  2007. case ERROR_CONNECTION_COUNT_LIMIT:
  2008. errorname = "ERROR_CONNECTION_COUNT_LIMIT";
  2009. errormsg = "A connection to the server could not be made because the limit on the number of concurrent connections for this account has been reached.";
  2010. break;
  2011. #endif
  2012. #ifdef ERROR_LOGIN_TIME_RESTRICTION
  2013. case ERROR_LOGIN_TIME_RESTRICTION:
  2014. errorname = "ERROR_LOGIN_TIME_RESTRICTION";
  2015. errormsg = "Attempting to login during an unauthorized time of day for this account.";
  2016. break;
  2017. #endif
  2018. #ifdef ERROR_LOGIN_WKSTA_RESTRICTION
  2019. case ERROR_LOGIN_WKSTA_RESTRICTION:
  2020. errorname = "ERROR_LOGIN_WKSTA_RESTRICTION";
  2021. errormsg = "The account is not authorized to login from this station.";
  2022. break;
  2023. #endif
  2024. #ifdef ERROR_INCORRECT_ADDRESS
  2025. case ERROR_INCORRECT_ADDRESS:
  2026. errorname = "ERROR_INCORRECT_ADDRESS";
  2027. errormsg = "The network address could not be used for the operation requested.";
  2028. break;
  2029. #endif
  2030. #ifdef ERROR_ALREADY_REGISTERED
  2031. case ERROR_ALREADY_REGISTERED:
  2032. errorname = "ERROR_ALREADY_REGISTERED";
  2033. errormsg = "The service is already registered.";
  2034. break;
  2035. #endif
  2036. #ifdef ERROR_SERVICE_NOT_FOUND
  2037. case ERROR_SERVICE_NOT_FOUND:
  2038. errorname = "ERROR_SERVICE_NOT_FOUND";
  2039. errormsg = "The specified service does not exist.";
  2040. break;
  2041. #endif
  2042. #ifdef ERROR_NOT_AUTHENTICATED
  2043. case ERROR_NOT_AUTHENTICATED:
  2044. errorname = "ERROR_NOT_AUTHENTICATED";
  2045. errormsg = "The operation being requested was not performed because the user has not been authenticated.";
  2046. break;
  2047. #endif
  2048. #ifdef ERROR_NOT_LOGGED_ON
  2049. case ERROR_NOT_LOGGED_ON:
  2050. errorname = "ERROR_NOT_LOGGED_ON";
  2051. errormsg = "The operation being requested was not performed because the user has not logged on to the network. The specified service does not exist.";
  2052. break;
  2053. #endif
  2054. #ifdef ERROR_CONTINUE
  2055. case ERROR_CONTINUE:
  2056. errorname = "ERROR_CONTINUE";
  2057. errormsg = "Return that wants caller to continue with work in progress.";
  2058. break;
  2059. #endif
  2060. #ifdef ERROR_ALREADY_INITIALIZED
  2061. case ERROR_ALREADY_INITIALIZED:
  2062. errorname = "ERROR_ALREADY_INITIALIZED";
  2063. errormsg = "An attempt was made to perform an initialization operation when initialization has already been completed.";
  2064. break;
  2065. #endif
  2066. #ifdef ERROR_NO_MORE_DEVICES
  2067. case ERROR_NO_MORE_DEVICES:
  2068. errorname = "ERROR_NO_MORE_DEVICES";
  2069. errormsg = "No more local devices.";
  2070. break;
  2071. #endif
  2072. #ifdef ERROR_NOT_ALL_ASSIGNED
  2073. case ERROR_NOT_ALL_ASSIGNED:
  2074. errorname = "ERROR_NOT_ALL_ASSIGNED";
  2075. errormsg = "Not all privileges referenced are assigned to the caller.";
  2076. break;
  2077. #endif
  2078. #ifdef ERROR_SOME_NOT_MAPPED
  2079. case ERROR_SOME_NOT_MAPPED:
  2080. errorname = "ERROR_SOME_NOT_MAPPED";
  2081. errormsg = "Some mapping between account names and security IDs was not done.";
  2082. break;
  2083. #endif
  2084. #ifdef ERROR_NO_QUOTAS_FOR_ACCOUNT
  2085. case ERROR_NO_QUOTAS_FOR_ACCOUNT:
  2086. errorname = "ERROR_NO_QUOTAS_FOR_ACCOUNT";
  2087. errormsg = "No system quota limits are specifically set for this account.";
  2088. break;
  2089. #endif
  2090. #ifdef ERROR_LOCAL_USER_SESSION_KEY
  2091. case ERROR_LOCAL_USER_SESSION_KEY:
  2092. errorname = "ERROR_LOCAL_USER_SESSION_KEY";
  2093. errormsg = "No encryption key is available. A well-known encryption key was returned.";
  2094. break;
  2095. #endif
  2096. #ifdef ERROR_NULL_LM_PASSWORD
  2097. case ERROR_NULL_LM_PASSWORD:
  2098. errorname = "ERROR_NULL_LM_PASSWORD";
  2099. errormsg = "The NT password is too complex to be converted to a LAN Manager password. The LAN Manager password returned is a NULL string.";
  2100. break;
  2101. #endif
  2102. #ifdef ERROR_UNKNOWN_REVISION
  2103. case ERROR_UNKNOWN_REVISION:
  2104. errorname = "ERROR_UNKNOWN_REVISION";
  2105. errormsg = "The revision level is unknown.";
  2106. break;
  2107. #endif
  2108. #ifdef ERROR_REVISION_MISMATCH
  2109. case ERROR_REVISION_MISMATCH:
  2110. errorname = "ERROR_REVISION_MISMATCH";
  2111. errormsg = "Indicates two revision levels are incompatible.";
  2112. break;
  2113. #endif
  2114. #ifdef ERROR_INVALID_OWNER
  2115. case ERROR_INVALID_OWNER:
  2116. errorname = "ERROR_INVALID_OWNER";
  2117. errormsg = "This security ID may not be assigned as the owner of this object.";
  2118. break;
  2119. #endif
  2120. #ifdef ERROR_INVALID_PRIMARY_GROUP
  2121. case ERROR_INVALID_PRIMARY_GROUP:
  2122. errorname = "ERROR_INVALID_PRIMARY_GROUP";
  2123. errormsg = "This security ID may not be assigned as the primary group of an object.";
  2124. break;
  2125. #endif
  2126. #ifdef ERROR_NO_IMPERSONATION_TOKEN
  2127. case ERROR_NO_IMPERSONATION_TOKEN:
  2128. errorname = "ERROR_NO_IMPERSONATION_TOKEN";
  2129. errormsg = "An attempt has been made to operate on an impersonation token by a thread that is not currently impersonating a client.";
  2130. break;
  2131. #endif
  2132. #ifdef ERROR_CANT_DISABLE_MANDATORY
  2133. case ERROR_CANT_DISABLE_MANDATORY:
  2134. errorname = "ERROR_CANT_DISABLE_MANDATORY";
  2135. errormsg = "The group may not be disabled.";
  2136. break;
  2137. #endif
  2138. #ifdef ERROR_NO_LOGON_SERVERS
  2139. case ERROR_NO_LOGON_SERVERS:
  2140. errorname = "ERROR_NO_LOGON_SERVERS";
  2141. errormsg = "There are currently no logon servers available to service the logon request.";
  2142. break;
  2143. #endif
  2144. #ifdef ERROR_NO_SUCH_LOGON_SESSION
  2145. case ERROR_NO_SUCH_LOGON_SESSION:
  2146. errorname = "ERROR_NO_SUCH_LOGON_SESSION";
  2147. errormsg = "A specified logon session does not exist. It may already have been terminated.";
  2148. break;
  2149. #endif
  2150. #ifdef ERROR_NO_SUCH_PRIVILEGE
  2151. case ERROR_NO_SUCH_PRIVILEGE:
  2152. errorname = "ERROR_NO_SUCH_PRIVILEGE";
  2153. errormsg = "A specified privilege does not exist.";
  2154. break;
  2155. #endif
  2156. #ifdef ERROR_PRIVILEGE_NOT_HELD
  2157. case ERROR_PRIVILEGE_NOT_HELD:
  2158. errorname = "ERROR_PRIVILEGE_NOT_HELD";
  2159. errormsg = "A required privilege is not held by the client.";
  2160. break;
  2161. #endif
  2162. #ifdef ERROR_INVALID_ACCOUNT_NAME
  2163. case ERROR_INVALID_ACCOUNT_NAME:
  2164. errorname = "ERROR_INVALID_ACCOUNT_NAME";
  2165. errormsg = "The name provided is not a properly formed account name.";
  2166. break;
  2167. #endif
  2168. #ifdef ERROR_USER_EXISTS
  2169. case ERROR_USER_EXISTS:
  2170. errorname = "ERROR_USER_EXISTS";
  2171. errormsg = "The specified user already exists.";
  2172. break;
  2173. #endif
  2174. #ifdef ERROR_NO_SUCH_USER
  2175. case ERROR_NO_SUCH_USER:
  2176. errorname = "ERROR_NO_SUCH_USER";
  2177. errormsg = "The specified user does not exist.";
  2178. break;
  2179. #endif
  2180. #ifdef ERROR_GROUP_EXISTS
  2181. case ERROR_GROUP_EXISTS:
  2182. errorname = "ERROR_GROUP_EXISTS";
  2183. errormsg = "The specified group already exists.";
  2184. break;
  2185. #endif
  2186. #ifdef ERROR_NO_SUCH_GROUP
  2187. case ERROR_NO_SUCH_GROUP:
  2188. errorname = "ERROR_NO_SUCH_GROUP";
  2189. errormsg = "The specified group does not exist.";
  2190. break;
  2191. #endif
  2192. #ifdef ERROR_MEMBER_IN_GROUP
  2193. case ERROR_MEMBER_IN_GROUP:
  2194. errorname = "ERROR_MEMBER_IN_GROUP";
  2195. errormsg = "Either the specified user account is already a member of the specified group, or the specified group cannot be deleted because it contains a member.";
  2196. break;
  2197. #endif
  2198. #ifdef ERROR_MEMBER_NOT_IN_GROUP
  2199. case ERROR_MEMBER_NOT_IN_GROUP:
  2200. errorname = "ERROR_MEMBER_NOT_IN_GROUP";
  2201. errormsg = "The specified user account is not a member of the specified group account.";
  2202. break;
  2203. #endif
  2204. #ifdef ERROR_LAST_ADMIN
  2205. case ERROR_LAST_ADMIN:
  2206. errorname = "ERROR_LAST_ADMIN";
  2207. errormsg = "The last remaining administration account cannot be disabled or deleted.";
  2208. break;
  2209. #endif
  2210. #ifdef ERROR_WRONG_PASSWORD
  2211. case ERROR_WRONG_PASSWORD:
  2212. errorname = "ERROR_WRONG_PASSWORD";
  2213. errormsg = "Unable to update the password. The value provided as the current password is incorrect.";
  2214. break;
  2215. #endif
  2216. #ifdef ERROR_ILL_FORMED_PASSWORD
  2217. case ERROR_ILL_FORMED_PASSWORD:
  2218. errorname = "ERROR_ILL_FORMED_PASSWORD";
  2219. errormsg = "Unable to update the password. The value provided for the new password contains values that are not allowed in passwords.";
  2220. break;
  2221. #endif
  2222. #ifdef ERROR_PASSWORD_RESTRICTION
  2223. case ERROR_PASSWORD_RESTRICTION:
  2224. errorname = "ERROR_PASSWORD_RESTRICTION";
  2225. errormsg = "Unable to update the password because a password update rule has been violated.";
  2226. break;
  2227. #endif
  2228. #ifdef ERROR_LOGON_FAILURE
  2229. case ERROR_LOGON_FAILURE:
  2230. errorname = "ERROR_LOGON_FAILURE";
  2231. errormsg = "Logon failure: unknown user name or bad password.";
  2232. break;
  2233. #endif
  2234. #ifdef ERROR_ACCOUNT_RESTRICTION
  2235. case ERROR_ACCOUNT_RESTRICTION:
  2236. errorname = "ERROR_ACCOUNT_RESTRICTION";
  2237. errormsg = "Logon failure: user account restriction.";
  2238. break;
  2239. #endif
  2240. #ifdef ERROR_INVALID_LOGON_HOURS
  2241. case ERROR_INVALID_LOGON_HOURS:
  2242. errorname = "ERROR_INVALID_LOGON_HOURS";
  2243. errormsg = "Logon failure: account logon time restriction violation.";
  2244. break;
  2245. #endif
  2246. #ifdef ERROR_INVALID_WORKSTATION
  2247. case ERROR_INVALID_WORKSTATION:
  2248. errorname = "ERROR_INVALID_WORKSTATION";
  2249. errormsg = "Logon failure: user not allowed to log on to this computer.";
  2250. break;
  2251. #endif
  2252. #ifdef ERROR_PASSWORD_EXPIRED
  2253. case ERROR_PASSWORD_EXPIRED:
  2254. errorname = "ERROR_PASSWORD_EXPIRED";
  2255. errormsg = "Logon failure: the specified account password has expired.";
  2256. break;
  2257. #endif
  2258. #ifdef ERROR_ACCOUNT_DISABLED
  2259. case ERROR_ACCOUNT_DISABLED:
  2260. errorname = "ERROR_ACCOUNT_DISABLED";
  2261. errormsg = "Logon failure: account currently disabled.";
  2262. break;
  2263. #endif
  2264. #ifdef ERROR_NONE_MAPPED
  2265. case ERROR_NONE_MAPPED:
  2266. errorname = "ERROR_NONE_MAPPED";
  2267. errormsg = "No mapping between account names and security IDs was done.";
  2268. break;
  2269. #endif
  2270. #ifdef ERROR_TOO_MANY_LUIDS_REQUESTED
  2271. case ERROR_TOO_MANY_LUIDS_REQUESTED:
  2272. errorname = "ERROR_TOO_MANY_LUIDS_REQUESTED";
  2273. errormsg = "Too many local user identifiers (LUIDs) were requested at one time.";
  2274. break;
  2275. #endif
  2276. #ifdef ERROR_LUIDS_EXHAUSTED
  2277. case ERROR_LUIDS_EXHAUSTED:
  2278. errorname = "ERROR_LUIDS_EXHAUSTED";
  2279. errormsg = "No more local user identifiers (LUIDs) are available.";
  2280. break;
  2281. #endif
  2282. #ifdef ERROR_INVALID_SUB_AUTHORITY
  2283. case ERROR_INVALID_SUB_AUTHORITY:
  2284. errorname = "ERROR_INVALID_SUB_AUTHORITY";
  2285. errormsg = "The subauthority part of a security ID is invalid for this particular use.";
  2286. break;
  2287. #endif
  2288. #ifdef ERROR_INVALID_ACL
  2289. case ERROR_INVALID_ACL:
  2290. errorname = "ERROR_INVALID_ACL";
  2291. errormsg = "The access control list (ACL) structure is invalid.";
  2292. break;
  2293. #endif
  2294. #ifdef ERROR_INVALID_SID
  2295. case ERROR_INVALID_SID:
  2296. errorname = "ERROR_INVALID_SID";
  2297. errormsg = "The security ID structure is invalid.";
  2298. break;
  2299. #endif
  2300. #ifdef ERROR_INVALID_SECURITY_DESCR
  2301. case ERROR_INVALID_SECURITY_DESCR:
  2302. errorname = "ERROR_INVALID_SECURITY_DESCR";
  2303. errormsg = "The security descriptor structure is invalid.";
  2304. break;
  2305. #endif
  2306. #ifdef ERROR_BAD_INHERITANCE_ACL
  2307. case ERROR_BAD_INHERITANCE_ACL:
  2308. errorname = "ERROR_BAD_INHERITANCE_ACL";
  2309. errormsg = "The inherited access control list (ACL) or access control entry (ACE) could not be built.";
  2310. break;
  2311. #endif
  2312. #ifdef ERROR_SERVER_DISABLED
  2313. case ERROR_SERVER_DISABLED:
  2314. errorname = "ERROR_SERVER_DISABLED";
  2315. errormsg = "The server is currently disabled.";
  2316. break;
  2317. #endif
  2318. #ifdef ERROR_SERVER_NOT_DISABLED
  2319. case ERROR_SERVER_NOT_DISABLED:
  2320. errorname = "ERROR_SERVER_NOT_DISABLED";
  2321. errormsg = "The server is currently enabled.";
  2322. break;
  2323. #endif
  2324. #ifdef ERROR_INVALID_ID_AUTHORITY
  2325. case ERROR_INVALID_ID_AUTHORITY:
  2326. errorname = "ERROR_INVALID_ID_AUTHORITY";
  2327. errormsg = "The value provided was an invalid value for an identifier authority.";
  2328. break;
  2329. #endif
  2330. #ifdef ERROR_ALLOTTED_SPACE_EXCEEDED
  2331. case ERROR_ALLOTTED_SPACE_EXCEEDED:
  2332. errorname = "ERROR_ALLOTTED_SPACE_EXCEEDED";
  2333. errormsg = "No more memory is available for security information updates.";
  2334. break;
  2335. #endif
  2336. #ifdef ERROR_INVALID_GROUP_ATTRIBUTES
  2337. case ERROR_INVALID_GROUP_ATTRIBUTES:
  2338. errorname = "ERROR_INVALID_GROUP_ATTRIBUTES";
  2339. errormsg = "The specified attributes are invalid, or incompatible with the attributes for the group as a whole.";
  2340. break;
  2341. #endif
  2342. #ifdef ERROR_BAD_IMPERSONATION_LEVEL
  2343. case ERROR_BAD_IMPERSONATION_LEVEL:
  2344. errorname = "ERROR_BAD_IMPERSONATION_LEVEL";
  2345. errormsg = "Either a required impersonation level was not provided, or the provided impersonation level is invalid.";
  2346. break;
  2347. #endif
  2348. #ifdef ERROR_CANT_OPEN_ANONYMOUS
  2349. case ERROR_CANT_OPEN_ANONYMOUS:
  2350. errorname = "ERROR_CANT_OPEN_ANONYMOUS";
  2351. errormsg = "Cannot open an anonymous level security token.";
  2352. break;
  2353. #endif
  2354. #ifdef ERROR_BAD_VALIDATION_CLASS
  2355. case ERROR_BAD_VALIDATION_CLASS:
  2356. errorname = "ERROR_BAD_VALIDATION_CLASS";
  2357. errormsg = "The validation information class requested was invalid.";
  2358. break;
  2359. #endif
  2360. #ifdef ERROR_BAD_TOKEN_TYPE
  2361. case ERROR_BAD_TOKEN_TYPE:
  2362. errorname = "ERROR_BAD_TOKEN_TYPE";
  2363. errormsg = "The type of the token is inappropriate for its attempted use.";
  2364. break;
  2365. #endif
  2366. #ifdef ERROR_NO_SECURITY_ON_OBJECT
  2367. case ERROR_NO_SECURITY_ON_OBJECT:
  2368. errorname = "ERROR_NO_SECURITY_ON_OBJECT";
  2369. errormsg = "Unable to perform a security operation on an object which has no associated security.";
  2370. break;
  2371. #endif
  2372. #ifdef ERROR_CANT_ACCESS_DOMAIN_INFO
  2373. case ERROR_CANT_ACCESS_DOMAIN_INFO:
  2374. errorname = "ERROR_CANT_ACCESS_DOMAIN_INFO";
  2375. errormsg = "Indicates a Windows NT Server could not be contacted or that objects within the domain are protected such that necessary information could not be retrieved.";
  2376. break;
  2377. #endif
  2378. #ifdef ERROR_INVALID_SERVER_STATE
  2379. case ERROR_INVALID_SERVER_STATE:
  2380. errorname = "ERROR_INVALID_SERVER_STATE";
  2381. errormsg = "The security account manager (SAM) or local security authority (LSA) server was in the wrong state to perform the security operation.";
  2382. break;
  2383. #endif
  2384. #ifdef ERROR_INVALID_DOMAIN_STATE
  2385. case ERROR_INVALID_DOMAIN_STATE:
  2386. errorname = "ERROR_INVALID_DOMAIN_STATE";
  2387. errormsg = "The domain was in the wrong state to perform the security operation.";
  2388. break;
  2389. #endif
  2390. #ifdef ERROR_INVALID_DOMAIN_ROLE
  2391. case ERROR_INVALID_DOMAIN_ROLE:
  2392. errorname = "ERROR_INVALID_DOMAIN_ROLE";
  2393. errormsg = "This operation is only allowed for the Primary Domain Controller of the domain.";
  2394. break;
  2395. #endif
  2396. #ifdef ERROR_NO_SUCH_DOMAIN
  2397. case ERROR_NO_SUCH_DOMAIN:
  2398. errorname = "ERROR_NO_SUCH_DOMAIN";
  2399. errormsg = "The specified domain did not exist.";
  2400. break;
  2401. #endif
  2402. #ifdef ERROR_DOMAIN_EXISTS
  2403. case ERROR_DOMAIN_EXISTS:
  2404. errorname = "ERROR_DOMAIN_EXISTS";
  2405. errormsg = "The specified domain already exists.";
  2406. break;
  2407. #endif
  2408. #ifdef ERROR_DOMAIN_LIMIT_EXCEEDED
  2409. case ERROR_DOMAIN_LIMIT_EXCEEDED:
  2410. errorname = "ERROR_DOMAIN_LIMIT_EXCEEDED";
  2411. errormsg = "An attempt was made to exceed the limit on the number of domains per server.";
  2412. break;
  2413. #endif
  2414. #ifdef ERROR_INTERNAL_DB_CORRUPTION
  2415. case ERROR_INTERNAL_DB_CORRUPTION:
  2416. errorname = "ERROR_INTERNAL_DB_CORRUPTION";
  2417. errormsg = "Unable to complete the requested operation because of either a catastrophic media failure or a data structure corruption on the disk.";
  2418. break;
  2419. #endif
  2420. #ifdef ERROR_INTERNAL_ERROR
  2421. case ERROR_INTERNAL_ERROR:
  2422. errorname = "ERROR_INTERNAL_ERROR";
  2423. errormsg = "The security account database contains an internal inconsistency.";
  2424. break;
  2425. #endif
  2426. #ifdef ERROR_GENERIC_NOT_MAPPED
  2427. case ERROR_GENERIC_NOT_MAPPED:
  2428. errorname = "ERROR_GENERIC_NOT_MAPPED";
  2429. errormsg = "Generic access types were contained in an access mask which should already be mapped to non-generic types.";
  2430. break;
  2431. #endif
  2432. #ifdef ERROR_BAD_DESCRIPTOR_FORMAT
  2433. case ERROR_BAD_DESCRIPTOR_FORMAT:
  2434. errorname = "ERROR_BAD_DESCRIPTOR_FORMAT";
  2435. errormsg = "A security descriptor is not in the right format (absolute or self-relative).";
  2436. break;
  2437. #endif
  2438. #ifdef ERROR_NOT_LOGON_PROCESS
  2439. case ERROR_NOT_LOGON_PROCESS:
  2440. errorname = "ERROR_NOT_LOGON_PROCESS";
  2441. errormsg = "The requested action is restricted for use by logon processes only. The calling process has not registered as a logon process.";
  2442. break;
  2443. #endif
  2444. #ifdef ERROR_LOGON_SESSION_EXISTS
  2445. case ERROR_LOGON_SESSION_EXISTS:
  2446. errorname = "ERROR_LOGON_SESSION_EXISTS";
  2447. errormsg = "Cannot start a new logon session with an ID that is already in use.";
  2448. break;
  2449. #endif
  2450. #ifdef ERROR_NO_SUCH_PACKAGE
  2451. case ERROR_NO_SUCH_PACKAGE:
  2452. errorname = "ERROR_NO_SUCH_PACKAGE";
  2453. errormsg = "A specified authentication package is unknown.";
  2454. break;
  2455. #endif
  2456. #ifdef ERROR_BAD_LOGON_SESSION_STATE
  2457. case ERROR_BAD_LOGON_SESSION_STATE:
  2458. errorname = "ERROR_BAD_LOGON_SESSION_STATE";
  2459. errormsg = "The logon session is not in a state that is consistent with the requested operation.";
  2460. break;
  2461. #endif
  2462. #ifdef ERROR_LOGON_SESSION_COLLISION
  2463. case ERROR_LOGON_SESSION_COLLISION:
  2464. errorname = "ERROR_LOGON_SESSION_COLLISION";
  2465. errormsg = "The logon session ID is already in use.";
  2466. break;
  2467. #endif
  2468. #ifdef ERROR_INVALID_LOGON_TYPE
  2469. case ERROR_INVALID_LOGON_TYPE:
  2470. errorname = "ERROR_INVALID_LOGON_TYPE";
  2471. errormsg = "A logon request contained an invalid logon type value.";
  2472. break;
  2473. #endif
  2474. #ifdef ERROR_CANNOT_IMPERSONATE
  2475. case ERROR_CANNOT_IMPERSONATE:
  2476. errorname = "ERROR_CANNOT_IMPERSONATE";
  2477. errormsg = "Unable to impersonate via a named pipe until data has been read from that pipe.";
  2478. break;
  2479. #endif
  2480. #ifdef ERROR_RXACT_INVALID_STATE
  2481. case ERROR_RXACT_INVALID_STATE:
  2482. errorname = "ERROR_RXACT_INVALID_STATE";
  2483. errormsg = "The transaction state of a Registry subtree is incompatible with the requested operation.";
  2484. break;
  2485. #endif
  2486. #ifdef ERROR_RXACT_COMMIT_FAILURE
  2487. case ERROR_RXACT_COMMIT_FAILURE:
  2488. errorname = "ERROR_RXACT_COMMIT_FAILURE";
  2489. errormsg = "An internal security database corruption has been encountered.";
  2490. break;
  2491. #endif
  2492. #ifdef ERROR_SPECIAL_ACCOUNT
  2493. case ERROR_SPECIAL_ACCOUNT:
  2494. errorname = "ERROR_SPECIAL_ACCOUNT";
  2495. errormsg = "Cannot perform this operation on built-in accounts.";
  2496. break;
  2497. #endif
  2498. #ifdef ERROR_SPECIAL_GROUP
  2499. case ERROR_SPECIAL_GROUP:
  2500. errorname = "ERROR_SPECIAL_GROUP";
  2501. errormsg = "Cannot perform this operation on this built-in special group.";
  2502. break;
  2503. #endif
  2504. #ifdef ERROR_SPECIAL_USER
  2505. case ERROR_SPECIAL_USER:
  2506. errorname = "ERROR_SPECIAL_USER";
  2507. errormsg = "Cannot perform this operation on this built-in special user.";
  2508. break;
  2509. #endif
  2510. #ifdef ERROR_MEMBERS_PRIMARY_GROUP
  2511. case ERROR_MEMBERS_PRIMARY_GROUP:
  2512. errorname = "ERROR_MEMBERS_PRIMARY_GROUP";
  2513. errormsg = "The user cannot be removed from a group because the group is currently the user's primary group.";
  2514. break;
  2515. #endif
  2516. #ifdef ERROR_TOKEN_ALREADY_IN_USE
  2517. case ERROR_TOKEN_ALREADY_IN_USE:
  2518. errorname = "ERROR_TOKEN_ALREADY_IN_USE";
  2519. errormsg = "The token is already in use as a primary token.";
  2520. break;
  2521. #endif
  2522. #ifdef ERROR_NO_SUCH_ALIAS
  2523. case ERROR_NO_SUCH_ALIAS:
  2524. errorname = "ERROR_NO_SUCH_ALIAS";
  2525. errormsg = "The specified local group does not exist.";
  2526. break;
  2527. #endif
  2528. #ifdef ERROR_MEMBER_NOT_IN_ALIAS
  2529. case ERROR_MEMBER_NOT_IN_ALIAS:
  2530. errorname = "ERROR_MEMBER_NOT_IN_ALIAS";
  2531. errormsg = "The specified account name is not a member of the local group.";
  2532. break;
  2533. #endif
  2534. #ifdef ERROR_MEMBER_IN_ALIAS
  2535. case ERROR_MEMBER_IN_ALIAS:
  2536. errorname = "ERROR_MEMBER_IN_ALIAS";
  2537. errormsg = "The specified account name is already a member of the local group.";
  2538. break;
  2539. #endif
  2540. #ifdef ERROR_ALIAS_EXISTS
  2541. case ERROR_ALIAS_EXISTS:
  2542. errorname = "ERROR_ALIAS_EXISTS";
  2543. errormsg = "The specified local group already exists.";
  2544. break;
  2545. #endif
  2546. #ifdef ERROR_LOGON_NOT_GRANTED
  2547. case ERROR_LOGON_NOT_GRANTED:
  2548. errorname = "ERROR_LOGON_NOT_GRANTED";
  2549. errormsg = "Logon failure: the user has not been granted the requested logon type at this computer.";
  2550. break;
  2551. #endif
  2552. #ifdef ERROR_TOO_MANY_SECRETS
  2553. case ERROR_TOO_MANY_SECRETS:
  2554. errorname = "ERROR_TOO_MANY_SECRETS";
  2555. errormsg = "The maximum number of secrets that may be stored in a single system has been exceeded.";
  2556. break;
  2557. #endif
  2558. #ifdef ERROR_SECRET_TOO_LONG
  2559. case ERROR_SECRET_TOO_LONG:
  2560. errorname = "ERROR_SECRET_TOO_LONG";
  2561. errormsg = "The length of a secret exceeds the maximum length allowed.";
  2562. break;
  2563. #endif
  2564. #ifdef ERROR_INTERNAL_DB_ERROR
  2565. case ERROR_INTERNAL_DB_ERROR:
  2566. errorname = "ERROR_INTERNAL_DB_ERROR";
  2567. errormsg = "The local security authority database contains an internal inconsistency.";
  2568. break;
  2569. #endif
  2570. #ifdef ERROR_TOO_MANY_CONTEXT_IDS
  2571. case ERROR_TOO_MANY_CONTEXT_IDS:
  2572. errorname = "ERROR_TOO_MANY_CONTEXT_IDS";
  2573. errormsg = "During a logon attempt, the user's security context accumulated too many security IDs.";
  2574. break;
  2575. #endif
  2576. #ifdef ERROR_LOGON_TYPE_NOT_GRANTED
  2577. case ERROR_LOGON_TYPE_NOT_GRANTED:
  2578. errorname = "ERROR_LOGON_TYPE_NOT_GRANTED";
  2579. errormsg = "Logon failure: the user has not been granted the requested logon type at this computer.";
  2580. break;
  2581. #endif
  2582. #ifdef ERROR_NT_CROSS_ENCRYPTION_REQUIRED
  2583. case ERROR_NT_CROSS_ENCRYPTION_REQUIRED:
  2584. errorname = "ERROR_NT_CROSS_ENCRYPTION_REQUIRED";
  2585. errormsg = "A cross-encrypted password is necessary to change a user password.";
  2586. break;
  2587. #endif
  2588. #ifdef ERROR_NO_SUCH_MEMBER
  2589. case ERROR_NO_SUCH_MEMBER:
  2590. errorname = "ERROR_NO_SUCH_MEMBER";
  2591. errormsg = "A new member could not be added to a local group because the member does not exist.";
  2592. break;
  2593. #endif
  2594. #ifdef ERROR_INVALID_MEMBER
  2595. case ERROR_INVALID_MEMBER:
  2596. errorname = "ERROR_INVALID_MEMBER";
  2597. errormsg = "A new member could not be added to a local group because the member has the wrong account type.";
  2598. break;
  2599. #endif
  2600. #ifdef ERROR_TOO_MANY_SIDS
  2601. case ERROR_TOO_MANY_SIDS:
  2602. errorname = "ERROR_TOO_MANY_SIDS";
  2603. errormsg = "Too many security IDs have been specified.";
  2604. break;
  2605. #endif
  2606. #ifdef ERROR_LM_CROSS_ENCRYPTION_REQUIRED
  2607. case ERROR_LM_CROSS_ENCRYPTION_REQUIRED:
  2608. errorname = "ERROR_LM_CROSS_ENCRYPTION_REQUIRED";
  2609. errormsg = "A cross-encrypted password is necessary to change this user password.";
  2610. break;
  2611. #endif
  2612. #ifdef ERROR_NO_INHERITANCE
  2613. case ERROR_NO_INHERITANCE:
  2614. errorname = "ERROR_NO_INHERITANCE";
  2615. errormsg = "Indicates an ACL contains no inheritable components.";
  2616. break;
  2617. #endif
  2618. #ifdef ERROR_FILE_CORRUPT
  2619. case ERROR_FILE_CORRUPT:
  2620. errorname = "ERROR_FILE_CORRUPT";
  2621. errormsg = "The file or directory is corrupt and non-readable.";
  2622. break;
  2623. #endif
  2624. #ifdef ERROR_DISK_CORRUPT
  2625. case ERROR_DISK_CORRUPT:
  2626. errorname = "ERROR_DISK_CORRUPT";
  2627. errormsg = "The disk structure is corrupt and non-readable.";
  2628. break;
  2629. #endif
  2630. #ifdef ERROR_NO_USER_SESSION_KEY
  2631. case ERROR_NO_USER_SESSION_KEY:
  2632. errorname = "ERROR_NO_USER_SESSION_KEY";
  2633. errormsg = "There is no user session key for the specified logon session.";
  2634. break;
  2635. #endif
  2636. #ifdef ERROR_LICENSE_QUOTA_EXCEEDED
  2637. case ERROR_LICENSE_QUOTA_EXCEEDED:
  2638. errorname = "ERROR_LICENSE_QUOTA_EXCEEDED";
  2639. errormsg = "The service being accessed is licensed for a particular number of connections. No more connections can be made to the service at this time because there are already as many connections as the service can accept.";
  2640. break;
  2641. #endif
  2642. #ifdef ERROR_INVALID_WINDOW_HANDLE
  2643. case ERROR_INVALID_WINDOW_HANDLE:
  2644. errorname = "ERROR_INVALID_WINDOW_HANDLE";
  2645. errormsg = "Invalid window handle.";
  2646. break;
  2647. #endif
  2648. #ifdef ERROR_INVALID_MENU_HANDLE
  2649. case ERROR_INVALID_MENU_HANDLE:
  2650. errorname = "ERROR_INVALID_MENU_HANDLE";
  2651. errormsg = "Invalid menu handle.";
  2652. break;
  2653. #endif
  2654. #ifdef ERROR_INVALID_CURSOR_HANDLE
  2655. case ERROR_INVALID_CURSOR_HANDLE:
  2656. errorname = "ERROR_INVALID_CURSOR_HANDLE";
  2657. errormsg = "Invalid cursor handle.";
  2658. break;
  2659. #endif
  2660. #ifdef ERROR_INVALID_ACCEL_HANDLE
  2661. case ERROR_INVALID_ACCEL_HANDLE:
  2662. errorname = "ERROR_INVALID_ACCEL_HANDLE";
  2663. errormsg = "Invalid accelerator table handle.";
  2664. break;
  2665. #endif
  2666. #ifdef ERROR_INVALID_HOOK_HANDLE
  2667. case ERROR_INVALID_HOOK_HANDLE:
  2668. errorname = "ERROR_INVALID_HOOK_HANDLE";
  2669. errormsg = "Invalid hook handle.";
  2670. break;
  2671. #endif
  2672. #ifdef ERROR_INVALID_DWP_HANDLE
  2673. case ERROR_INVALID_DWP_HANDLE:
  2674. errorname = "ERROR_INVALID_DWP_HANDLE";
  2675. errormsg = "Invalid handle to a multiple-window position structure.";
  2676. break;
  2677. #endif
  2678. #ifdef ERROR_TLW_WITH_WSCHILD
  2679. case ERROR_TLW_WITH_WSCHILD:
  2680. errorname = "ERROR_TLW_WITH_WSCHILD";
  2681. errormsg = "Cannot create a top-level child window.";
  2682. break;
  2683. #endif
  2684. #ifdef ERROR_CANNOT_FIND_WND_CLASS
  2685. case ERROR_CANNOT_FIND_WND_CLASS:
  2686. errorname = "ERROR_CANNOT_FIND_WND_CLASS";
  2687. errormsg = "Cannot find window class.";
  2688. break;
  2689. #endif
  2690. #ifdef ERROR_WINDOW_OF_OTHER_THREAD
  2691. case ERROR_WINDOW_OF_OTHER_THREAD:
  2692. errorname = "ERROR_WINDOW_OF_OTHER_THREAD";
  2693. errormsg = "Invalid window, belongs to other thread.";
  2694. break;
  2695. #endif
  2696. #ifdef ERROR_HOTKEY_ALREADY_REGISTERED
  2697. case ERROR_HOTKEY_ALREADY_REGISTERED:
  2698. errorname = "ERROR_HOTKEY_ALREADY_REGISTERED";
  2699. errormsg = "Hot key is already registered.";
  2700. break;
  2701. #endif
  2702. #ifdef ERROR_CLASS_ALREADY_EXISTS
  2703. case ERROR_CLASS_ALREADY_EXISTS:
  2704. errorname = "ERROR_CLASS_ALREADY_EXISTS";
  2705. errormsg = "Class already exists.";
  2706. break;
  2707. #endif
  2708. #ifdef ERROR_CLASS_DOES_NOT_EXIST
  2709. case ERROR_CLASS_DOES_NOT_EXIST:
  2710. errorname = "ERROR_CLASS_DOES_NOT_EXIST";
  2711. errormsg = "Class does not exist.";
  2712. break;
  2713. #endif
  2714. #ifdef ERROR_CLASS_HAS_WINDOWS
  2715. case ERROR_CLASS_HAS_WINDOWS:
  2716. errorname = "ERROR_CLASS_HAS_WINDOWS";
  2717. errormsg = "Class still has open windows.";
  2718. break;
  2719. #endif
  2720. #ifdef ERROR_INVALID_INDEX
  2721. case ERROR_INVALID_INDEX:
  2722. errorname = "ERROR_INVALID_INDEX";
  2723. errormsg = "Invalid index.";
  2724. break;
  2725. #endif
  2726. #ifdef ERROR_INVALID_ICON_HANDLE
  2727. case ERROR_INVALID_ICON_HANDLE:
  2728. errorname = "ERROR_INVALID_ICON_HANDLE";
  2729. errormsg = "Invalid icon handle.";
  2730. break;
  2731. #endif
  2732. #ifdef ERROR_PRIVATE_DIALOG_INDEX
  2733. case ERROR_PRIVATE_DIALOG_INDEX:
  2734. errorname = "ERROR_PRIVATE_DIALOG_INDEX";
  2735. errormsg = "Using private DIALOG window words.";
  2736. break;
  2737. #endif
  2738. #ifdef ERROR_LISTBOX_ID_NOT_FOUND
  2739. case ERROR_LISTBOX_ID_NOT_FOUND:
  2740. errorname = "ERROR_LISTBOX_ID_NOT_FOUND";
  2741. errormsg = "The listbox identifier was not found.";
  2742. break;
  2743. #endif
  2744. #ifdef ERROR_NO_WILDCARD_CHARACTERS
  2745. case ERROR_NO_WILDCARD_CHARACTERS:
  2746. errorname = "ERROR_NO_WILDCARD_CHARACTERS";
  2747. errormsg = "No wildcards were found.";
  2748. break;
  2749. #endif
  2750. #ifdef ERROR_CLIPBOARD_NOT_OPEN
  2751. case ERROR_CLIPBOARD_NOT_OPEN:
  2752. errorname = "ERROR_CLIPBOARD_NOT_OPEN";
  2753. errormsg = "Thread does not have a clipboard open.";
  2754. break;
  2755. #endif
  2756. #ifdef ERROR_HOTKEY_NOT_REGISTERED
  2757. case ERROR_HOTKEY_NOT_REGISTERED:
  2758. errorname = "ERROR_HOTKEY_NOT_REGISTERED";
  2759. errormsg = "Hot key is not registered.";
  2760. break;
  2761. #endif
  2762. #ifdef ERROR_WINDOW_NOT_DIALOG
  2763. case ERROR_WINDOW_NOT_DIALOG:
  2764. errorname = "ERROR_WINDOW_NOT_DIALOG";
  2765. errormsg = "The window is not a valid dialog window.";
  2766. break;
  2767. #endif
  2768. #ifdef ERROR_CONTROL_ID_NOT_FOUND
  2769. case ERROR_CONTROL_ID_NOT_FOUND:
  2770. errorname = "ERROR_CONTROL_ID_NOT_FOUND";
  2771. errormsg = "Control ID not found.";
  2772. break;
  2773. #endif
  2774. #ifdef ERROR_INVALID_COMBOBOX_MESSAGE
  2775. case ERROR_INVALID_COMBOBOX_MESSAGE:
  2776. errorname = "ERROR_INVALID_COMBOBOX_MESSAGE";
  2777. errormsg = "Invalid message for a combo box because it does not have an edit control.";
  2778. break;
  2779. #endif
  2780. #ifdef ERROR_WINDOW_NOT_COMBOBOX
  2781. case ERROR_WINDOW_NOT_COMBOBOX:
  2782. errorname = "ERROR_WINDOW_NOT_COMBOBOX";
  2783. errormsg = "The window is not a combo box.";
  2784. break;
  2785. #endif
  2786. #ifdef ERROR_INVALID_EDIT_HEIGHT
  2787. case ERROR_INVALID_EDIT_HEIGHT:
  2788. errorname = "ERROR_INVALID_EDIT_HEIGHT";
  2789. errormsg = "Height must be less than 256.";
  2790. break;
  2791. #endif
  2792. #ifdef ERROR_DC_NOT_FOUND
  2793. case ERROR_DC_NOT_FOUND:
  2794. errorname = "ERROR_DC_NOT_FOUND";
  2795. errormsg = "Invalid device context (DC) handle.";
  2796. break;
  2797. #endif
  2798. #ifdef ERROR_INVALID_HOOK_FILTER
  2799. case ERROR_INVALID_HOOK_FILTER:
  2800. errorname = "ERROR_INVALID_HOOK_FILTER";
  2801. errormsg = "Invalid hook procedure type.";
  2802. break;
  2803. #endif
  2804. #ifdef ERROR_INVALID_FILTER_PROC
  2805. case ERROR_INVALID_FILTER_PROC:
  2806. errorname = "ERROR_INVALID_FILTER_PROC";
  2807. errormsg = "Invalid hook procedure.";
  2808. break;
  2809. #endif
  2810. #ifdef ERROR_HOOK_NEEDS_HMOD
  2811. case ERROR_HOOK_NEEDS_HMOD:
  2812. errorname = "ERROR_HOOK_NEEDS_HMOD";
  2813. errormsg = "Cannot set non-local hook without a module handle.";
  2814. break;
  2815. #endif
  2816. #ifdef ERROR_GLOBAL_ONLY_HOOK
  2817. case ERROR_GLOBAL_ONLY_HOOK:
  2818. errorname = "ERROR_GLOBAL_ONLY_HOOK";
  2819. errormsg = "This hook procedure can only be set globally.";
  2820. break;
  2821. #endif
  2822. #ifdef ERROR_JOURNAL_HOOK_SET
  2823. case ERROR_JOURNAL_HOOK_SET:
  2824. errorname = "ERROR_JOURNAL_HOOK_SET";
  2825. errormsg = "The journal hook procedure is already installed.";
  2826. break;
  2827. #endif
  2828. #ifdef ERROR_HOOK_NOT_INSTALLED
  2829. case ERROR_HOOK_NOT_INSTALLED:
  2830. errorname = "ERROR_HOOK_NOT_INSTALLED";
  2831. errormsg = "The hook procedure is not installed.";
  2832. break;
  2833. #endif
  2834. #ifdef ERROR_INVALID_LB_MESSAGE
  2835. case ERROR_INVALID_LB_MESSAGE:
  2836. errorname = "ERROR_INVALID_LB_MESSAGE";
  2837. errormsg = "Invalid message for single-selection listbox.";
  2838. break;
  2839. #endif
  2840. #ifdef ERROR_SETCOUNT_ON_BAD_LB
  2841. case ERROR_SETCOUNT_ON_BAD_LB:
  2842. errorname = "ERROR_SETCOUNT_ON_BAD_LB";
  2843. errormsg = "LB_SETCOUNT sent to non-lazy listbox.";
  2844. break;
  2845. #endif
  2846. #ifdef ERROR_LB_WITHOUT_TABSTOPS
  2847. case ERROR_LB_WITHOUT_TABSTOPS:
  2848. errorname = "ERROR_LB_WITHOUT_TABSTOPS";
  2849. errormsg = "This list box does not support tab stops.";
  2850. break;
  2851. #endif
  2852. #ifdef ERROR_DESTROY_OBJECT_OF_OTHER_THREAD
  2853. case ERROR_DESTROY_OBJECT_OF_OTHER_THREAD:
  2854. errorname = "ERROR_DESTROY_OBJECT_OF_OTHER_THREAD";
  2855. errormsg = "Cannot destroy object created by another thread.";
  2856. break;
  2857. #endif
  2858. #ifdef ERROR_CHILD_WINDOW_MENU
  2859. case ERROR_CHILD_WINDOW_MENU:
  2860. errorname = "ERROR_CHILD_WINDOW_MENU";
  2861. errormsg = "Child windows cannot have menus.";
  2862. break;
  2863. #endif
  2864. #ifdef ERROR_NO_SYSTEM_MENU
  2865. case ERROR_NO_SYSTEM_MENU:
  2866. errorname = "ERROR_NO_SYSTEM_MENU";
  2867. errormsg = "The window does not have a system menu.";
  2868. break;
  2869. #endif
  2870. #ifdef ERROR_INVALID_MSGBOX_STYLE
  2871. case ERROR_INVALID_MSGBOX_STYLE:
  2872. errorname = "ERROR_INVALID_MSGBOX_STYLE";
  2873. errormsg = "Invalid message box style.";
  2874. break;
  2875. #endif
  2876. #ifdef ERROR_INVALID_SPI_VALUE
  2877. case ERROR_INVALID_SPI_VALUE:
  2878. errorname = "ERROR_INVALID_SPI_VALUE";
  2879. errormsg = "Invalid system-wide (SPI_*) parameter.";
  2880. break;
  2881. #endif
  2882. #ifdef ERROR_SCREEN_ALREADY_LOCKED
  2883. case ERROR_SCREEN_ALREADY_LOCKED:
  2884. errorname = "ERROR_SCREEN_ALREADY_LOCKED";
  2885. errormsg = "Screen already locked.";
  2886. break;
  2887. #endif
  2888. #ifdef ERROR_HWNDS_HAVE_DIFF_PARENT
  2889. case ERROR_HWNDS_HAVE_DIFF_PARENT:
  2890. errorname = "ERROR_HWNDS_HAVE_DIFF_PARENT";
  2891. errormsg = "All handles to windows in a multiple-window position structure must have the same parent.";
  2892. break;
  2893. #endif
  2894. #ifdef ERROR_NOT_CHILD_WINDOW
  2895. case ERROR_NOT_CHILD_WINDOW:
  2896. errorname = "ERROR_NOT_CHILD_WINDOW";
  2897. errormsg = "The window is not a child window.";
  2898. break;
  2899. #endif
  2900. #ifdef ERROR_INVALID_GW_COMMAND
  2901. case ERROR_INVALID_GW_COMMAND:
  2902. errorname = "ERROR_INVALID_GW_COMMAND";
  2903. errormsg = "Invalid GW_* command.";
  2904. break;
  2905. #endif
  2906. #ifdef ERROR_INVALID_THREAD_ID
  2907. case ERROR_INVALID_THREAD_ID:
  2908. errorname = "ERROR_INVALID_THREAD_ID";
  2909. errormsg = "Invalid thread identifier.";
  2910. break;
  2911. #endif
  2912. #ifdef ERROR_NON_MDICHILD_WINDOW
  2913. case ERROR_NON_MDICHILD_WINDOW:
  2914. errorname = "ERROR_NON_MDICHILD_WINDOW";
  2915. errormsg = "Cannot process a message from a window that is not a multiple document interface (MDI) window.";
  2916. break;
  2917. #endif
  2918. #ifdef ERROR_POPUP_ALREADY_ACTIVE
  2919. case ERROR_POPUP_ALREADY_ACTIVE:
  2920. errorname = "ERROR_POPUP_ALREADY_ACTIVE";
  2921. errormsg = "Popup menu already active.";
  2922. break;
  2923. #endif
  2924. #ifdef ERROR_NO_SCROLLBARS
  2925. case ERROR_NO_SCROLLBARS:
  2926. errorname = "ERROR_NO_SCROLLBARS";
  2927. errormsg = "The window does not have scroll bars.";
  2928. break;
  2929. #endif
  2930. #ifdef ERROR_INVALID_SCROLLBAR_RANGE
  2931. case ERROR_INVALID_SCROLLBAR_RANGE:
  2932. errorname = "ERROR_INVALID_SCROLLBAR_RANGE";
  2933. errormsg = "Scroll bar range cannot be greater than 0x7FFF.";
  2934. break;
  2935. #endif
  2936. #ifdef ERROR_INVALID_SHOWWIN_COMMAND
  2937. case ERROR_INVALID_SHOWWIN_COMMAND:
  2938. errorname = "ERROR_INVALID_SHOWWIN_COMMAND";
  2939. errormsg = "Cannot show or remove the window in the way specified.";
  2940. break;
  2941. #endif
  2942. #ifdef ERROR_NO_SYSTEM_RESOURCES
  2943. case ERROR_NO_SYSTEM_RESOURCES:
  2944. errorname = "ERROR_NO_SYSTEM_RESOURCES";
  2945. errormsg = "Insufficient system resources exist to complete the requested service.";
  2946. break;
  2947. #endif
  2948. #ifdef ERROR_NONPAGED_SYSTEM_RESOURCES
  2949. case ERROR_NONPAGED_SYSTEM_RESOURCES:
  2950. errorname = "ERROR_NONPAGED_SYSTEM_RESOURCES";
  2951. errormsg = "Insufficient system resources exist to complete the requested service.";
  2952. break;
  2953. #endif
  2954. #ifdef ERROR_PAGED_SYSTEM_RESOURCES
  2955. case ERROR_PAGED_SYSTEM_RESOURCES:
  2956. errorname = "ERROR_PAGED_SYSTEM_RESOURCES";
  2957. errormsg = "Insufficient system resources exist to complete the requested service.";
  2958. break;
  2959. #endif
  2960. #ifdef ERROR_WORKING_SET_QUOTA
  2961. case ERROR_WORKING_SET_QUOTA:
  2962. errorname = "ERROR_WORKING_SET_QUOTA";
  2963. errormsg = "Insufficient quota to complete the requested service.";
  2964. break;
  2965. #endif
  2966. #ifdef ERROR_PAGEFILE_QUOTA
  2967. case ERROR_PAGEFILE_QUOTA:
  2968. errorname = "ERROR_PAGEFILE_QUOTA";
  2969. errormsg = "Insufficient quota to complete the requested service.";
  2970. break;
  2971. #endif
  2972. #ifdef ERROR_COMMITMENT_LIMIT
  2973. case ERROR_COMMITMENT_LIMIT:
  2974. errorname = "ERROR_COMMITMENT_LIMIT";
  2975. errormsg = "The paging file is too small for this operation to complete.";
  2976. break;
  2977. #endif
  2978. #ifdef ERROR_MENU_ITEM_NOT_FOUND
  2979. case ERROR_MENU_ITEM_NOT_FOUND:
  2980. errorname = "ERROR_MENU_ITEM_NOT_FOUND";
  2981. errormsg = "A menu item was not found.";
  2982. break;
  2983. #endif
  2984. #ifdef ERROR_EVENTLOG_FILE_CORRUPT
  2985. case ERROR_EVENTLOG_FILE_CORRUPT:
  2986. errorname = "ERROR_EVENTLOG_FILE_CORRUPT";
  2987. errormsg = "The event log file is corrupt.";
  2988. break;
  2989. #endif
  2990. #ifdef ERROR_EVENTLOG_CANT_START
  2991. case ERROR_EVENTLOG_CANT_START:
  2992. errorname = "ERROR_EVENTLOG_CANT_START";
  2993. errormsg = "No event log file could be opened, so the event logging service did not start.";
  2994. break;
  2995. #endif
  2996. #ifdef ERROR_LOG_FILE_FULL
  2997. case ERROR_LOG_FILE_FULL:
  2998. errorname = "ERROR_LOG_FILE_FULL";
  2999. errormsg = "The event log file is full.";
  3000. break;
  3001. #endif
  3002. #ifdef ERROR_EVENTLOG_FILE_CHANGED
  3003. case ERROR_EVENTLOG_FILE_CHANGED:
  3004. errorname = "ERROR_EVENTLOG_FILE_CHANGED";
  3005. errormsg = "The event log file has changed between reads.";
  3006. break;
  3007. #endif
  3008. #ifdef RPC_S_INVALID_STRING_BINDING
  3009. case RPC_S_INVALID_STRING_BINDING:
  3010. errorname = "RPC_S_INVALID_STRING_BINDING";
  3011. errormsg = "The string binding is invalid.";
  3012. break;
  3013. #endif
  3014. #ifdef RPC_S_WRONG_KIND_OF_BINDING
  3015. case RPC_S_WRONG_KIND_OF_BINDING:
  3016. errorname = "RPC_S_WRONG_KIND_OF_BINDING";
  3017. errormsg = "The binding handle is not the correct type.";
  3018. break;
  3019. #endif
  3020. #ifdef RPC_S_INVALID_BINDING
  3021. case RPC_S_INVALID_BINDING:
  3022. errorname = "RPC_S_INVALID_BINDING";
  3023. errormsg = "The binding handle is invalid.";
  3024. break;
  3025. #endif
  3026. #ifdef RPC_S_PROTSEQ_NOT_SUPPORTED
  3027. case RPC_S_PROTSEQ_NOT_SUPPORTED:
  3028. errorname = "RPC_S_PROTSEQ_NOT_SUPPORTED";
  3029. errormsg = "The RPC protocol sequence is not supported.";
  3030. break;
  3031. #endif
  3032. #ifdef RPC_S_INVALID_RPC_PROTSEQ
  3033. case RPC_S_INVALID_RPC_PROTSEQ:
  3034. errorname = "RPC_S_INVALID_RPC_PROTSEQ";
  3035. errormsg = "The RPC protocol sequence is invalid.";
  3036. break;
  3037. #endif
  3038. #ifdef RPC_S_INVALID_STRING_UUID
  3039. case RPC_S_INVALID_STRING_UUID:
  3040. errorname = "RPC_S_INVALID_STRING_UUID";
  3041. errormsg = "The string universal unique identifier (UUID) is invalid.";
  3042. break;
  3043. #endif
  3044. #ifdef RPC_S_INVALID_ENDPOINT_FORMAT
  3045. case RPC_S_INVALID_ENDPOINT_FORMAT:
  3046. errorname = "RPC_S_INVALID_ENDPOINT_FORMAT";
  3047. errormsg = "The endpoint format is invalid.";
  3048. break;
  3049. #endif
  3050. #ifdef RPC_S_INVALID_NET_ADDR
  3051. case RPC_S_INVALID_NET_ADDR:
  3052. errorname = "RPC_S_INVALID_NET_ADDR";
  3053. errormsg = "The network address is invalid.";
  3054. break;
  3055. #endif
  3056. #ifdef RPC_S_NO_ENDPOINT_FOUND
  3057. case RPC_S_NO_ENDPOINT_FOUND:
  3058. errorname = "RPC_S_NO_ENDPOINT_FOUND";
  3059. errormsg = "No endpoint was found.";
  3060. break;
  3061. #endif
  3062. #ifdef RPC_S_INVALID_TIMEOUT
  3063. case RPC_S_INVALID_TIMEOUT:
  3064. errorname = "RPC_S_INVALID_TIMEOUT";
  3065. errormsg = "The timeout value is invalid.";
  3066. break;
  3067. #endif
  3068. #ifdef RPC_S_OBJECT_NOT_FOUND
  3069. case RPC_S_OBJECT_NOT_FOUND:
  3070. errorname = "RPC_S_OBJECT_NOT_FOUND";
  3071. errormsg = "The object universal unique identifier (UUID) was not found.";
  3072. break;
  3073. #endif
  3074. #ifdef RPC_S_ALREADY_REGISTERED
  3075. case RPC_S_ALREADY_REGISTERED:
  3076. errorname = "RPC_S_ALREADY_REGISTERED";
  3077. errormsg = "The object universal unique identifier (UUID) has already been registered.";
  3078. break;
  3079. #endif
  3080. #ifdef RPC_S_TYPE_ALREADY_REGISTERED
  3081. case RPC_S_TYPE_ALREADY_REGISTERED:
  3082. errorname = "RPC_S_TYPE_ALREADY_REGISTERED";
  3083. errormsg = "The type universal unique identifier (UUID) has already been registered.";
  3084. break;
  3085. #endif
  3086. #ifdef RPC_S_ALREADY_LISTENING
  3087. case RPC_S_ALREADY_LISTENING:
  3088. errorname = "RPC_S_ALREADY_LISTENING";
  3089. errormsg = "The RPC server is already listening.";
  3090. break;
  3091. #endif
  3092. #ifdef RPC_S_NO_PROTSEQS_REGISTERED
  3093. case RPC_S_NO_PROTSEQS_REGISTERED:
  3094. errorname = "RPC_S_NO_PROTSEQS_REGISTERED";
  3095. errormsg = "No protocol sequences have been registered.";
  3096. break;
  3097. #endif
  3098. #ifdef RPC_S_NOT_LISTENING
  3099. case RPC_S_NOT_LISTENING:
  3100. errorname = "RPC_S_NOT_LISTENING";
  3101. errormsg = "The RPC server is not listening.";
  3102. break;
  3103. #endif
  3104. #ifdef RPC_S_UNKNOWN_MGR_TYPE
  3105. case RPC_S_UNKNOWN_MGR_TYPE:
  3106. errorname = "RPC_S_UNKNOWN_MGR_TYPE";
  3107. errormsg = "The manager type is unknown.";
  3108. break;
  3109. #endif
  3110. #ifdef RPC_S_UNKNOWN_IF
  3111. case RPC_S_UNKNOWN_IF:
  3112. errorname = "RPC_S_UNKNOWN_IF";
  3113. errormsg = "The interface is unknown.";
  3114. break;
  3115. #endif
  3116. #ifdef RPC_S_NO_BINDINGS
  3117. case RPC_S_NO_BINDINGS:
  3118. errorname = "RPC_S_NO_BINDINGS";
  3119. errormsg = "There are no bindings.";
  3120. break;
  3121. #endif
  3122. #ifdef RPC_S_NO_PROTSEQS
  3123. case RPC_S_NO_PROTSEQS:
  3124. errorname = "RPC_S_NO_PROTSEQS";
  3125. errormsg = "There are no protocol sequences.";
  3126. break;
  3127. #endif
  3128. #ifdef RPC_S_CANT_CREATE_ENDPOINT
  3129. case RPC_S_CANT_CREATE_ENDPOINT:
  3130. errorname = "RPC_S_CANT_CREATE_ENDPOINT";
  3131. errormsg = "The endpoint cannot be created.";
  3132. break;
  3133. #endif
  3134. #ifdef RPC_S_OUT_OF_RESOURCES
  3135. case RPC_S_OUT_OF_RESOURCES:
  3136. errorname = "RPC_S_OUT_OF_RESOURCES";
  3137. errormsg = "Not enough resources are available to complete this operation.";
  3138. break;
  3139. #endif
  3140. #ifdef RPC_S_SERVER_UNAVAILABLE
  3141. case RPC_S_SERVER_UNAVAILABLE:
  3142. errorname = "RPC_S_SERVER_UNAVAILABLE";
  3143. errormsg = "The RPC server is unavailable.";
  3144. break;
  3145. #endif
  3146. #ifdef RPC_S_SERVER_TOO_BUSY
  3147. case RPC_S_SERVER_TOO_BUSY:
  3148. errorname = "RPC_S_SERVER_TOO_BUSY";
  3149. errormsg = "The RPC server is too busy to complete this operation.";
  3150. break;
  3151. #endif
  3152. #ifdef RPC_S_INVALID_NETWORK_OPTIONS
  3153. case RPC_S_INVALID_NETWORK_OPTIONS:
  3154. errorname = "RPC_S_INVALID_NETWORK_OPTIONS";
  3155. errormsg = "The network options are invalid.";
  3156. break;
  3157. #endif
  3158. #ifdef RPC_S_NO_CALL_ACTIVE
  3159. case RPC_S_NO_CALL_ACTIVE:
  3160. errorname = "RPC_S_NO_CALL_ACTIVE";
  3161. errormsg = "There is not a remote procedure call active in this thread.";
  3162. break;
  3163. #endif
  3164. #ifdef RPC_S_CALL_FAILED
  3165. case RPC_S_CALL_FAILED:
  3166. errorname = "RPC_S_CALL_FAILED";
  3167. errormsg = "The remote procedure call failed.";
  3168. break;
  3169. #endif
  3170. #ifdef RPC_S_CALL_FAILED_DNE
  3171. case RPC_S_CALL_FAILED_DNE:
  3172. errorname = "RPC_S_CALL_FAILED_DNE";
  3173. errormsg = "The remote procedure call failed and did not execute.";
  3174. break;
  3175. #endif
  3176. #ifdef RPC_S_PROTOCOL_ERROR
  3177. case RPC_S_PROTOCOL_ERROR:
  3178. errorname = "RPC_S_PROTOCOL_ERROR";
  3179. errormsg = "A remote procedure call (RPC) protocol error occurred.";
  3180. break;
  3181. #endif
  3182. #ifdef RPC_S_UNSUPPORTED_TRANS_SYN
  3183. case RPC_S_UNSUPPORTED_TRANS_SYN:
  3184. errorname = "RPC_S_UNSUPPORTED_TRANS_SYN";
  3185. errormsg = "The transfer syntax is not supported by the RPC server.";
  3186. break;
  3187. #endif
  3188. #ifdef RPC_S_UNSUPPORTED_TYPE
  3189. case RPC_S_UNSUPPORTED_TYPE:
  3190. errorname = "RPC_S_UNSUPPORTED_TYPE";
  3191. errormsg = "The universal unique identifier (UUID) type is not supported.";
  3192. break;
  3193. #endif
  3194. #ifdef RPC_S_INVALID_TAG
  3195. case RPC_S_INVALID_TAG:
  3196. errorname = "RPC_S_INVALID_TAG";
  3197. errormsg = "The tag is invalid.";
  3198. break;
  3199. #endif
  3200. #ifdef RPC_S_INVALID_BOUND
  3201. case RPC_S_INVALID_BOUND:
  3202. errorname = "RPC_S_INVALID_BOUND";
  3203. errormsg = "The array bounds are invalid.";
  3204. break;
  3205. #endif
  3206. #ifdef RPC_S_NO_ENTRY_NAME
  3207. case RPC_S_NO_ENTRY_NAME:
  3208. errorname = "RPC_S_NO_ENTRY_NAME";
  3209. errormsg = "The binding does not contain an entry name.";
  3210. break;
  3211. #endif
  3212. #ifdef RPC_S_INVALID_NAME_SYNTAX
  3213. case RPC_S_INVALID_NAME_SYNTAX:
  3214. errorname = "RPC_S_INVALID_NAME_SYNTAX";
  3215. errormsg = "The name syntax is invalid.";
  3216. break;
  3217. #endif
  3218. #ifdef RPC_S_UNSUPPORTED_NAME_SYNTAX
  3219. case RPC_S_UNSUPPORTED_NAME_SYNTAX:
  3220. errorname = "RPC_S_UNSUPPORTED_NAME_SYNTAX";
  3221. errormsg = "The name syntax is not supported.";
  3222. break;
  3223. #endif
  3224. #ifdef RPC_S_UUID_NO_ADDRESS
  3225. case RPC_S_UUID_NO_ADDRESS:
  3226. errorname = "RPC_S_UUID_NO_ADDRESS";
  3227. errormsg = "No network address is available to use to construct a universal unique identifier (UUID).";
  3228. break;
  3229. #endif
  3230. #ifdef RPC_S_DUPLICATE_ENDPOINT
  3231. case RPC_S_DUPLICATE_ENDPOINT:
  3232. errorname = "RPC_S_DUPLICATE_ENDPOINT";
  3233. errormsg = "The endpoint is a duplicate.";
  3234. break;
  3235. #endif
  3236. #ifdef RPC_S_UNKNOWN_AUTHN_TYPE
  3237. case RPC_S_UNKNOWN_AUTHN_TYPE:
  3238. errorname = "RPC_S_UNKNOWN_AUTHN_TYPE";
  3239. errormsg = "The authentication type is unknown.";
  3240. break;
  3241. #endif
  3242. #ifdef RPC_S_MAX_CALLS_TOO_SMALL
  3243. case RPC_S_MAX_CALLS_TOO_SMALL:
  3244. errorname = "RPC_S_MAX_CALLS_TOO_SMALL";
  3245. errormsg = "The maximum number of calls is too small.";
  3246. break;
  3247. #endif
  3248. #ifdef RPC_S_STRING_TOO_LONG
  3249. case RPC_S_STRING_TOO_LONG:
  3250. errorname = "RPC_S_STRING_TOO_LONG";
  3251. errormsg = "The string is too long.";
  3252. break;
  3253. #endif
  3254. #ifdef RPC_S_PROTSEQ_NOT_FOUND
  3255. case RPC_S_PROTSEQ_NOT_FOUND:
  3256. errorname = "RPC_S_PROTSEQ_NOT_FOUND";
  3257. errormsg = "The RPC protocol sequence was not found.";
  3258. break;
  3259. #endif
  3260. #ifdef RPC_S_PROCNUM_OUT_OF_RANGE
  3261. case RPC_S_PROCNUM_OUT_OF_RANGE:
  3262. errorname = "RPC_S_PROCNUM_OUT_OF_RANGE";
  3263. errormsg = "The procedure number is out of range.";
  3264. break;
  3265. #endif
  3266. #ifdef RPC_S_BINDING_HAS_NO_AUTH
  3267. case RPC_S_BINDING_HAS_NO_AUTH:
  3268. errorname = "RPC_S_BINDING_HAS_NO_AUTH";
  3269. errormsg = "The binding does not contain any authentication information.";
  3270. break;
  3271. #endif
  3272. #ifdef RPC_S_UNKNOWN_AUTHN_SERVICE
  3273. case RPC_S_UNKNOWN_AUTHN_SERVICE:
  3274. errorname = "RPC_S_UNKNOWN_AUTHN_SERVICE";
  3275. errormsg = "The authentication service is unknown.";
  3276. break;
  3277. #endif
  3278. #ifdef RPC_S_UNKNOWN_AUTHN_LEVEL
  3279. case RPC_S_UNKNOWN_AUTHN_LEVEL:
  3280. errorname = "RPC_S_UNKNOWN_AUTHN_LEVEL";
  3281. errormsg = "The authentication level is unknown.";
  3282. break;
  3283. #endif
  3284. #ifdef RPC_S_INVALID_AUTH_IDENTITY
  3285. case RPC_S_INVALID_AUTH_IDENTITY:
  3286. errorname = "RPC_S_INVALID_AUTH_IDENTITY";
  3287. errormsg = "The security context is invalid.";
  3288. break;
  3289. #endif
  3290. #ifdef RPC_S_UNKNOWN_AUTHZ_SERVICE
  3291. case RPC_S_UNKNOWN_AUTHZ_SERVICE:
  3292. errorname = "RPC_S_UNKNOWN_AUTHZ_SERVICE";
  3293. errormsg = "The authorization service is unknown.";
  3294. break;
  3295. #endif
  3296. #ifdef EPT_S_INVALID_ENTRY
  3297. case EPT_S_INVALID_ENTRY:
  3298. errorname = "EPT_S_INVALID_ENTRY";
  3299. errormsg = "The entry is invalid.";
  3300. break;
  3301. #endif
  3302. #ifdef EPT_S_CANT_PERFORM_OP
  3303. case EPT_S_CANT_PERFORM_OP:
  3304. errorname = "EPT_S_CANT_PERFORM_OP";
  3305. errormsg = "The server endpoint cannot perform the operation.";
  3306. break;
  3307. #endif
  3308. #ifdef EPT_S_NOT_REGISTERED
  3309. case EPT_S_NOT_REGISTERED:
  3310. errorname = "EPT_S_NOT_REGISTERED";
  3311. errormsg = "There are no more endpoints available from the endpoint mapper.";
  3312. break;
  3313. #endif
  3314. #ifdef RPC_S_NOTHING_TO_EXPORT
  3315. case RPC_S_NOTHING_TO_EXPORT:
  3316. errorname = "RPC_S_NOTHING_TO_EXPORT";
  3317. errormsg = "No interfaces have been exported.";
  3318. break;
  3319. #endif
  3320. #ifdef RPC_S_INCOMPLETE_NAME
  3321. case RPC_S_INCOMPLETE_NAME:
  3322. errorname = "RPC_S_INCOMPLETE_NAME";
  3323. errormsg = "The entry name is incomplete.";
  3324. break;
  3325. #endif
  3326. #ifdef RPC_S_INVALID_VERS_OPTION
  3327. case RPC_S_INVALID_VERS_OPTION:
  3328. errorname = "RPC_S_INVALID_VERS_OPTION";
  3329. errormsg = "The version option is invalid.";
  3330. break;
  3331. #endif
  3332. #ifdef RPC_S_NO_MORE_MEMBERS
  3333. case RPC_S_NO_MORE_MEMBERS:
  3334. errorname = "RPC_S_NO_MORE_MEMBERS";
  3335. errormsg = "There are no more members.";
  3336. break;
  3337. #endif
  3338. #ifdef RPC_S_NOT_ALL_OBJS_UNEXPORTED
  3339. case RPC_S_NOT_ALL_OBJS_UNEXPORTED:
  3340. errorname = "RPC_S_NOT_ALL_OBJS_UNEXPORTED";
  3341. errormsg = "There is nothing to unexport.";
  3342. break;
  3343. #endif
  3344. #ifdef RPC_S_INTERFACE_NOT_FOUND
  3345. case RPC_S_INTERFACE_NOT_FOUND:
  3346. errorname = "RPC_S_INTERFACE_NOT_FOUND";
  3347. errormsg = "The interface was not found.";
  3348. break;
  3349. #endif
  3350. #ifdef RPC_S_ENTRY_ALREADY_EXISTS
  3351. case RPC_S_ENTRY_ALREADY_EXISTS:
  3352. errorname = "RPC_S_ENTRY_ALREADY_EXISTS";
  3353. errormsg = "The entry already exists.";
  3354. break;
  3355. #endif
  3356. #ifdef RPC_S_ENTRY_NOT_FOUND
  3357. case RPC_S_ENTRY_NOT_FOUND:
  3358. errorname = "RPC_S_ENTRY_NOT_FOUND";
  3359. errormsg = "The entry is not found.";
  3360. break;
  3361. #endif
  3362. #ifdef RPC_S_NAME_SERVICE_UNAVAILABLE
  3363. case RPC_S_NAME_SERVICE_UNAVAILABLE:
  3364. errorname = "RPC_S_NAME_SERVICE_UNAVAILABLE";
  3365. errormsg = "The name service is unavailable.";
  3366. break;
  3367. #endif
  3368. #ifdef RPC_S_INVALID_NAF_ID
  3369. case RPC_S_INVALID_NAF_ID:
  3370. errorname = "RPC_S_INVALID_NAF_ID";
  3371. errormsg = "The network address family is invalid.";
  3372. break;
  3373. #endif
  3374. #ifdef RPC_S_CANNOT_SUPPORT
  3375. case RPC_S_CANNOT_SUPPORT:
  3376. errorname = "RPC_S_CANNOT_SUPPORT";
  3377. errormsg = "The requested operation is not supported.";
  3378. break;
  3379. #endif
  3380. #ifdef RPC_S_NO_CONTEXT_AVAILABLE
  3381. case RPC_S_NO_CONTEXT_AVAILABLE:
  3382. errorname = "RPC_S_NO_CONTEXT_AVAILABLE";
  3383. errormsg = "No security context is available to allow impersonation.";
  3384. break;
  3385. #endif
  3386. #ifdef RPC_S_INTERNAL_ERROR
  3387. case RPC_S_INTERNAL_ERROR:
  3388. errorname = "RPC_S_INTERNAL_ERROR";
  3389. errormsg = "An internal error occurred in a remote procedure call (RPC).";
  3390. break;
  3391. #endif
  3392. #ifdef RPC_S_ZERO_DIVIDE
  3393. case RPC_S_ZERO_DIVIDE:
  3394. errorname = "RPC_S_ZERO_DIVIDE";
  3395. errormsg = "The RPC server attempted an integer division by zero.";
  3396. break;
  3397. #endif
  3398. #ifdef RPC_S_ADDRESS_ERROR
  3399. case RPC_S_ADDRESS_ERROR:
  3400. errorname = "RPC_S_ADDRESS_ERROR";
  3401. errormsg = "An addressing error occurred in the RPC server.";
  3402. break;
  3403. #endif
  3404. #ifdef RPC_S_FP_DIV_ZERO
  3405. case RPC_S_FP_DIV_ZERO:
  3406. errorname = "RPC_S_FP_DIV_ZERO";
  3407. errormsg = "A floating-point operation at the RPC server caused a division by zero.";
  3408. break;
  3409. #endif
  3410. #ifdef RPC_S_FP_UNDERFLOW
  3411. case RPC_S_FP_UNDERFLOW:
  3412. errorname = "RPC_S_FP_UNDERFLOW";
  3413. errormsg = "A floating-point underflow occurred at the RPC server.";
  3414. break;
  3415. #endif
  3416. #ifdef RPC_S_FP_OVERFLOW
  3417. case RPC_S_FP_OVERFLOW:
  3418. errorname = "RPC_S_FP_OVERFLOW";
  3419. errormsg = "A floating-point overflow occurred at the RPC server.";
  3420. break;
  3421. #endif
  3422. #ifdef RPC_X_NO_MORE_ENTRIES
  3423. case RPC_X_NO_MORE_ENTRIES:
  3424. errorname = "RPC_X_NO_MORE_ENTRIES";
  3425. errormsg = "The list of RPC servers available for the binding of auto handles has been exhausted.";
  3426. break;
  3427. #endif
  3428. #ifdef RPC_X_SS_CHAR_TRANS_OPEN_FAIL
  3429. case RPC_X_SS_CHAR_TRANS_OPEN_FAIL:
  3430. errorname = "RPC_X_SS_CHAR_TRANS_OPEN_FAIL";
  3431. errormsg = "Unable to open the character translation table file.";
  3432. break;
  3433. #endif
  3434. #ifdef RPC_X_SS_CHAR_TRANS_SHORT_FILE
  3435. case RPC_X_SS_CHAR_TRANS_SHORT_FILE:
  3436. errorname = "RPC_X_SS_CHAR_TRANS_SHORT_FILE";
  3437. errormsg = "The file containing the character translation table has fewer than 512 bytes.";
  3438. break;
  3439. #endif
  3440. #ifdef RPC_X_SS_IN_NULL_CONTEXT
  3441. case RPC_X_SS_IN_NULL_CONTEXT:
  3442. errorname = "RPC_X_SS_IN_NULL_CONTEXT";
  3443. errormsg = "A null context handle was passed from the client to the host during a remote procedure call.";
  3444. break;
  3445. #endif
  3446. #ifdef RPC_X_SS_CONTEXT_DAMAGED
  3447. case RPC_X_SS_CONTEXT_DAMAGED:
  3448. errorname = "RPC_X_SS_CONTEXT_DAMAGED";
  3449. errormsg = "The context handle changed during a remote procedure call.";
  3450. break;
  3451. #endif
  3452. #ifdef RPC_X_SS_HANDLES_MISMATCH
  3453. case RPC_X_SS_HANDLES_MISMATCH:
  3454. errorname = "RPC_X_SS_HANDLES_MISMATCH";
  3455. errormsg = "The binding handles passed to a remote procedure call do not match.";
  3456. break;
  3457. #endif
  3458. #ifdef RPC_X_SS_CANNOT_GET_CALL_HANDLE
  3459. case RPC_X_SS_CANNOT_GET_CALL_HANDLE:
  3460. errorname = "RPC_X_SS_CANNOT_GET_CALL_HANDLE";
  3461. errormsg = "The stub is unable to get the remote procedure call handle.";
  3462. break;
  3463. #endif
  3464. #ifdef RPC_X_NULL_REF_POINTER
  3465. case RPC_X_NULL_REF_POINTER:
  3466. errorname = "RPC_X_NULL_REF_POINTER";
  3467. errormsg = "A null reference pointer was passed to the stub.";
  3468. break;
  3469. #endif
  3470. #ifdef RPC_X_ENUM_VALUE_OUT_OF_RANGE
  3471. case RPC_X_ENUM_VALUE_OUT_OF_RANGE:
  3472. errorname = "RPC_X_ENUM_VALUE_OUT_OF_RANGE";
  3473. errormsg = "The enumeration value is out of range.";
  3474. break;
  3475. #endif
  3476. #ifdef RPC_X_BYTE_COUNT_TOO_SMALL
  3477. case RPC_X_BYTE_COUNT_TOO_SMALL:
  3478. errorname = "RPC_X_BYTE_COUNT_TOO_SMALL";
  3479. errormsg = "The byte count is too small.";
  3480. break;
  3481. #endif
  3482. #ifdef RPC_X_BAD_STUB_DATA
  3483. case RPC_X_BAD_STUB_DATA:
  3484. errorname = "RPC_X_BAD_STUB_DATA";
  3485. errormsg = "The stub received bad data.";
  3486. break;
  3487. #endif
  3488. #ifdef ERROR_INVALID_USER_BUFFER
  3489. case ERROR_INVALID_USER_BUFFER:
  3490. errorname = "ERROR_INVALID_USER_BUFFER";
  3491. errormsg = "The supplied user buffer is not valid for the requested operation.";
  3492. break;
  3493. #endif
  3494. #ifdef ERROR_UNRECOGNIZED_MEDIA
  3495. case ERROR_UNRECOGNIZED_MEDIA:
  3496. errorname = "ERROR_UNRECOGNIZED_MEDIA";
  3497. errormsg = "The disk media is not recognized. It may not be formatted.";
  3498. break;
  3499. #endif
  3500. #ifdef ERROR_NO_TRUST_LSA_SECRET
  3501. case ERROR_NO_TRUST_LSA_SECRET:
  3502. errorname = "ERROR_NO_TRUST_LSA_SECRET";
  3503. errormsg = "The workstation does not have a trust secret.";
  3504. break;
  3505. #endif
  3506. #ifdef ERROR_NO_TRUST_SAM_ACCOUNT
  3507. case ERROR_NO_TRUST_SAM_ACCOUNT:
  3508. errorname = "ERROR_NO_TRUST_SAM_ACCOUNT";
  3509. errormsg = "The SAM database on the Windows NT Server does not have a computer account for this workstation trust relationship.";
  3510. break;
  3511. #endif
  3512. #ifdef ERROR_TRUSTED_DOMAIN_FAILURE
  3513. case ERROR_TRUSTED_DOMAIN_FAILURE:
  3514. errorname = "ERROR_TRUSTED_DOMAIN_FAILURE";
  3515. errormsg = "The trust relationship between the primary domain and the trusted domain failed.";
  3516. break;
  3517. #endif
  3518. #ifdef ERROR_TRUSTED_RELATIONSHIP_FAILURE
  3519. case ERROR_TRUSTED_RELATIONSHIP_FAILURE:
  3520. errorname = "ERROR_TRUSTED_RELATIONSHIP_FAILURE";
  3521. errormsg = "The trust relationship between this workstation and the primary domain failed.";
  3522. break;
  3523. #endif
  3524. #ifdef ERROR_TRUST_FAILURE
  3525. case ERROR_TRUST_FAILURE:
  3526. errorname = "ERROR_TRUST_FAILURE";
  3527. errormsg = "The network logon failed.";
  3528. break;
  3529. #endif
  3530. #ifdef RPC_S_CALL_IN_PROGRESS
  3531. case RPC_S_CALL_IN_PROGRESS:
  3532. errorname = "RPC_S_CALL_IN_PROGRESS";
  3533. errormsg = "A remote procedure call is already in progress for this thread.";
  3534. break;
  3535. #endif
  3536. #ifdef ERROR_NETLOGON_NOT_STARTED
  3537. case ERROR_NETLOGON_NOT_STARTED:
  3538. errorname = "ERROR_NETLOGON_NOT_STARTED";
  3539. errormsg = "An attempt was made to logon, but the network logon service was not started.";
  3540. break;
  3541. #endif
  3542. #ifdef ERROR_ACCOUNT_EXPIRED
  3543. case ERROR_ACCOUNT_EXPIRED:
  3544. errorname = "ERROR_ACCOUNT_EXPIRED";
  3545. errormsg = "The user's account has expired.";
  3546. break;
  3547. #endif
  3548. #ifdef ERROR_REDIRECTOR_HAS_OPEN_HANDLES
  3549. case ERROR_REDIRECTOR_HAS_OPEN_HANDLES:
  3550. errorname = "ERROR_REDIRECTOR_HAS_OPEN_HANDLES";
  3551. errormsg = "The redirector is in use and cannot be unloaded.";
  3552. break;
  3553. #endif
  3554. #ifdef ERROR_PRINTER_DRIVER_ALREADY_INSTALLED
  3555. case ERROR_PRINTER_DRIVER_ALREADY_INSTALLED:
  3556. errorname = "ERROR_PRINTER_DRIVER_ALREADY_INSTALLED";
  3557. errormsg = "The specified printer driver is already installed.";
  3558. break;
  3559. #endif
  3560. #ifdef ERROR_UNKNOWN_PORT
  3561. case ERROR_UNKNOWN_PORT:
  3562. errorname = "ERROR_UNKNOWN_PORT";
  3563. errormsg = "The specified port is unknown.";
  3564. break;
  3565. #endif
  3566. #ifdef ERROR_UNKNOWN_PRINTER_DRIVER
  3567. case ERROR_UNKNOWN_PRINTER_DRIVER:
  3568. errorname = "ERROR_UNKNOWN_PRINTER_DRIVER";
  3569. errormsg = "The printer driver is unknown.";
  3570. break;
  3571. #endif
  3572. #ifdef ERROR_UNKNOWN_PRINTPROCESSOR
  3573. case ERROR_UNKNOWN_PRINTPROCESSOR:
  3574. errorname = "ERROR_UNKNOWN_PRINTPROCESSOR";
  3575. errormsg = "The print processor is unknown.";
  3576. break;
  3577. #endif
  3578. #ifdef ERROR_INVALID_SEPARATOR_FILE
  3579. case ERROR_INVALID_SEPARATOR_FILE:
  3580. errorname = "ERROR_INVALID_SEPARATOR_FILE";
  3581. errormsg = "The specified separator file is invalid.";
  3582. break;
  3583. #endif
  3584. #ifdef ERROR_INVALID_PRIORITY
  3585. case ERROR_INVALID_PRIORITY:
  3586. errorname = "ERROR_INVALID_PRIORITY";
  3587. errormsg = "The specified priority is invalid.";
  3588. break;
  3589. #endif
  3590. #ifdef ERROR_INVALID_PRINTER_NAME
  3591. case ERROR_INVALID_PRINTER_NAME:
  3592. errorname = "ERROR_INVALID_PRINTER_NAME";
  3593. errormsg = "The printer name is invalid.";
  3594. break;
  3595. #endif
  3596. #ifdef ERROR_PRINTER_ALREADY_EXISTS
  3597. case ERROR_PRINTER_ALREADY_EXISTS:
  3598. errorname = "ERROR_PRINTER_ALREADY_EXISTS";
  3599. errormsg = "The printer already exists.";
  3600. break;
  3601. #endif
  3602. #ifdef ERROR_INVALID_PRINTER_COMMAND
  3603. case ERROR_INVALID_PRINTER_COMMAND:
  3604. errorname = "ERROR_INVALID_PRINTER_COMMAND";
  3605. errormsg = "The printer command is invalid.";
  3606. break;
  3607. #endif
  3608. #ifdef ERROR_INVALID_DATATYPE
  3609. case ERROR_INVALID_DATATYPE:
  3610. errorname = "ERROR_INVALID_DATATYPE";
  3611. errormsg = "The specified datatype is invalid.";
  3612. break;
  3613. #endif
  3614. #ifdef ERROR_INVALID_ENVIRONMENT
  3615. case ERROR_INVALID_ENVIRONMENT:
  3616. errorname = "ERROR_INVALID_ENVIRONMENT";
  3617. errormsg = "The Environment specified is invalid.";
  3618. break;
  3619. #endif
  3620. #ifdef RPC_S_NO_MORE_BINDINGS
  3621. case RPC_S_NO_MORE_BINDINGS:
  3622. errorname = "RPC_S_NO_MORE_BINDINGS";
  3623. errormsg = "There are no more bindings.";
  3624. break;
  3625. #endif
  3626. #ifdef ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT
  3627. case ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT:
  3628. errorname = "ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT";
  3629. errormsg = "The account used is an interdomain trust account. Use your global user account or local user account to access this server.";
  3630. break;
  3631. #endif
  3632. #ifdef ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT
  3633. case ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT:
  3634. errorname = "ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT";
  3635. errormsg = "The account used is a Computer Account. Use your global user account or local user account to access this server.";
  3636. break;
  3637. #endif
  3638. #ifdef ERROR_NOLOGON_SERVER_TRUST_ACCOUNT
  3639. case ERROR_NOLOGON_SERVER_TRUST_ACCOUNT:
  3640. errorname = "ERROR_NOLOGON_SERVER_TRUST_ACCOUNT";
  3641. errormsg = "The account used is an server trust account. Use your global user account or local user account to access this server.";
  3642. break;
  3643. #endif
  3644. #ifdef ERROR_DOMAIN_TRUST_INCONSISTENT
  3645. case ERROR_DOMAIN_TRUST_INCONSISTENT:
  3646. errorname = "ERROR_DOMAIN_TRUST_INCONSISTENT";
  3647. errormsg = "The name or security ID (SID) of the domain specified is inconsistent with the trust information for that domain.";
  3648. break;
  3649. #endif
  3650. #ifdef ERROR_SERVER_HAS_OPEN_HANDLES
  3651. case ERROR_SERVER_HAS_OPEN_HANDLES:
  3652. errorname = "ERROR_SERVER_HAS_OPEN_HANDLES";
  3653. errormsg = "The server is in use and cannot be unloaded.";
  3654. break;
  3655. #endif
  3656. #ifdef ERROR_RESOURCE_DATA_NOT_FOUND
  3657. case ERROR_RESOURCE_DATA_NOT_FOUND:
  3658. errorname = "ERROR_RESOURCE_DATA_NOT_FOUND";
  3659. errormsg = "The specified image file did not contain a resource section.";
  3660. break;
  3661. #endif
  3662. #ifdef ERROR_RESOURCE_TYPE_NOT_FOUND
  3663. case ERROR_RESOURCE_TYPE_NOT_FOUND:
  3664. errorname = "ERROR_RESOURCE_TYPE_NOT_FOUND";
  3665. errormsg = "The specified resource type can not be found in the image file.";
  3666. break;
  3667. #endif
  3668. #ifdef ERROR_RESOURCE_NAME_NOT_FOUND
  3669. case ERROR_RESOURCE_NAME_NOT_FOUND:
  3670. errorname = "ERROR_RESOURCE_NAME_NOT_FOUND";
  3671. errormsg = "The specified resource name can not be found in the image file.";
  3672. break;
  3673. #endif
  3674. #ifdef ERROR_RESOURCE_LANG_NOT_FOUND
  3675. case ERROR_RESOURCE_LANG_NOT_FOUND:
  3676. errorname = "ERROR_RESOURCE_LANG_NOT_FOUND";
  3677. errormsg = "The specified resource language ID cannot be found in the image file.";
  3678. break;
  3679. #endif
  3680. #ifdef ERROR_NOT_ENOUGH_QUOTA
  3681. case ERROR_NOT_ENOUGH_QUOTA:
  3682. errorname = "ERROR_NOT_ENOUGH_QUOTA";
  3683. errormsg = "Not enough quota is available to process this command.";
  3684. break;
  3685. #endif
  3686. #ifdef RPC_S_NO_INTERFACES
  3687. case RPC_S_NO_INTERFACES:
  3688. errorname = "RPC_S_NO_INTERFACES";
  3689. errormsg = "No interfaces have been registered.";
  3690. break;
  3691. #endif
  3692. #ifdef RPC_S_CALL_CANCELLED
  3693. case RPC_S_CALL_CANCELLED:
  3694. errorname = "RPC_S_CALL_CANCELLED";
  3695. errormsg = "The server was altered while processing this call.";
  3696. break;
  3697. #endif
  3698. #ifdef RPC_S_BINDING_INCOMPLETE
  3699. case RPC_S_BINDING_INCOMPLETE:
  3700. errorname = "RPC_S_BINDING_INCOMPLETE";
  3701. errormsg = "The binding handle does not contain all required information.";
  3702. break;
  3703. #endif
  3704. #ifdef RPC_S_COMM_FAILURE
  3705. case RPC_S_COMM_FAILURE:
  3706. errorname = "RPC_S_COMM_FAILURE";
  3707. errormsg = "Communications failure.";
  3708. break;
  3709. #endif
  3710. #ifdef RPC_S_UNSUPPORTED_AUTHN_LEVEL
  3711. case RPC_S_UNSUPPORTED_AUTHN_LEVEL:
  3712. errorname = "RPC_S_UNSUPPORTED_AUTHN_LEVEL";
  3713. errormsg = "The requested authentication level is not supported.";
  3714. break;
  3715. #endif
  3716. #ifdef RPC_S_NO_PRINC_NAME
  3717. case RPC_S_NO_PRINC_NAME:
  3718. errorname = "RPC_S_NO_PRINC_NAME";
  3719. errormsg = "No principal name registered.";
  3720. break;
  3721. #endif
  3722. #ifdef RPC_S_NOT_RPC_ERROR
  3723. case RPC_S_NOT_RPC_ERROR:
  3724. errorname = "RPC_S_NOT_RPC_ERROR";
  3725. errormsg = "The error specified is not a valid Windows RPC error code.";
  3726. break;
  3727. #endif
  3728. #ifdef RPC_S_UUID_LOCAL_ONLY
  3729. case RPC_S_UUID_LOCAL_ONLY:
  3730. errorname = "RPC_S_UUID_LOCAL_ONLY";
  3731. errormsg = "A UUID that is valid only on this computer has been allocated.";
  3732. break;
  3733. #endif
  3734. #ifdef RPC_S_SEC_PKG_ERROR
  3735. case RPC_S_SEC_PKG_ERROR:
  3736. errorname = "RPC_S_SEC_PKG_ERROR";
  3737. errormsg = "A security package specific error occurred.";
  3738. break;
  3739. #endif
  3740. #ifdef RPC_S_NOT_CANCELLED
  3741. case RPC_S_NOT_CANCELLED:
  3742. errorname = "RPC_S_NOT_CANCELLED";
  3743. errormsg = "Thread is not cancelled.";
  3744. break;
  3745. #endif
  3746. #ifdef RPC_X_INVALID_ES_ACTION
  3747. case RPC_X_INVALID_ES_ACTION:
  3748. errorname = "RPC_X_INVALID_ES_ACTION";
  3749. errormsg = "Invalid operation on the encoding/decoding handle.";
  3750. break;
  3751. #endif
  3752. #ifdef RPC_X_WRONG_ES_VERSION
  3753. case RPC_X_WRONG_ES_VERSION:
  3754. errorname = "RPC_X_WRONG_ES_VERSION";
  3755. errormsg = "Incompatible version of the serializing package.";
  3756. break;
  3757. #endif
  3758. #ifdef RPC_X_WRONG_STUB_VERSION
  3759. case RPC_X_WRONG_STUB_VERSION:
  3760. errorname = "RPC_X_WRONG_STUB_VERSION";
  3761. errormsg = "Incompatible version of the RPC stub.";
  3762. break;
  3763. #endif
  3764. #ifdef RPC_S_GROUP_MEMBER_NOT_FOUND
  3765. case RPC_S_GROUP_MEMBER_NOT_FOUND:
  3766. errorname = "RPC_S_GROUP_MEMBER_NOT_FOUND";
  3767. errormsg = "The group member was not found.";
  3768. break;
  3769. #endif
  3770. #ifdef EPT_S_CANT_CREATE
  3771. case EPT_S_CANT_CREATE:
  3772. errorname = "EPT_S_CANT_CREATE";
  3773. errormsg = "The endpoint mapper database could not be created.";
  3774. break;
  3775. #endif
  3776. #ifdef RPC_S_INVALID_OBJECT
  3777. case RPC_S_INVALID_OBJECT:
  3778. errorname = "RPC_S_INVALID_OBJECT";
  3779. errormsg = "The object universal unique identifier (UUID) is the nil UUID.";
  3780. break;
  3781. #endif
  3782. #ifdef ERROR_INVALID_TIME
  3783. case ERROR_INVALID_TIME:
  3784. errorname = "ERROR_INVALID_TIME";
  3785. errormsg = "The specified time is invalid.";
  3786. break;
  3787. #endif
  3788. #ifdef ERROR_INVALID_FORM_NAME
  3789. case ERROR_INVALID_FORM_NAME:
  3790. errorname = "ERROR_INVALID_FORM_NAME";
  3791. errormsg = "The specified Form name is invalid.";
  3792. break;
  3793. #endif
  3794. #ifdef ERROR_INVALID_FORM_SIZE
  3795. case ERROR_INVALID_FORM_SIZE:
  3796. errorname = "ERROR_INVALID_FORM_SIZE";
  3797. errormsg = "The specified Form size is invalid.";
  3798. break;
  3799. #endif
  3800. #ifdef ERROR_ALREADY_WAITING
  3801. case ERROR_ALREADY_WAITING:
  3802. errorname = "ERROR_ALREADY_WAITING";
  3803. errormsg = "The specified Printer handle is already being waited on.";
  3804. break;
  3805. #endif
  3806. #ifdef ERROR_PRINTER_DELETED
  3807. case ERROR_PRINTER_DELETED:
  3808. errorname = "ERROR_PRINTER_DELETED";
  3809. errormsg = "The specified Printer has been deleted.";
  3810. break;
  3811. #endif
  3812. #ifdef ERROR_INVALID_PRINTER_STATE
  3813. case ERROR_INVALID_PRINTER_STATE:
  3814. errorname = "ERROR_INVALID_PRINTER_STATE";
  3815. errormsg = "The state of the Printer is invalid.";
  3816. break;
  3817. #endif
  3818. #ifdef ERROR_PASSWORD_MUST_CHANGE
  3819. case ERROR_PASSWORD_MUST_CHANGE:
  3820. errorname = "ERROR_PASSWORD_MUST_CHANGE";
  3821. errormsg = "The user must change his password before he logs on the first time.";
  3822. break;
  3823. #endif
  3824. #ifdef ERROR_DOMAIN_CONTROLLER_NOT_FOUND
  3825. case ERROR_DOMAIN_CONTROLLER_NOT_FOUND:
  3826. errorname = "ERROR_DOMAIN_CONTROLLER_NOT_FOUND";
  3827. errormsg = "Could not find the domain controller for this domain.";
  3828. break;
  3829. #endif
  3830. #ifdef ERROR_ACCOUNT_LOCKED_OUT
  3831. case ERROR_ACCOUNT_LOCKED_OUT:
  3832. errorname = "ERROR_ACCOUNT_LOCKED_OUT";
  3833. errormsg = "The referenced account is currently locked out and may not be logged on to.";
  3834. break;
  3835. #endif
  3836. #ifdef ERROR_NO_BROWSER_SERVERS_FOUND
  3837. case ERROR_NO_BROWSER_SERVERS_FOUND:
  3838. errorname = "ERROR_NO_BROWSER_SERVERS_FOUND";
  3839. errormsg = "The list of servers for this workgroup is not currently available.";
  3840. break;
  3841. #endif
  3842. default:
  3843. {
  3844. var char* buf = (char*)alloca();
  3845. begin_system_call();
  3846. if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, errcode, , buf, , NULL))
  3847. errormsg = buf;
  3848. end_system_call();
  3849. }
  3850. break;
  3851. }
  3852. func(errorname,errormsg);
  3853. }
  3854.  
  3855. # Behandlung von Win32-Fehlern
  3856. # OS_error();
  3857. # > GetLastError(): Fehlercode
  3858. nonreturning_function(global, OS_error, (void));
  3859. nonreturning_function(global, OS_file_error, (object pathname));
  3860. local void OS_error_internal (DWORD errcode);
  3861. local void OS_error_internal_body (const char* name, const char* msg);
  3862. local void OS_error_internal_body(name,msg)
  3863. var const char* name;
  3864. var const char* msg;
  3865. {
  3866. if (!(name == NULL)) { # bekannter Name?
  3867. write_errorasciz(" (");
  3868. write_errorasciz(name);
  3869. write_errorasciz(")");
  3870. }
  3871. if (!(msg == NULL)) { # Meldung vorhanden?
  3872. write_errorasciz(": ");
  3873. write_errorasciz(msg);
  3874. }
  3875. }
  3876. local void OS_error_internal(errcode)
  3877. var DWORD errcode;
  3878. {
  3879. # Meldungbeginn ausgeben:
  3880. write_errorstring(GETTEXT("Win32 error "));
  3881. # Fehlernummer ausgeben:
  3882. write_errorobject(UL_to_I(errcode));
  3883. # nach Möglichkeit noch ausführlicher:
  3884. get_OS_error_info(errcode,&OS_error_internal_body);
  3885. }
  3886. nonreturning_function(global, OS_error, (void))
  3887. {
  3888. var DWORD errcode;
  3889. end_system_call(); # just in case
  3890. begin_system_call();
  3891. errcode = GetLastError();
  3892. end_system_call();
  3893. clr_break_sem_4(); # keine Win32-Operation mehr aktiv
  3894. begin_error(); # Fehlermeldung anfangen
  3895. if (!nullp(STACK_3)) # *ERROR-HANDLER* = NIL, SYS::*USE-CLCS* /= NIL ?
  3896. STACK_3 = S(simple_os_error);
  3897. OS_error_internal(errcode);
  3898. end_error(args_end_pointer STACKop ); # Fehlermeldung beenden
  3899. }
  3900. nonreturning_function(global, OS_file_error, (object pathname))
  3901. {
  3902. var DWORD errcode;
  3903. begin_system_call();
  3904. errcode = GetLastError();
  3905. end_system_call();
  3906. clr_break_sem_4(); # keine Win32-Operation mehr aktiv
  3907. pushSTACK(pathname); # Wert von PATHNAME für FILE-ERROR
  3908. begin_error(); # Fehlermeldung anfangen
  3909. if (!nullp(STACK_3)) # *ERROR-HANDLER* = NIL, SYS::*USE-CLCS* /= NIL ?
  3910. STACK_3 = S(simple_file_error);
  3911. OS_error_internal(errcode);
  3912. end_error(args_end_pointer STACKop ); # Fehlermeldung beenden
  3913. }
  3914.  
  3915. # Behandlung von Winsock-Fehlern
  3916. # SOCK_error();
  3917. # > WSAGetLastError(): Fehlercode
  3918. nonreturning_function(global, SOCK_error, (void))
  3919. {
  3920. var int errcode = WSAGetLastError();
  3921. end_system_call();
  3922. clr_break_sem_4(); # keine Win32-Operation mehr aktiv
  3923. begin_error(); # Fehlermeldung anfangen
  3924. if (!nullp(STACK_3)) # *ERROR-HANDLER* = NIL, SYS::*USE-CLCS* /= NIL ?
  3925. STACK_3 = S(simple_os_error);
  3926. # Meldungbeginn ausgeben:
  3927. write_errorstring(GETTEXT("Winsock error "));
  3928. # Fehlernummer ausgeben:
  3929. write_errorobject(L_to_I(errcode));
  3930. # nach Möglichkeit noch ausführlicher:
  3931. var const char* errorname = NULL;
  3932. var const char* errormsg = NULL;
  3933. switch (errcode) {
  3934. case WSAEINTR:
  3935. errorname = "EINTR";
  3936. errormsg = "Interrupted system call";
  3937. break;
  3938. case WSAEBADF:
  3939. errorname = "EBADF";
  3940. errormsg="Bad file number";
  3941. break;
  3942. case WSAEACCES:
  3943. errorname = "EACCES";
  3944. errormsg="Permission denied";
  3945. break;
  3946. case WSAEFAULT:
  3947. errorname = "EFAULT";
  3948. errormsg="Bad address";
  3949. break;
  3950. case WSAEINVAL:
  3951. errorname = "EINVAL";
  3952. errormsg="Invalid argument";
  3953. break;
  3954. case WSAEMFILE:
  3955. errorname = "EMFILE";
  3956. errormsg="Too many open files";
  3957. break;
  3958.  
  3959. case WSAEWOULDBLOCK:
  3960. errorname = "EWOULDBLOCK";
  3961. errormsg="Operation would block";
  3962. break;
  3963. case WSAEINPROGRESS:
  3964. errorname = "EINPROGRESS";
  3965. errormsg="Operation now in progress";
  3966. break;
  3967. case WSAEALREADY:
  3968. errorname = "EALREADY";
  3969. errormsg="Operation already in progress";
  3970. break;
  3971. case WSAENOTSOCK:
  3972. errorname = "ENOTSOCK";
  3973. errormsg="Socket operation on non-socket";
  3974. break;
  3975. case WSAEDESTADDRREQ:
  3976. errorname = "EDESTADDRREQ";
  3977. errormsg="Destination address required";
  3978. break;
  3979. case WSAEMSGSIZE:
  3980. errorname = "EMSGSIZE";
  3981. errormsg="Message too long";
  3982. break;
  3983. case WSAEPROTOTYPE:
  3984. errorname = "EPROTOTYPE";
  3985. errormsg="Protocol wrong type for socket";
  3986. break;
  3987. case WSAENOPROTOOPT:
  3988. errorname = "ENOPROTOOPT";
  3989. errormsg="Option not supported by protocol";
  3990. break;
  3991. case WSAEPROTONOSUPPORT:
  3992. errorname = "EPROTONOSUPPORT";
  3993. errormsg="Protocol not supported";
  3994. break;
  3995. case WSAESOCKTNOSUPPORT:
  3996. errorname = "ESOCKTNOSUPPORT";
  3997. errormsg="Socket type not supported";
  3998. break;
  3999. case WSAEOPNOTSUPP:
  4000. errorname = "EOPNOTSUPP";
  4001. errormsg="Operation not supported on socket";
  4002. break;
  4003. case WSAEPFNOSUPPORT:
  4004. errorname = "EPFNOSUPPORT";
  4005. errormsg="Protocol family not supported";
  4006. break;
  4007. case WSAEAFNOSUPPORT:
  4008. errorname = "EAFNOSUPPORT";
  4009. errormsg="Address family not supported by protocol family";
  4010. break;
  4011. case WSAEADDRINUSE:
  4012. errorname = "EADDRINUSE";
  4013. errormsg="Address already in use";
  4014. break;
  4015. case WSAEADDRNOTAVAIL:
  4016. errorname = "EADDRNOTAVAIL";
  4017. errormsg="Cannot assign requested address";
  4018. break;
  4019. case WSAENETDOWN:
  4020. errorname = "ENETDOWN";
  4021. errormsg="Network is down";
  4022. break;
  4023. case WSAENETUNREACH:
  4024. errorname = "ENETUNREACH";
  4025. errormsg="Network is unreachable";
  4026. break;
  4027. case WSAENETRESET:
  4028. errorname = "ENETRESET";
  4029. errormsg="Network dropped connection on reset";
  4030. break;
  4031. case WSAECONNABORTED:
  4032. errorname = "ECONNABORTED";
  4033. errormsg="Software caused connection abort";
  4034. break;
  4035. case WSAECONNRESET:
  4036. errorname = "ECONNRESET";
  4037. errormsg="Connection reset by peer";
  4038. break;
  4039. case WSAENOBUFS:
  4040. errorname = "ENOBUFS";
  4041. errormsg="No buffer space available";
  4042. break;
  4043. case WSAEISCONN:
  4044. errorname = "EISCONN";
  4045. errormsg="Socket is already connected";
  4046. break;
  4047. case WSAENOTCONN:
  4048. errorname = "ENOTCONN";
  4049. errormsg="Socket is not connected";
  4050. break;
  4051. case WSAESHUTDOWN:
  4052. errorname = "ESHUTDOWN";
  4053. errormsg="Cannot send after socket shutdown";
  4054. break;
  4055. case WSAETOOMANYREFS:
  4056. errorname = "ETOOMANYREFS";
  4057. errormsg="Too many references: cannot splice";
  4058. break;
  4059. case WSAETIMEDOUT:
  4060. errorname = "ETIMEDOUT";
  4061. errormsg="Connection timed out";
  4062. break;
  4063. case WSAECONNREFUSED:
  4064. errorname = "ECONNREFUSED";
  4065. errormsg="Connection refused";
  4066. break;
  4067. case WSAELOOP:
  4068. errorname = "ELOOP";
  4069. errormsg="Too many levels of symbolic links";
  4070. break;
  4071. case WSAENAMETOOLONG:
  4072. errorname = "ENAMETOOLONG";
  4073. errormsg="File name too long";
  4074. break;
  4075. case WSAEHOSTDOWN:
  4076. errorname = "EHOSTDOWN";
  4077. errormsg="Host is down";
  4078. break;
  4079. case WSAEHOSTUNREACH:
  4080. errorname = "EHOSTUNREACH";
  4081. errormsg="Host is unreachable";
  4082. break;
  4083. case WSAENOTEMPTY:
  4084. errorname = "ENOTEMPTY";
  4085. errormsg="Directory not empty";
  4086. break;
  4087. case WSAEPROCLIM:
  4088. errorname = "EPROCLIM";
  4089. errormsg="Too many processes";
  4090. break;
  4091. case WSAEUSERS:
  4092. errorname = "EUSERS";
  4093. errormsg="Too many users";
  4094. break;
  4095. case WSAEDQUOT:
  4096. errorname = "EDQUOT";
  4097. errormsg="Disk quota exceeded";
  4098. break;
  4099. case WSAESTALE:
  4100. errorname = "ESTALE";
  4101. errormsg="Stale NFS file handle";
  4102. break;
  4103. case WSAEREMOTE:
  4104. errorname = "EREMOTE";
  4105. errormsg="Too many levels of remote in path";
  4106. break;
  4107.  
  4108. case WSAEDISCON:
  4109. errorname = "EDISCON";
  4110. break;
  4111.  
  4112. case WSASYSNOTREADY:
  4113. errorname = "SYSNOTREADY";
  4114. break;
  4115. case WSAVERNOTSUPPORTED:
  4116. errorname = "VERNOTSUPPORTED";
  4117. break;
  4118. case WSANOTINITIALISED:
  4119. errorname = "NOTINITIALISED";
  4120. break;
  4121.  
  4122. default:
  4123. break;
  4124. }
  4125. if (!(errorname == NULL)) { # bekannter Name?
  4126. write_errorasciz(" (");
  4127. write_errorasciz(errorname);
  4128. write_errorasciz(")");
  4129. }
  4130. if (!(errormsg == NULL)) { # Meldung vorhanden?
  4131. write_errorasciz(": ");
  4132. write_errorasciz(errormsg);
  4133. }
  4134. end_error(args_end_pointer STACKop ); # Fehlermeldung beenden
  4135. }
  4136.  
  4137. # Ausgabe eines Fehlers, direkt übers Betriebssystem
  4138. # errno_out(errorcode);
  4139. # > DWORD errorcode: Fehlercode
  4140. global void errno_out (DWORD errorcode);
  4141. local void errno_out_body (const char* name, const char* msg);
  4142. local void errno_out_body(name,msg)
  4143. var const char* name;
  4144. var const char* msg;
  4145. {
  4146. if (!(name == NULL)) {
  4147. asciz_out_s(" (%s)",name);
  4148. }
  4149. if (!(msg == NULL)) {
  4150. asciz_out_s(": %s",msg);
  4151. } else {
  4152. asciz_out(".");
  4153. }
  4154. }
  4155. global void errno_out(errorcode)
  4156. var DWORD errorcode;
  4157. {
  4158. asciz_out(" GetLastError() = 0x"); hex_out(errorcode);
  4159. get_OS_error_info(errorcode,&errno_out_body);
  4160. asciz_out(NLstring);
  4161. }

Win32 error code message的更多相关文章

  1. HM NIS Edit 2.0.3 Win32 Error. Code:740.请求的操作需要提升

    使用NSIS安装向导,生成脚本后,按F9后,居然提示:HM NIS Edit 2.0.3 Win32 Error. Code:740.请求的操作需要提升 一开始就出错了,还真不顺. 在网上搜索了一下, ...

  2. Win32 Error Code COM Error Code NTSTATUS的区别、转换

    这三种码其实都是Windows系统错误码,只是对应不同API和使用场景.它们既有区别,又相互有联系. 一.区别和联系 都是32位值 Win32 Error Code和NTSTATUS位域组成相同,但W ...

  3. Win32 Error

    一.Win32错误 也就是Win32子系统产生的错误.当我们在自己的代码里调用Windows系统的API函数,系统执行API内部代码,当API内部代码出现错误,会将预先定义好的错误代码写到调用这个AP ...

  4. MySQL主从复制中断,报“Error on master: message (format)='Cannot delete or update a parent row: a foreign key constraint fails' error code=1217” 错误

    前几天,发现从库挂了,具体报错信息如下: 分析思路 1. 因为我采用的是选择性复制,只针对以下几个库进行复制: card,upay,deal,monitor,collect.所以,不太可能出现对于sa ...

  5. QForkMasterInit: system error caught. error code=0x000005af, message=VirtualAllocEx failed.(遇到还没试过)

    今天在使用Redis的时候出现以下错误: QForkMasterInit: system error caught. error code=0x000005af, message=VirtualAll ...

  6. 微信小程序调用云函数出错 Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail cloud function service error code -501005, error message Environment not found;

    错误异常: Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail cloud ...

  7. MySQL 报错:Translating SQLException with SQL state '42000', error code '1064', message

    MySQL报错详细日志 2019-09-12 16:42:29 [http-nio-80-exec-25] DEBUG [org.springframework.jdbc.support.SQLErr ...

  8. [login] 调用失败 Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail requestID , cloud function service error code -501000, error message Environment not found;

    按照微信开放文档,创建完云开发项目,运行,点击获取openid,报如下错: [login] 调用失败 Error: errCode: -404011 cloud function execution ...

  9. COM Error Code(HRESULT)部分摘录

    Return value/code Description 0x00030200 STG_S_CONVERTED The underlying file was converted to compou ...

随机推荐

  1. linux 设备树【转】

    转自:http://blog.csdn.net/chenqianleo/article/details/77779439 [-] linux 设备树 为什么要使用设备树Device Tree 设备树的 ...

  2. 2015多校第6场 HDU 5361 并查集,最短路

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5361 题意:有n个点1-n, 每个点到相邻点的距离是1,然后每个点可以通过花费c[i]的钱从i点走到距 ...

  3. c#中char、string转换为十六进制byte的浅析

    问题引出: string转换为byte(十六进制) static void Main(string[] args) { "; byte[] b = Encoding.Default.GetB ...

  4. Struts2学习笔记02 之 使用

    一.页面向Action传参 1.基本属性注入,页面命名name,action提供成员变量name并提供set方法. 2.域模型注入:页面用user.name对象点属性形式.action成员user对象 ...

  5. 从一个R语言案例学线性回归

    线性回归简介 如下图所示,如果把自变量(也叫independent variable)和因变量(也叫dependent variable)画在二维坐标上,则每条记录对应一个点.线性回规最常见的应用场景 ...

  6. hdu 1495(BFS)

    非常可乐 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submis ...

  7. Single Number I&& II——还没看,倒过头来再看

    Single Number I Given an array of integers, every element appears twice except for one. Find that si ...

  8. GT-----如何做Android应用流量测试?

    1.如何判断一个应用的流量偏高? 如果看流量的绝对值看不出高低,那就找几个同类型的产品对比一下,如果完成同样的事物,被测应用比同类产品高很多,那就偏高了,可能有优化的空间. 2.如何找到有效的优化点? ...

  9. AC日记——[SDOI2011]消耗战 洛谷 P2495

    [SDOI2011]消耗战 思路: 建虚树走树形dp: 代码: #include <bits/stdc++.h> using namespace std; #define INF 1e17 ...

  10. 【lua】可变长参数

    lua可变长参数 在lua中可以使用...表示可变长参数,在函数内通过表访问可变参数 function rest(...) -- 把可变参数放在表类 local args = { ... } prin ...