home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual dBase Pro v7.0 / DATA1.CAB / Sample_Include / Winerror.prg < prev    next >
Encoding:
Text File  |  1997-11-20  |  95.4 KB  |  2,237 lines

  1. //--------------------------------------------------------------
  2. //
  3. //  WINERROR.PRG
  4. //
  5. //  This file contains functions to retrieve information about
  6. //  Windows error messages. The functions are modeled after the
  7. //  other error number/message functions, such as dberror() and
  8. //  dbmessage(). The two functions are:
  9. //
  10. //   WINERROR()           - Returns the most recent error number.
  11. //   WINMESSAGE([<expN>]) - Returns the most recent error message.
  12. //                          If you pass a numeric parameter, it
  13. //                          returns the error message that matches
  14. //                         that error number.
  15. //
  16. //  USAGE:        (in a file)
  17. //                SET PROCEDURE TO WINERROR.PRG ADDITIVE
  18. //                X = WINERROR()      && most recent error
  19. //                Y = WINMESSAGE()    && most recent message
  20. //                Z = WINMESSAGE(5)   && message for error number 5
  21. //
  22. //
  23. //  Visual dBASE 7.0 Samples Group
  24. //
  25. //  $Revision:   1.1  $
  26. //
  27. //  Copyright (c) 1997, Borland International, Inc. 
  28. //  All rights reserved.
  29. //
  30. //--------------------------------------------------------------
  31.  
  32.  
  33. #include winerror.h
  34.  
  35. function winerror
  36.    //
  37.    //  Returns the most recent Windows error.
  38.    //
  39.    if type('GetLastError') = 'U'
  40.       extern clong GetLastError() kernel32
  41.    endif
  42. return GetLastError()
  43.  
  44. function WinMessage (MessageId)
  45.    //
  46.    //  Returns the text of the last Windows error.
  47.    //  If you pass an error number, it returns the text for that
  48.    //  particular error number.
  49.    //
  50.  
  51.    local MessageText
  52.    MessageText = ""
  53.  
  54.    if pcount() = 0
  55.       MessageId = winerror()
  56.    endif
  57.  
  58.    do case
  59.       case MessageId == ERROR_SUCCESS
  60.            MessageText := "The operation completed successfully."
  61.  
  62.       case MessageId == ERROR_INVALID_FUNCTION
  63.            MessageText := "Incorrect function."
  64.  
  65.       case MessageId == ERROR_FILE_NOT_FOUND
  66.            MessageText := "The system cannot find the file specified."
  67.  
  68.       case MessageId == ERROR_PATH_NOT_FOUND
  69.            MessageText := "The system cannot find the path specified."
  70.  
  71.       case MessageId == ERROR_TOO_MANY_OPEN_FILES
  72.            MessageText := "The system cannot open the file."
  73.  
  74.       case MessageId == ERROR_ACCESS_DENIED
  75.            MessageText := "Access is denied."
  76.  
  77.       case MessageId == ERROR_INVALID_HANDLE
  78.            MessageText := "The handle is invalid."
  79.  
  80.       case MessageId == ERROR_ARENA_TRASHED
  81.            MessageText := "The storage control blocks were destroyed."
  82.  
  83.       case MessageId == ERROR_NOT_ENOUGH_MEMORY
  84.            MessageText := "Not enough storage is available to process this command."
  85.  
  86.       case MessageId == ERROR_INVALID_BLOCK
  87.            MessageText := "The storage control block address is invalid."
  88.  
  89.       case MessageId == ERROR_BAD_ENVIRONMENT
  90.            MessageText := "The environment is incorrect."
  91.  
  92.       case MessageId == ERROR_BAD_FORMAT
  93.            MessageText := "An attempt was made to load a program with an" + ;
  94.                   " incorrect format."
  95.  
  96.       case MessageId == ERROR_INVALID_ACCESS
  97.            MessageText := "The access code is invalid."
  98.  
  99.       case MessageId == ERROR_INVALID_DATA
  100.            MessageText := "The data is invalid."
  101.  
  102.       case MessageId == ERROR_OUTOFMEMORY
  103.            MessageText := "Not enough storage is available to complete this operation."
  104.  
  105.       case MessageId == ERROR_INVALID_DRIVE
  106.           MessageText := "The system cannot find the drive specified."
  107.  
  108.       case MessageId == ERROR_CURRENT_DIRECTORY
  109.            MessageText := "The directory cannot be removed."
  110.  
  111.       case MessageId == ERROR_NOT_SAME_DEVICE
  112.            MessageText := "The system cannot move the file" + ;
  113.                  " to a different disk drive."
  114.  
  115.       case MessageId == ERROR_NO_MORE_FILES
  116.            MessageText := "There are no more files."
  117.  
  118.       case MessageId == ERROR_WRITE_PROTECT
  119.            MessageText := "The media is write protected."
  120.  
  121.       case MessageId == ERROR_BAD_UNIT
  122.            MessageText := "The system cannot find the device specified."
  123.  
  124.       case MessageId == ERROR_NOT_READY
  125.            MessageText := "The device is not ready."
  126.  
  127.       case MessageId == ERROR_BAD_COMMAND
  128.            MessageText := "The device does not recognize the command."
  129.  
  130.       case MessageId == ERROR_CRC
  131.            MessageText := "Data error (cyclic redundancy check)"
  132.  
  133.       case MessageId == ERROR_BAD_LENGTH
  134.            MessageText := "The program issued a command but the" + ;
  135.                  " command length is incorrect."
  136.  
  137.       case MessageId == ERROR_SEEK
  138.            MessageText := "The drive cannot locate a specific" + ;
  139.                  " area or track on the disk."
  140.  
  141.       case MessageId == ERROR_NOT_DOS_DISK
  142.            MessageText := "The specified disk or diskette cannot be accessed."
  143.  
  144.       case MessageId == ERROR_SECTOR_NOT_FOUND
  145.            MessageText := "The drive cannot find the sector requested."
  146.  
  147.       case MessageId == ERROR_OUT_OF_PAPER
  148.            MessageText := "The printer is out of paper."
  149.  
  150.       case MessageId == ERROR_WRITE_FAULT
  151.            MessageText := "The system cannot write to the specified device."
  152.  
  153.       case MessageId == ERROR_READ_FAULT
  154.            MessageText := "The system cannot read from the specified device."
  155.  
  156.       case MessageId == ERROR_GEN_FAILURE
  157.            MessageText := "A device attached to the system is not functioning."
  158.  
  159.       case MessageId == ERROR_SHARING_VIOLATION
  160.            MessageText := "The process cannot access the file because" + ;
  161.                  " it is being used by another process."
  162.  
  163.       case MessageId == ERROR_LOCK_VIOLATION
  164.            MessageText := "The process cannot access the file because" + ;
  165.                  " another process has locked a portion of the file."
  166.  
  167.       case MessageId == ERROR_WRONG_DISK
  168.            MessageText := "The wrong diskette is in the drive." + ;
  169.                  " Insert %2 (Volume Serial Number: %3)" + ;
  170.                  " into drive %1."
  171.  
  172.       case MessageId == ERROR_SHARING_BUFFER_EXCEEDED
  173.            MessageText := "Too many files opened for sharing."
  174.  
  175.       case MessageId == ERROR_HANDLE_EOF
  176.            MessageText := "Reached end of file."
  177.  
  178.       case MessageId == ERROR_HANDLE_DISK_FULL
  179.            MessageText := "The disk is full."
  180.  
  181.       case MessageId == ERROR_NOT_SUPPORTED
  182.            MessageText := "The network request is not supported."
  183.  
  184.       case MessageId == ERROR_REM_NOT_LIST
  185.            MessageText := "The remote computer is not available."
  186.  
  187.       case MessageId == ERROR_DUP_NAME
  188.            MessageText := "A duplicate name exists on the network."
  189.  
  190.       case MessageId == ERROR_BAD_NETPATH
  191.            MessageText := "The network path was not found."
  192.  
  193.       case MessageId == ERROR_NETWORK_BUSY
  194.            MessageText := "The network is busy."
  195.  
  196.       case MessageId == ERROR_DEV_NOT_EXIST
  197.            MessageText := "The specified network resource or device is no longer" + ;
  198.                  " available."
  199.  
  200.       case MessageId == ERROR_TOO_MANY_CMDS
  201.            MessageText := "The network BIOS command limit has been reached."
  202.  
  203.       case MessageId == ERROR_ADAP_HDW_ERR
  204.            MessageText := "A network adapter hardware error occurred."
  205.  
  206.       case MessageId == ERROR_BAD_NET_RESP
  207.            MessageText := "The specified server cannot perform the requested" + ;
  208.                  " operation."
  209.  
  210.       case MessageId == ERROR_UNEXP_NET_ERR
  211.            MessageText := "An unexpected network error occurred."
  212.  
  213.       case MessageId == ERROR_BAD_REM_ADAP
  214.            MessageText := "The remote adapter is not compatible."
  215.  
  216.       case MessageId == ERROR_PRINTQ_FULL
  217.            MessageText := "The printer queue is full."
  218.  
  219.       case MessageId == ERROR_NO_SPOOL_SPACE
  220.            MessageText := "Space to store the file waiting to be printed is" + ;
  221.                  " not available on the server."
  222.  
  223.       case MessageId == ERROR_PRINT_CANCELLED
  224.            MessageText := "Your file waiting to be printed was deleted."
  225.  
  226.       case MessageId == ERROR_NETNAME_DELETED
  227.            MessageText := "The specified network name is no longer available."
  228.  
  229.       case MessageId == ERROR_NETWORK_ACCESS_DENIED
  230.            MessageText := "Network access is denied."
  231.  
  232.       case MessageId == ERROR_BAD_DEV_TYPE
  233.            MessageText := "The network resource type is not correct."
  234.  
  235.       case MessageId == ERROR_BAD_NET_NAME
  236.            MessageText := "The network name cannot be found."
  237.  
  238.       case MessageId == ERROR_TOO_MANY_NAMES
  239.            MessageText := "The name limit for the local computer network" + ;
  240.                  " adapter card was exceeded."
  241.  
  242.       case MessageId == ERROR_TOO_MANY_SESS
  243.            MessageText := "The network BIOS session limit was exceeded."
  244.  
  245.       case MessageId == ERROR_SHARING_PAUSED
  246.            MessageText := "The remote server has been paused or is in the" + ;
  247.                  " process of being started."
  248.  
  249.       case MessageId == ERROR_REQ_NOT_ACCEP
  250.            MessageText := "No more connections can be made to this remote computer at this time" + ;
  251.                  " because there are already as many connections as the computer can accept."
  252.  
  253.       case MessageId == ERROR_REDIR_PAUSED
  254.            MessageText := "The specified printer or disk device has been paused."
  255.  
  256.       case MessageId == ERROR_FILE_EXISTS
  257.            MessageText := "The file exists."
  258.  
  259.       case MessageId == ERROR_CANNOT_MAKE
  260.            MessageText := "The directory or file cannot be created."
  261.  
  262.       case MessageId == ERROR_FAIL_I24
  263.            MessageText := "Fail on INT 24"
  264.  
  265.       case MessageId == ERROR_OUT_OF_STRUCTURES
  266.            MessageText := "Storage to process this request is not available."
  267.  
  268.       case MessageId == ERROR_ALREADY_ASSIGNED
  269.            MessageText := "The local device name is already in use."
  270.  
  271.       case MessageId == ERROR_INVALID_PASSWORD
  272.            MessageText := "The specified network password is not correct."
  273.  
  274.       case MessageId == ERROR_INVALID_PARAMETER
  275.            MessageText := "The parameter is incorrect."
  276.  
  277.       case MessageId == ERROR_NET_WRITE_FAULT
  278.            MessageText := "A write fault occurred on the network."
  279.  
  280.       case MessageId == ERROR_NO_PROC_SLOTS
  281.            MessageText := "The system cannot start another process at" + ;
  282.                  " this time."
  283.  
  284.       case MessageId == ERROR_TOO_MANY_SEMAPHORES
  285.            MessageText := "Cannot create another system semaphore."
  286.  
  287.       case MessageId == ERROR_EXCL_SEM_ALREADY_OWNED
  288.            MessageText := "The exclusive semaphore is owned by another process."
  289.  
  290.       case MessageId == ERROR_SEM_IS_SET
  291.            MessageText := "The semaphore is set and cannot be closed."
  292.  
  293.       case MessageId == ERROR_TOO_MANY_SEM_REQUESTS
  294.            MessageText := "The semaphore cannot be set again."
  295.  
  296.       case MessageId == ERROR_INVALID_AT_INTERRUPT_TIME
  297.            MessageText := "Cannot request exclusive semaphores at interrupt time."
  298.  
  299.       case MessageId == ERROR_SEM_OWNER_DIED
  300.            MessageText := "The previous ownership of this semaphore has ended."
  301.  
  302.       case MessageId == ERROR_SEM_USER_LIMIT
  303.            MessageText := "Insert the diskette for drive %1."
  304.  
  305.       case MessageId == ERROR_DISK_CHANGE
  306.            MessageText := "Program stopped because alternate diskette was not inserted."
  307.  
  308.       case MessageId == ERROR_DRIVE_LOCKED
  309.            MessageText := "The disk is in use or locked by" + ;
  310.                  " another process."
  311.  
  312.       case MessageId == ERROR_BROKEN_PIPE
  313.            MessageText := "The pipe has been ended."
  314.  
  315.       case MessageId == ERROR_OPEN_FAILED
  316.            MessageText := "The system cannot open the" + ;
  317.                  " device or file specified."
  318.  
  319.       case MessageId == ERROR_BUFFER_OVERFLOW
  320.            MessageText := "The file name is too long."
  321.  
  322.       case MessageId == ERROR_DISK_FULL
  323.            MessageText := "There is not enough space on the disk."
  324.  
  325.       case MessageId == ERROR_NO_MORE_SEARCH_HANDLES
  326.            MessageText := "No more internal file identifiers available."
  327.  
  328.       case MessageId == ERROR_INVALID_TARGET_HANDLE
  329.            MessageText := "The target internal file identifier is incorrect."
  330.  
  331.       case MessageId == ERROR_INVALID_CATEGORY
  332.            MessageText := "The IOCTL call made by the application program is" + ;
  333.                  " not correct."
  334.  
  335.       case MessageId == ERROR_INVALID_VERIFY_SWITCH
  336.            MessageText := "The verify-on-write switch parameter value is not" + ;
  337.                  " correct."
  338.  
  339.       case MessageId == ERROR_BAD_DRIVER_LEVEL
  340.            MessageText := "The system does not support the command requested."
  341.  
  342.       case MessageId == ERROR_CALL_NOT_IMPLEMENTED
  343.            MessageText := "This function is only valid in Win32 mode."
  344.  
  345.       case MessageId == ERROR_SEM_TIMEOUT
  346.            MessageText := "The semaphore timeout period has expired."
  347.  
  348.       case MessageId == ERROR_INSUFFICIENT_BUFFER
  349.            MessageText := "The data area passed to a system call is too" + ;
  350.                  " small."
  351.  
  352.       case MessageId == ERROR_INVALID_NAME
  353.            MessageText := "The filename, directory name, or volume label syntax is incorrect."
  354.  
  355.       case MessageId == ERROR_INVALID_LEVEL
  356.            MessageText := "The system call level is not correct."
  357.  
  358.       case MessageId == ERROR_NO_VOLUME_LABEL
  359.            MessageText := "The disk has no volume label."
  360.  
  361.       case MessageId == ERROR_MOD_NOT_FOUND
  362.            MessageText := "The specified module could not be found."
  363.  
  364.       case MessageId == ERROR_PROC_NOT_FOUND
  365.            MessageText := "The specified procedure could not be found."
  366.  
  367.       case MessageId == ERROR_WAIT_NO_CHILDREN
  368.            MessageText := "There are no child processes to wait for."
  369.  
  370.       case MessageId == ERROR_CHILD_NOT_COMPLETE
  371.            MessageText := "The %1 application cannot be run in Win32 mode."
  372.  
  373.       case MessageId == ERROR_DIRECT_ACCESS_HANDLE
  374.            MessageText := "Attempt to use a file handle to an open disk partition for an" + ;
  375.                  " operation other than raw disk I/O."
  376.  
  377.       case MessageId == ERROR_NEGATIVE_SEEK
  378.            MessageText := "An attempt was made to move the file pointer before the beginning of the file."
  379.  
  380.       case MessageId == ERROR_SEEK_ON_DEVICE
  381.            MessageText := "The file pointer cannot be set on the specified device or file."
  382.  
  383.       case MessageId == ERROR_IS_JOIN_TARGET
  384.            MessageText := "A JOIN or SUBST command" + ;
  385.                  " cannot be used for a drive that" + ;
  386.                  " contains previously joined drives."
  387.  
  388.       case MessageId == ERROR_IS_JOINED
  389.            MessageText := "An attempt was made to use a" + ;
  390.                  " JOIN or SUBST command on a drive that has" + ;
  391.                  " already been joined."
  392.  
  393.       case MessageId == ERROR_IS_SUBSTED
  394.            MessageText := "An attempt was made to use a" + ;
  395.                  " JOIN or SUBST command on a drive that has" + ;
  396.                  " already been substituted."
  397.  
  398.       case MessageId == ERROR_NOT_JOINED
  399.            MessageText := "The system tried to delete" + ;
  400.                  " the JOIN of a drive that is not joined."
  401.  
  402.       case MessageId == ERROR_NOT_SUBSTED
  403.            MessageText := "The system tried to delete the" + ;
  404.                  " substitution of a drive that is not substituted."
  405.  
  406.       case MessageId == ERROR_JOIN_TO_JOIN
  407.            MessageText := "The system tried to join a drive" + ;
  408.                  " to a directory on a joined drive."
  409.  
  410.       case MessageId == ERROR_SUBST_TO_SUBST
  411.            MessageText := "The system tried to substitute a" + ;
  412.                  " drive to a directory on a substituted drive."
  413.  
  414.       case MessageId == ERROR_JOIN_TO_SUBST
  415.            MessageText := "The system tried to join a drive to" + ;
  416.                  " a directory on a substituted drive."
  417.  
  418.       case MessageId == ERROR_SUBST_TO_JOIN
  419.            MessageText := "The system tried to SUBST a drive" + ;
  420.                  " to a directory on a joined drive."
  421.  
  422.       case MessageId == ERROR_BUSY_DRIVE
  423.            MessageText := "The system cannot perform a JOIN or SUBST at this time."
  424.  
  425.       case MessageId == ERROR_SAME_DRIVE
  426.            MessageText := "The system cannot join or substitute a" + ;
  427.                  " drive to or for a directory on the same drive."
  428.  
  429.       case MessageId == ERROR_DIR_NOT_ROOT
  430.            MessageText := "The directory is not a subdirectory of the root directory."
  431.  
  432.       case MessageId == ERROR_DIR_NOT_EMPTY
  433.            MessageText := "The directory is not empty."
  434.  
  435.       case MessageId == ERROR_IS_SUBST_PATH
  436.            MessageText := "The path specified is being used in" + ;
  437.                  " a substitute."
  438.  
  439.       case MessageId == ERROR_IS_JOIN_PATH
  440.            MessageText := "Not enough resources are available to" + ;
  441.                  " process this command."
  442.  
  443.       case MessageId == ERROR_PATH_BUSY
  444.            MessageText := "The path specified cannot be used at this time."
  445.  
  446.       case MessageId == ERROR_IS_SUBST_TARGET
  447.            MessageText := "An attempt was made to join" + ;
  448.                  " or substitute a drive for which a directory" + ;
  449.                  " on the drive is the target of a previous" + ;
  450.                  " substitute."
  451.  
  452.       case MessageId == ERROR_SYSTEM_TRACE
  453.            MessageText := "System trace information was not specified in your" + ;
  454.                  " CONFIG.SYS file, or tracing is disallowed."
  455.  
  456.       case MessageId == ERROR_INVALID_EVENT_COUNT
  457.            MessageText := "The number of specified semaphore events for" + ;
  458.                  " DosMuxSemWait is not correct."
  459.  
  460.       case MessageId == ERROR_TOO_MANY_MUXWAITERS
  461.            MessageText := "DosMuxSemWait did not execute; too many semaphores" + ;
  462.                  " are already set."
  463.  
  464.       case MessageId == ERROR_INVALID_LIST_FORMAT
  465.            MessageText := "The DosMuxSemWait list is not correct."
  466.  
  467.       case MessageId == ERROR_LABEL_TOO_LONG
  468.            MessageText := "The volume label you entered exceeds the label character" + ;
  469.                  " limit of the target file system."
  470.  
  471.       case MessageId == ERROR_TOO_MANY_TCBS
  472.            MessageText := "Cannot create another thread."
  473.  
  474.       case MessageId == ERROR_SIGNAL_REFUSED
  475.            MessageText := "The recipient process has refused the signal."
  476.  
  477.       case MessageId == ERROR_DISCARDED
  478.            MessageText := "The segment is already discarded and cannot be locked."
  479.  
  480.       case MessageId == ERROR_NOT_LOCKED
  481.            MessageText := "The segment is already unlocked."
  482.  
  483.       case MessageId == ERROR_BAD_THREADID_ADDR
  484.            MessageText := "The address for the thread ID is not correct."
  485.  
  486.       case MessageId == ERROR_BAD_ARGUMENTS
  487.            MessageText := "The argument string passed to DosExecPgm is not correct."
  488.  
  489.       case MessageId == ERROR_BAD_PATHNAME
  490.            MessageText := "The specified path is invalid."
  491.  
  492.       case MessageId == ERROR_SIGNAL_PENDING
  493.            MessageText := "A signal is already pending."
  494.  
  495.       case MessageId == ERROR_MAX_THRDS_REACHED
  496.            MessageText := "No more threads can be created in the system."
  497.  
  498.       case MessageId == ERROR_LOCK_FAILED
  499.            MessageText := "Unable to lock a region of a file."
  500.  
  501.       case MessageId == ERROR_BUSY
  502.            MessageText := "The requested resource is in use."
  503.  
  504.       case MessageId == ERROR_CANCEL_VIOLATION
  505.            MessageText := "A lock request was not outstanding for the supplied cancel region."
  506.  
  507.       case MessageId == ERROR_ATOMIC_LOCKS_NOT_SUPPORTED
  508.            MessageText := "The file system does not support atomic changes to the lock type."
  509.  
  510.       case MessageId == ERROR_INVALID_SEGMENT_NUMBER
  511.            MessageText := "The system detected a segment number that was not correct."
  512.  
  513.       case MessageId == ERROR_INVALID_ORDINAL
  514.            MessageText := "The operating system cannot run %1."
  515.  
  516.       case MessageId == ERROR_ALREADY_EXISTS
  517.            MessageText := "Cannot create a file when that file already exists."
  518.  
  519.       case MessageId == ERROR_INVALID_FLAG_NUMBER
  520.            MessageText := "The flag passed is not correct."
  521.  
  522.       case MessageId == ERROR_SEM_NOT_FOUND
  523.            MessageText := "The specified system semaphore name was not found."
  524.  
  525.       case MessageId == ERROR_INVALID_STARTING_CODESEG
  526.            MessageText := "The operating system cannot run %1."
  527.  
  528.       case MessageId == ERROR_INVALID_STACKSEG
  529.            MessageText := "The operating system cannot run %1."
  530.  
  531.       case MessageId == ERROR_INVALID_MODULETYPE
  532.            MessageText := "The operating system cannot run %1."
  533.  
  534.       case MessageId == ERROR_INVALID_EXE_SIGNATURE
  535.            MessageText := "Cannot run %1 in Win32 mode."
  536.  
  537.       case MessageId == ERROR_EXE_MARKED_INVALID
  538.            MessageText := "The operating system cannot run %1."
  539.  
  540.       case MessageId == ERROR_BAD_EXE_FORMAT
  541.            MessageText := "%1 is not a valid Win32 application."
  542.  
  543.       case MessageId == ERROR_ITERATED_DATA_EXCEEDS_64k
  544.            MessageText := "The operating system cannot run %1."
  545.  
  546.       case MessageId == ERROR_INVALID_MINALLOCSIZE
  547.            MessageText := "The operating system cannot run %1."
  548.  
  549.       case MessageId == ERROR_DYNLINK_FROM_INVALID_RING
  550.            MessageText := "The operating system cannot run this" + ;
  551.                  " application program."
  552.  
  553.       case MessageId == ERROR_IOPL_NOT_ENABLED
  554.            MessageText := "The operating system is not presently" + ;
  555.                  " configured to run this application."
  556.  
  557.       case MessageId == ERROR_INVALID_SEGDPL
  558.            MessageText := "The operating system cannot run %1."
  559.  
  560.       case MessageId == ERROR_AUTODATASEG_EXCEEDS_64k
  561.            MessageText := "The operating system cannot run this" + ;
  562.                  " application program."
  563.  
  564.       case MessageId == ERROR_RING2SEG_MUST_BE_MOVABLE
  565.            MessageText := "The code segment cannot be greater than or equal to 64KB."
  566.  
  567.       case MessageId == ERROR_RELOC_CHAIN_XEEDS_SEGLIM
  568.            MessageText := "The operating system cannot run %1."
  569.  
  570.       case MessageId == ERROR_INFLOOP_IN_RELOC_CHAIN
  571.            MessageText := "The operating system cannot run %1."
  572.  
  573.       case MessageId == ERROR_ENVVAR_NOT_FOUND
  574.            MessageText := "The system could not find the environment" + ;
  575.                  " option that was entered."
  576.  
  577.       case MessageId == ERROR_NO_SIGNAL_SENT
  578.            MessageText := "No process in the command subtree has a" + ;
  579.                  " signal handler."
  580.  
  581.       case MessageId == ERROR_FILENAME_EXCED_RANGE
  582.            MessageText := "The filename or extension is too long."
  583.  
  584.       case MessageId == ERROR_RING2_STACK_IN_USE
  585.            MessageText := "The ring 2 stack is in use."
  586.  
  587.       case MessageId == ERROR_META_EXPANSION_TOO_LONG
  588.            MessageText := "The global filename characters, * or ?, are entered" + ;
  589.                  " incorrectly or too many global filename characters are specified."
  590.  
  591.       case MessageId == ERROR_INVALID_SIGNAL_NUMBER
  592.            MessageText := "The signal being posted is not correct."
  593.  
  594.       case MessageId == ERROR_THREAD_1_INACTIVE
  595.            MessageText := "The signal handler cannot be set."
  596.  
  597.       case MessageId == ERROR_LOCKED
  598.            MessageText := "The segment is locked and cannot be reallocated."
  599.  
  600.       case MessageId == ERROR_TOO_MANY_MODULES
  601.            MessageText := "Too many dynamic link modules are attached to this" + ;
  602.                  " program or dynamic link module."
  603.  
  604.       case MessageId == ERROR_NESTING_NOT_ALLOWED
  605.            MessageText := "Can't nest calls to LoadModule."
  606.  
  607.       case MessageId == ERROR_BAD_PIPE
  608.            MessageText := "The pipe state is invalid."
  609.  
  610.       case MessageId == ERROR_PIPE_BUSY
  611.            MessageText := "All pipe instances are busy."
  612.  
  613.       case MessageId == ERROR_NO_DATA
  614.            MessageText := "The pipe is being closed."
  615.  
  616.       case MessageId == ERROR_PIPE_NOT_CONNECTED
  617.            MessageText := "No process is on the other end of the pipe."
  618.  
  619.       case MessageId == ERROR_MORE_DATA
  620.            MessageText := "More data is available."
  621.  
  622.       case MessageId == ERROR_VC_DISCONNECTED
  623.            MessageText := "The session was cancelled."
  624.  
  625.       case MessageId == ERROR_INVALID_EA_NAME
  626.            MessageText := "The specified extended attribute name was invalid."
  627.  
  628.       case MessageId == ERROR_EA_LIST_INCONSISTENT
  629.            MessageText := "The extended attributes are inconsistent."
  630.  
  631.       case MessageId == ERROR_NO_MORE_ITEMS
  632.            MessageText := "No more data is available."
  633.  
  634.       case MessageId == ERROR_CANNOT_COPY
  635.            MessageText := "The Copy API cannot be used."
  636.  
  637.       case MessageId == ERROR_DIRECTORY
  638.            MessageText := "The directory name is invalid."
  639.  
  640.       case MessageId == ERROR_EAS_DIDNT_FIT
  641.            MessageText := "The extended attributes did not fit in the buffer."
  642.  
  643.       case MessageId == ERROR_EA_FILE_CORRUPT
  644.            MessageText := "The extended attribute file on the mounted file system is corrupt."
  645.  
  646.       case MessageId == ERROR_EA_TABLE_FULL
  647.            MessageText := "The extended attribute table file is full."
  648.  
  649.       case MessageId == ERROR_INVALID_EA_HANDLE
  650.            MessageText := "The specified extended attribute handle is invalid."
  651.  
  652.       case MessageId == ERROR_EAS_NOT_SUPPORTED
  653.            MessageText := "The mounted file system does not support extended attributes."
  654.  
  655.       case MessageId == ERROR_NOT_OWNER
  656.            MessageText := "Attempt to release mutex not owned by caller."
  657.  
  658.       case MessageId == ERROR_TOO_MANY_POSTS
  659.            MessageText := "Too many posts were made to a semaphore."
  660.  
  661.       case MessageId == ERROR_PARTIAL_COPY
  662.            MessageText := "Only part of a Read/WriteProcessMemory request was completed."
  663.  
  664.       case MessageId == ERROR_MR_MID_NOT_FOUND
  665.            MessageText := "The system cannot find message for message number 0x%1" + ;
  666.                  " in message file for %2."
  667.  
  668.       case MessageId == ERROR_INVALID_ADDRESS
  669.            MessageText := "Attempt to access invalid address."
  670.  
  671.       case MessageId == ERROR_ARITHMETIC_OVERFLOW
  672.            MessageText := "Arithmetic result exceeded 32 bits."
  673.  
  674.       case MessageId == ERROR_PIPE_CONNECTED
  675.            MessageText := "There is a process on other end of the pipe."
  676.  
  677.       case MessageId == ERROR_PIPE_LISTENING
  678.            MessageText := "Waiting for a process to open the other end of the pipe."
  679.  
  680.       case MessageId == ERROR_EA_ACCESS_DENIED
  681.            MessageText := "Access to the extended attribute was denied."
  682.  
  683.       case MessageId == ERROR_OPERATION_ABORTED
  684.            MessageText := "The I/O operation has been aborted because of either a thread exit" + ;
  685.                  " or an application request."
  686.  
  687.       case MessageId == ERROR_IO_INCOMPLETE
  688.            MessageText := "Overlapped I/O event is not in a signalled state."
  689.  
  690.       case MessageId == ERROR_IO_PENDING
  691.            MessageText := "Overlapped I/O operation is in progress."
  692.  
  693.       case MessageId == ERROR_NOACCESS
  694.            MessageText := "Invalid access to memory location."
  695.  
  696.       case MessageId == ERROR_SWAPERROR
  697.            MessageText := "Error performing inpage operation."
  698.  
  699.       case MessageId == ERROR_STACK_OVERFLOW
  700.            MessageText := "Recursion too deep, stack overflowed."
  701.  
  702.       case MessageId == ERROR_INVALID_MESSAGE
  703.            MessageText := "The window cannot act on the sent message."
  704.  
  705.       case MessageId == ERROR_CAN_NOT_COMPLETE
  706.            MessageText := "Cannot complete this function."
  707.  
  708.       case MessageId == ERROR_INVALID_FLAGS
  709.            MessageText := "Invalid flags."
  710.  
  711.       case MessageId == ERROR_UNRECOGNIZED_VOLUME
  712.            MessageText := "The volume does not contain a recognized file system." + ;
  713.                  " Please make sure that all required file system drivers are loaded and that the" + ;
  714.                  " volume is not corrupt."
  715.  
  716.       case MessageId == ERROR_FILE_INVALID
  717.            MessageText := "The volume for a file has been externally altered such that the" + ;
  718.                  " opened file is no longer valid."
  719.  
  720.       case MessageId == ERROR_FULLSCREEN_MODE
  721.            MessageText := "The requested operation cannot be performed in full-screen mode."
  722.  
  723.       case MessageId == ERROR_NO_TOKEN
  724.            MessageText := "An attempt was made to reference a token that does not exist."
  725.  
  726.       case MessageId == ERROR_BADDB
  727.            MessageText := "The configuration registry database is corrupt."
  728.  
  729.    endcase
  730.  
  731.    if empty(MessageText)
  732.       do case
  733.          case MessageId == ERROR_BADKEY
  734.               MessageText := "The configuration registry key is invalid."
  735.  
  736.          case MessageId == ERROR_CANTOPEN
  737.               MessageText := "The configuration registry key could not be opened."
  738.  
  739.          case MessageId == ERROR_CANTREAD
  740.               MessageText := "The configuration registry key could not be read."
  741.  
  742.          case MessageId == ERROR_CANTWRITE
  743.               MessageText := "The configuration registry key could not be written."
  744.  
  745.          case MessageId == ERROR_REGISTRY_RECOVERED
  746.               MessageText := "One of the files in the Registry database had to be recovered" + ;
  747.                  " by use of a log or alternate copy.  The recovery was successful."
  748.  
  749.          case MessageId == ERROR_REGISTRY_CORRUPT
  750.               MessageText := "The Registry is corrupt. The structure of one of the files that contains" + ;
  751.                  " Registry data is corrupt, or the system's image of the file in memory" + ;
  752.                  " is corrupt, or the file could not be recovered because the alternate" + ;
  753.                  " copy or log was absent or corrupt."
  754.  
  755.          case MessageId == ERROR_REGISTRY_IO_FAILED
  756.               MessageText := "An I/O operation initiated by the Registry failed unrecoverably." + ;
  757.                  " The Registry could not read in, or write out, or flush, one of the files" + ;
  758.                  " that contain the system's image of the Registry."
  759.  
  760.          case MessageId == ERROR_NOT_REGISTRY_FILE
  761.               MessageText := "The system has attempted to load or restore a file into the Registry, but the" + ;
  762.                  " specified file is not in a Registry file format."
  763.  
  764.          case MessageId == ERROR_KEY_DELETED
  765.               MessageText := "Illegal operation attempted on a Registry key which has been marked for deletion."
  766.  
  767.          case MessageId == ERROR_NO_LOG_SPACE
  768.               MessageText := "System could not allocate the required space in a Registry log."
  769.  
  770.          case MessageId == ERROR_KEY_HAS_CHILDREN
  771.               MessageText := "Cannot create a symbolic link in a Registry key that already" + ;
  772.                  " has subkeys or values."
  773.  
  774.          case MessageId == ERROR_CHILD_MUST_BE_VOLATILE
  775.               MessageText := "Cannot create a stable subkey under a volatile parent key."
  776.  
  777.          case MessageId == ERROR_NOTIFY_ENUM_DIR
  778.               MessageText := "A notify change request is being completed and the information" + ;
  779.                  " is not being returned in the caller's buffer. The caller now" + ;
  780.                  " needs to enumerate the files to find the changes."
  781.  
  782.          case MessageId == ERROR_DEPENDENT_SERVICES_RUNNING
  783.               MessageText := "A stop control has been sent to a service which other running services" + ;
  784.                  " are dependent on."
  785.  
  786.          case MessageId == ERROR_INVALID_SERVICE_CONTROL
  787.               MessageText := "The requested control is not valid for this service"
  788.  
  789.          case MessageId == ERROR_SERVICE_REQUEST_TIMEOUT
  790.               MessageText := "The service did not respond to the start or control request in a timely" + ;
  791.                  " fashion."
  792.  
  793.          case MessageId == ERROR_SERVICE_NO_THREAD
  794.               MessageText := "A thread could not be created for the service."
  795.  
  796.          case MessageId == ERROR_SERVICE_DATABASE_LOCKED
  797.               MessageText := "The service database is locked."
  798.  
  799.          case MessageId == ERROR_SERVICE_ALREADY_RUNNING
  800.               MessageText := "An instance of the service is already running."
  801.  
  802.          case MessageId == ERROR_INVALID_SERVICE_ACCOUNT
  803.               MessageText := "The account name is invalid or does not exist."
  804.  
  805.          case MessageId == ERROR_SERVICE_DISABLED
  806.               MessageText := "The specified service is disabled and cannot be started."
  807.  
  808.          case MessageId == ERROR_CIRCULAR_DEPENDENCY
  809.               MessageText := "Circular service dependency was specified."
  810.  
  811.          case MessageId == ERROR_SERVICE_DOES_NOT_EXIST
  812.               MessageText := "The specified service does not exist as an installed service."
  813.  
  814.          case MessageId == ERROR_SERVICE_CANNOT_ACCEPT_CTRL
  815.               MessageText := "The service cannot accept control messages at this time."
  816.  
  817.          case MessageId == ERROR_SERVICE_NOT_ACTIVE
  818.               MessageText := "The service has not been started."
  819.  
  820.          case MessageId == ERROR_FAILED_SERVICE_CONTROLLER_CONNECT
  821.               MessageText := "The service process could not connect to the service controller."
  822.  
  823.          case MessageId == ERROR_EXCEPTION_IN_SERVICE
  824.               MessageText := "An exception occurred in the service when handling the control request."
  825.  
  826.          case MessageId == ERROR_DATABASE_DOES_NOT_EXIST
  827.               MessageText := "The database specified does not exist."
  828.  
  829.          case MessageId == ERROR_SERVICE_SPECIFIC_ERROR
  830.               MessageText := "The service has returned a service-specific error code."
  831.  
  832.          case MessageId == ERROR_PROCESS_ABORTED
  833.               MessageText := "The process terminated unexpectedly."
  834.  
  835.          case MessageId == ERROR_SERVICE_DEPENDENCY_FAIL
  836.               MessageText := "The dependency service or group failed to start."
  837.  
  838.          case MessageId == ERROR_SERVICE_LOGON_FAILED
  839.               MessageText := "The service did not start due to a logon failure."
  840.  
  841.          case MessageId == ERROR_SERVICE_START_HANG
  842.               MessageText := "After starting, the service hung in a start-pending state."
  843.  
  844.          case MessageId == ERROR_INVALID_SERVICE_LOCK
  845.               MessageText := "The specified service database lock is invalid."
  846.  
  847.          case MessageId == ERROR_SERVICE_MARKED_FOR_DELETE
  848.               MessageText := "The specified service has been marked for deletion."
  849.  
  850.          case MessageId == ERROR_SERVICE_EXISTS
  851.               MessageText := "The specified service already exists."
  852.  
  853.          case MessageId == ERROR_ALREADY_RUNNING_LKG
  854.               MessageText := "The system is currently running with the last-known-good configuration."
  855.  
  856.          case MessageId == ERROR_SERVICE_DEPENDENCY_DELETED
  857.               MessageText := "The dependency service does not exist or has been marked for" + ;
  858.                  " deletion."
  859.  
  860.          case MessageId == ERROR_BOOT_ALREADY_ACCEPTED
  861.               MessageText := "The current boot has already been accepted for use as the" + ;
  862.                  " last-known-good control set."
  863.  
  864.          case MessageId == ERROR_SERVICE_NEVER_STARTED
  865.               MessageText := "No attempts to start the service have been made since the last boot."
  866.  
  867.          case MessageId == ERROR_DUPLICATE_SERVICE_NAME
  868.               MessageText := "The name is already in use as either a service name or a service display" + ;
  869.                  " name."
  870.  
  871.          case MessageId == ERROR_END_OF_MEDIA
  872.               MessageText := "The physical end of the tape has been reached."
  873.  
  874.          case MessageId == ERROR_FILEMARK_DETECTED
  875.               MessageText := "A tape access reached a filemark."
  876.  
  877.          case MessageId == ERROR_BEGINNING_OF_MEDIA
  878.               MessageText := "Beginning of tape or partition was encountered."
  879.  
  880.          case MessageId == ERROR_SETMARK_DETECTED
  881.               MessageText := "A tape access reached the end of a set of files."
  882.  
  883.          case MessageId == ERROR_NO_DATA_DETECTED
  884.               MessageText := "No more data is on the tape."
  885.  
  886.          case MessageId == ERROR_PARTITION_FAILURE
  887.               MessageText := "Tape could not be partitioned."
  888.  
  889.          case MessageId == ERROR_INVALID_BLOCK_LENGTH
  890.               MessageText := "When accessing a new tape of a multivolume partition, the current" + ;
  891.                  " blocksize is incorrect."
  892.  
  893.          case MessageId == ERROR_DEVICE_NOT_PARTITIONED
  894.               MessageText := "Tape partition information could not be found when loading a tape."
  895.  
  896.          case MessageId == ERROR_UNABLE_TO_LOCK_MEDIA
  897.               MessageText := "Unable to lock the media eject mechanism."
  898.  
  899.          case MessageId == ERROR_UNABLE_TO_UNLOAD_MEDIA
  900.               MessageText := "Unable to unload the media."
  901.  
  902.          case MessageId == ERROR_MEDIA_CHANGED
  903.               MessageText := "Media in drive may have changed."
  904.  
  905.          case MessageId == ERROR_BUS_RESET
  906.               MessageText := "The I/O bus was reset."
  907.  
  908.          case MessageId == ERROR_NO_MEDIA_IN_DRIVE
  909.               MessageText := "No media in drive."
  910.  
  911.          case MessageId == ERROR_NO_UNICODE_TRANSLATION
  912.               MessageText := "No mapping for the Unicode character exists in the target multi-byte code page."
  913.  
  914.          case MessageId == ERROR_DLL_INIT_FAILED
  915.               MessageText := "A dynamic link library (DLL) initialization routine failed."
  916.  
  917.          case MessageId == ERROR_SHUTDOWN_IN_PROGRESS
  918.               MessageText := "A system shutdown is in progress."
  919.  
  920.          case MessageId == ERROR_NO_SHUTDOWN_IN_PROGRESS
  921.               MessageText := "Unable to abort the system shutdown because no shutdown was in progress."
  922.  
  923.          case MessageId == ERROR_IO_DEVICE
  924.               MessageText := "The request could not be performed because of an I/O device error."
  925.  
  926.          case MessageId == ERROR_SERIAL_NO_DEVICE
  927.               MessageText := "No serial device was successfully initialized.  The serial driver will unload."
  928.  
  929.          case MessageId == ERROR_IRQ_BUSY
  930.               MessageText := "Unable to open a device that was sharing an interrupt request (IRQ)" + ;
  931.                  " with other devices. At least one other device that uses that IRQ" + ;
  932.                  " was already opened."
  933.  
  934.          case MessageId == ERROR_MORE_WRITES
  935.               MessageText := "A serial I/O operation was completed by another write to the serial port." + ;
  936.                  " (The IOCTL_SERIAL_XOFF_COUNTER reached zero.)"
  937.  
  938.          case MessageId == ERROR_COUNTER_TIMEOUT
  939.               MessageText := "A serial I/O operation completed because the time-out period expired." + ;
  940.                  " (The IOCTL_SERIAL_XOFF_COUNTER did not reach zero.)"
  941.  
  942.          case MessageId == ERROR_FLOPPY_ID_MARK_NOT_FOUND
  943.               MessageText := "No ID address mark was found on the floppy disk."
  944.  
  945.          case MessageId == ERROR_FLOPPY_WRONG_CYLINDER
  946.               MessageText := "Mismatch between the floppy disk sector ID field and the floppy disk" + ;
  947.                  " controller track address."
  948.  
  949.          case MessageId == ERROR_FLOPPY_UNKNOWN_ERROR
  950.               MessageText := "The floppy disk controller reported an error that is not recognized" + ;
  951.                  " by the floppy disk driver."
  952.  
  953.          case MessageId == ERROR_FLOPPY_BAD_REGISTERS
  954.               MessageText := "The floppy disk controller returned inconsistent results in its registers."
  955.  
  956.          case MessageId == ERROR_DISK_RECALIBRATE_FAILED
  957.               MessageText := "While accessing the hard disk, a recalibrate operation failed, even after retries."
  958.  
  959.          case MessageId == ERROR_DISK_OPERATION_FAILED
  960.               MessageText := "While accessing the hard disk, a disk operation failed even after retries."
  961.  
  962.          case MessageId == ERROR_DISK_RESET_FAILED
  963.               MessageText := "While accessing the hard disk, a disk controller reset was needed, but" + ;
  964.                  " even that failed."
  965.  
  966.          case MessageId == ERROR_EOM_OVERFLOW
  967.               MessageText := "Physical end of tape encountered."
  968.  
  969.          case MessageId == ERROR_NOT_ENOUGH_SERVER_MEMORY
  970.               MessageText := "Not enough server storage is available to process this command."
  971.  
  972.          case MessageId == ERROR_POSSIBLE_DEADLOCK
  973.               MessageText := "A potential deadlock condition has been detected."
  974.  
  975.          case MessageId == ERROR_MAPPED_ALIGNMENT
  976.               MessageText := "The base address or the file offset specified does not have the proper" + ;
  977.                  " alignment."
  978.  
  979.          case MessageId == ERROR_SET_POWER_STATE_VETOED
  980.               MessageText := "An attempt to change the system power state was vetoed by another" + ;
  981.                  " application or driver."
  982.  
  983.          case MessageId == ERROR_SET_POWER_STATE_FAILED
  984.               MessageText := "The system BIOS failed an attempt to change the system power state."
  985.  
  986.          case MessageId == ERROR_OLD_WIN_VERSION
  987.               MessageText := "The specified program requires a newer version of Windows."
  988.  
  989.          case MessageId == ERROR_APP_WRONG_OS
  990.               MessageText := "The specified program is not a Windows or MS-DOS program."
  991.  
  992.          case MessageId == ERROR_SINGLE_INSTANCE_APP
  993.               MessageText := "Cannot start more than one instance of the specified program."
  994.  
  995.          case MessageId == ERROR_RMODE_APP
  996.               MessageText := "The specified program was written for an older version of Windows."
  997.  
  998.          case MessageId == ERROR_INVALID_DLL
  999.               MessageText := "One of the library files needed to run this application is damaged."
  1000.  
  1001.          case MessageId == ERROR_NO_ASSOCIATION
  1002.               MessageText := "No application is associated with the specified file for this operation."
  1003.  
  1004.          case MessageId == ERROR_DDE_FAIL
  1005.               MessageText := "An error occurred in sending the command to the application."
  1006.  
  1007.          case MessageId == ERROR_DLL_NOT_FOUND
  1008.               MessageText := "One of the library files needed to run this application cannot be found."
  1009.  
  1010.  
  1011. ///////////////////////////
  1012. //                       //
  1013. // Winnet32 Status Codes //
  1014. //                       //
  1015. ///////////////////////////
  1016.  
  1017.  
  1018.          case MessageId == ERROR_BAD_USERNAME
  1019.               MessageText := "The specified username is invalid."
  1020.  
  1021.          case MessageId == ERROR_NOT_CONNECTED
  1022.               MessageText := "This network connection does not exist."
  1023.  
  1024.          case MessageId == ERROR_OPEN_FILES
  1025.               MessageText := "This network connection has files open or requests pending."
  1026.  
  1027.          case MessageId == ERROR_ACTIVE_CONNECTIONS
  1028.               MessageText := "Active connections still exist."
  1029.  
  1030.          case MessageId == ERROR_DEVICE_IN_USE
  1031.               MessageText := "The device is in use by an active process and cannot be disconnected."
  1032.  
  1033.          case MessageId == ERROR_BAD_DEVICE
  1034.               MessageText := "The specified device name is invalid."
  1035.  
  1036.          case MessageId == ERROR_CONNECTION_UNAVAIL
  1037.               MessageText := "The device is not currently connected but it is a remembered connection."
  1038.  
  1039.          case MessageId == ERROR_DEVICE_ALREADY_REMEMBERED
  1040.               MessageText := "An attempt was made to remember a device that had previously been remembered."
  1041.  
  1042.          case MessageId == ERROR_NO_NET_OR_BAD_PATH
  1043.               MessageText := "No network provider accepted the given network path."
  1044.  
  1045.          case MessageId == ERROR_BAD_PROVIDER
  1046.               MessageText := "The specified network provider name is invalid."
  1047.  
  1048.          case MessageId == ERROR_CANNOT_OPEN_PROFILE
  1049.               MessageText := "Unable to open the network connection profile."
  1050.  
  1051.          case MessageId == ERROR_BAD_PROFILE
  1052.               MessageText := "The network connection profile is corrupt."
  1053.  
  1054.          case MessageId == ERROR_NOT_CONTAINER
  1055.               MessageText := "Cannot enumerate a non-container."
  1056.  
  1057.          case MessageId == ERROR_EXTENDED_ERROR
  1058.               MessageText := "An extended error has occurred."
  1059.  
  1060.          case MessageId == ERROR_INVALID_GROUPNAME
  1061.               MessageText := "The format of the specified group name is invalid."
  1062.  
  1063.          case MessageId == ERROR_INVALID_COMPUTERNAME
  1064.               MessageText := "The format of the specified computer name is invalid."
  1065.  
  1066.          case MessageId == ERROR_INVALID_EVENTNAME
  1067.               MessageText := "The format of the specified event name is invalid."
  1068.  
  1069.          case MessageId == ERROR_INVALID_DOMAINNAME
  1070.               MessageText := "The format of the specified domain name is invalid."
  1071.  
  1072.          case MessageId == ERROR_INVALID_SERVICENAME
  1073.               MessageText := "The format of the specified service name is invalid."
  1074.  
  1075.          case MessageId == ERROR_INVALID_NETNAME
  1076.               MessageText := "The format of the specified network name is invalid."
  1077.  
  1078.          case MessageId == ERROR_INVALID_SHARENAME
  1079.               MessageText := "The format of the specified share name is invalid."
  1080.  
  1081.          case MessageId == ERROR_INVALID_PASSWORDNAME
  1082.               MessageText := "The format of the specified password is invalid."
  1083.  
  1084.          case MessageId == ERROR_INVALID_MESSAGENAME
  1085.               MessageText := "The format of the specified message name is invalid."
  1086.  
  1087.          case MessageId == ERROR_INVALID_MESSAGEDEST
  1088.               MessageText := "The format of the specified message destination is invalid."
  1089.  
  1090.          case MessageId == ERROR_SESSION_CREDENTIAL_CONFLICT
  1091.               MessageText := "The credentials supplied conflict with an existing set of credentials."
  1092.  
  1093.          case MessageId == ERROR_REMOTE_SESSION_LIMIT_EXCEEDED
  1094.               MessageText := "An attempt was made to establish a session to a network server, but there" + ;
  1095.                  " are already too many sessions established to that server."
  1096.  
  1097.          case MessageId == ERROR_DUP_DOMAINNAME
  1098.               MessageText := "The workgroup or domain name is already in use by another computer on the" + ;
  1099.                  " network."
  1100.  
  1101.          case MessageId == ERROR_NO_NETWORK
  1102.               MessageText := "The network is not present or not started."
  1103.  
  1104.          case MessageId == ERROR_CANCELLED
  1105.               MessageText := "The operation was cancelled by the user."
  1106.  
  1107.          case MessageId == ERROR_USER_MAPPED_FILE
  1108.               MessageText := "The requested operation cannot be performed on a file with a user mapped section open."
  1109.  
  1110.          case MessageId == ERROR_CONNECTION_REFUSED
  1111.               MessageText := "The remote system refused the network connection."
  1112.  
  1113.          case MessageId == ERROR_GRACEFUL_DISCONNECT
  1114.               MessageText := "The network connection was gracefully closed."
  1115.  
  1116.          case MessageId == ERROR_ADDRESS_ALREADY_ASSOCIATED
  1117.               MessageText := "The network transport endpoint already has an address associated with it."
  1118.  
  1119.          case MessageId == ERROR_ADDRESS_NOT_ASSOCIATED
  1120.               MessageText := "An address has not yet been associated with the network endpoint."
  1121.  
  1122.          case MessageId == ERROR_CONNECTION_INVALID
  1123.               MessageText := "An operation was attempted on a non-existent network connection."
  1124.  
  1125.          case MessageId == ERROR_CONNECTION_ACTIVE
  1126.               MessageText := "An invalid operation was attempted on an active network connection."
  1127.  
  1128.          case MessageId == ERROR_NETWORK_UNREACHABLE
  1129.               MessageText := "The remote network is not reachable by the transport."
  1130.  
  1131.          case MessageId == ERROR_HOST_UNREACHABLE
  1132.               MessageText := "The remote system is not reachable by the transport."
  1133.  
  1134.          case MessageId == ERROR_PROTOCOL_UNREACHABLE
  1135.               MessageText := "The remote system does not support the transport protocol."
  1136.  
  1137.          case MessageId == ERROR_PORT_UNREACHABLE
  1138.               MessageText := "No service is operating at the destination network endpoint" + ;
  1139.                  " on the remote system."
  1140.  
  1141.          case MessageId == ERROR_REQUEST_ABORTED
  1142.               MessageText := "The request was aborted."
  1143.  
  1144.          case MessageId == ERROR_CONNECTION_ABORTED
  1145.               MessageText := "The network connection was aborted by the local system."
  1146.  
  1147.          case MessageId == ERROR_RETRY
  1148.               MessageText := "The operation could not be completed.  A retry should be performed."
  1149.  
  1150.          case MessageId == ERROR_CONNECTION_COUNT_LIMIT
  1151.               MessageText := "A connection to the server could not be made because the limit on the number of" + ;
  1152.                  " concurrent connections for this account has been reached."
  1153.  
  1154.          case MessageId == ERROR_LOGIN_TIME_RESTRICTION
  1155.               MessageText := "Attempting to login during an unauthorized time of day for this account."
  1156.  
  1157.          case MessageId == ERROR_LOGIN_WKSTA_RESTRICTION
  1158.               MessageText := "The account is not authorized to login from this station."
  1159.  
  1160.          case MessageId == ERROR_INCORRECT_ADDRESS
  1161.               MessageText := "The network address could not be used for the operation requested."
  1162.  
  1163.          case MessageId == ERROR_ALREADY_REGISTERED
  1164.               MessageText := "The service is already registered."
  1165.  
  1166.          case MessageId == ERROR_SERVICE_NOT_FOUND
  1167.               MessageText := "The specified service does not exist."
  1168.  
  1169.          case MessageId == ERROR_NOT_AUTHENTICATED
  1170.               MessageText := "The operation being requested was not performed because the user" + ;
  1171.                  " has not been authenticated."
  1172.  
  1173.          case MessageId == ERROR_NOT_LOGGED_ON
  1174.               MessageText := "The operation being requested was not performed because the user" + ;
  1175.                  " has not logged on to the network." + ;
  1176.                  " The specified service does not exist."
  1177.  
  1178.          case MessageId == ERROR_CONTINUE
  1179.               MessageText := "Return that wants caller to continue with work in progress."
  1180.  
  1181.          case MessageId == ERROR_ALREADY_INITIALIZED
  1182.               MessageText := "An attempt was made to perform an initialization operation when" + ;
  1183.                  " initialization has already been completed."
  1184.  
  1185.          case MessageId == ERROR_NO_MORE_DEVICES
  1186.               MessageText := "No more local devices."
  1187.  
  1188. ///////////////////////////
  1189. //                       //
  1190. // Security Status Codes //
  1191. //                       //
  1192. ///////////////////////////
  1193.   
  1194.          case MessageId == ERROR_NOT_ALL_ASSIGNED
  1195.               MessageText := "Not all privileges referenced are assigned to the caller."
  1196.  
  1197.          case MessageId == ERROR_SOME_NOT_MAPPED
  1198.               MessageText := "Some mapping between account names and security IDs was not done."
  1199.  
  1200.          case MessageId == ERROR_NO_QUOTAS_FOR_ACCOUNT
  1201.               MessageText := "No system quota limits are specifically set for this account."
  1202.  
  1203.          case MessageId == ERROR_LOCAL_USER_SESSION_KEY
  1204.               MessageText := "No encryption key is available.  A well-known encryption key was returned."
  1205.  
  1206.          case MessageId == ERROR_NULL_LM_PASSWORD
  1207.               MessageText := "The NT password is too complex to be converted to a LAN Manager" + ;
  1208.                  " password.  The LAN Manager password returned is a NULL string."
  1209.  
  1210.          case MessageId == ERROR_UNKNOWN_REVISION
  1211.               MessageText := "The revision level is unknown."
  1212.  
  1213.          case MessageId == ERROR_REVISION_MISMATCH
  1214.               MessageText := "Indicates two revision levels are incompatible."
  1215.  
  1216.          case MessageId == ERROR_INVALID_OWNER
  1217.               MessageText := "This security ID may not be assigned as the owner of this object."
  1218.  
  1219.          case MessageId == ERROR_INVALID_PRIMARY_GROUP
  1220.               MessageText := "This security ID may not be assigned as the primary group of an object."
  1221.  
  1222.          case MessageId == ERROR_NO_IMPERSONATION_TOKEN
  1223.               MessageText := "An attempt has been made to operate on an impersonation token" + ;
  1224.                  " by a thread that is not currently impersonating a client."
  1225.  
  1226.          case MessageId == ERROR_CANT_DISABLE_MANDATORY
  1227.               MessageText := "The group may not be disabled."
  1228.  
  1229.          case MessageId == ERROR_NO_LOGON_SERVERS
  1230.               MessageText := "There are currently no logon servers available to service the logon" + ;
  1231.                  " request."
  1232.  
  1233.          case MessageId == ERROR_NO_SUCH_LOGON_SESSION
  1234.               MessageText := " A specified logon session does not exist.  It may already have" + ;
  1235.                  "  been terminated."
  1236.  
  1237.          case MessageId == ERROR_NO_SUCH_PRIVILEGE
  1238.               MessageText := " A specified privilege does not exist."
  1239.  
  1240.          case MessageId == ERROR_PRIVILEGE_NOT_HELD
  1241.               MessageText := " A required privilege is not held by the client."
  1242.  
  1243.          case MessageId == ERROR_INVALID_ACCOUNT_NAME
  1244.               MessageText := "The name provided is not a properly formed account name."
  1245.  
  1246.          case MessageId == ERROR_USER_EXISTS
  1247.               MessageText := "The specified user already exists."
  1248.  
  1249.          case MessageId == ERROR_NO_SUCH_USER
  1250.               MessageText := "The specified user does not exist."
  1251.  
  1252.          case MessageId == ERROR_GROUP_EXISTS
  1253.               MessageText := "The specified group already exists."
  1254.  
  1255.          case MessageId == ERROR_NO_SUCH_GROUP
  1256.               MessageText := "The specified group does not exist."
  1257.  
  1258.          case MessageId == ERROR_MEMBER_IN_GROUP
  1259.               MessageText := "Either the specified user account is already a member of the specified" + ;
  1260.                  " group, or the specified group cannot be deleted because it contains" + ;
  1261.                  " a member."
  1262.  
  1263.          case MessageId == ERROR_MEMBER_NOT_IN_GROUP
  1264.               MessageText := "The specified user account is not a member of the specified group account."
  1265.  
  1266.          case MessageId == ERROR_LAST_ADMIN
  1267.               MessageText := "The last remaining administration account cannot be disabled" + ;
  1268.                  " or deleted."
  1269.  
  1270.          case MessageId == ERROR_WRONG_PASSWORD
  1271.               MessageText := "Unable to update the password.  The value provided as the current" + ;
  1272.                  " password is incorrect."
  1273.  
  1274.          case MessageId == ERROR_ILL_FORMED_PASSWORD
  1275.               MessageText := "Unable to update the password.  The value provided for the new password" + ;
  1276.                  " contains values that are not allowed in passwords."
  1277.  
  1278.          case MessageId == ERROR_PASSWORD_RESTRICTION
  1279.               MessageText := "Unable to update the password because a password update rule has been" + ;
  1280.                  " violated."
  1281.  
  1282.          case MessageId == ERROR_LOGON_FAILURE
  1283.               MessageText := "Logon failure: unknown user name or bad password."
  1284.  
  1285.          case MessageId == ERROR_ACCOUNT_RESTRICTION
  1286.               MessageText := "Logon failure: user account restriction."
  1287.  
  1288.          case MessageId == ERROR_INVALID_LOGON_HOURS
  1289.               MessageText := "Logon failure: account logon time restriction violation."
  1290.  
  1291.          case MessageId == ERROR_INVALID_WORKSTATION
  1292.               MessageText := "Logon failure: user not allowed to log on to this computer."
  1293.  
  1294.          case MessageId == ERROR_PASSWORD_EXPIRED
  1295.               MessageText := "Logon failure: the specified account password has expired."
  1296.  
  1297.          case MessageId == ERROR_ACCOUNT_DISABLED
  1298.               MessageText := "Logon failure: account currently disabled."
  1299.  
  1300.          case MessageId == ERROR_NONE_MAPPED
  1301.               MessageText := "No mapping between account names and security IDs was done."
  1302.  
  1303.          case MessageId == ERROR_TOO_MANY_LUIDS_REQUESTED
  1304.               MessageText := "Too many local user identifiers (LUIDs) were requested at one time."
  1305.  
  1306.          case MessageId == ERROR_LUIDS_EXHAUSTED
  1307.               MessageText := "No more local user identifiers (LUIDs) are available."
  1308.  
  1309.          case MessageId == ERROR_INVALID_SUB_AUTHORITY
  1310.               MessageText := "The subauthority part of a security ID is invalid for this particular use."
  1311.  
  1312.          case MessageId == ERROR_INVALID_ACL
  1313.               MessageText := "The access control list (ACL) structure is invalid."
  1314.  
  1315.          case MessageId == ERROR_INVALID_SID
  1316.               MessageText := "The security ID structure is invalid."
  1317.  
  1318.          case MessageId == ERROR_INVALID_SECURITY_DESCR
  1319.               MessageText := "The security descriptor structure is invalid."
  1320.  
  1321.          case MessageId == ERROR_BAD_INHERITANCE_ACL
  1322.               MessageText := "The inherited access control list (ACL) or access control entry (ACE)" + ;
  1323.                  " could not be built."
  1324.  
  1325.          case MessageId == ERROR_SERVER_DISABLED
  1326.               MessageText := "The server is currently disabled."
  1327.  
  1328.          case MessageId == ERROR_SERVER_NOT_DISABLED
  1329.               MessageText := "The server is currently enabled."
  1330.  
  1331.          case MessageId == ERROR_INVALID_ID_AUTHORITY
  1332.               MessageText := "The value provided was an invalid value for an identifier authority."
  1333.  
  1334.          case MessageId == ERROR_ALLOTTED_SPACE_EXCEEDED
  1335.               MessageText := "No more memory is available for security information updates."
  1336.  
  1337.          case MessageId == ERROR_INVALID_GROUP_ATTRIBUTES
  1338.               MessageText := "The specified attributes are invalid, or incompatible with the" + ;
  1339.                  " attributes for the group as a whole."
  1340.  
  1341.          case MessageId == ERROR_BAD_IMPERSONATION_LEVEL
  1342.               MessageText := "Either a required impersonation level was not provided, or the" + ;
  1343.                  " provided impersonation level is invalid."
  1344.  
  1345.          case MessageId == ERROR_CANT_OPEN_ANONYMOUS
  1346.               MessageText := "Cannot open an anonymous level security token."
  1347.  
  1348.          case MessageId == ERROR_BAD_VALIDATION_CLASS
  1349.               MessageText := "The validation information class requested was invalid."
  1350.  
  1351.          case MessageId == ERROR_BAD_TOKEN_TYPE
  1352.               MessageText := "The type of the token is inappropriate for its attempted use."
  1353.  
  1354.          case MessageId == ERROR_NO_SECURITY_ON_OBJECT
  1355.               MessageText := "Unable to perform a security operation on an object" + ;
  1356.                  " which has no associated security."
  1357.  
  1358.          case MessageId == ERROR_CANT_ACCESS_DOMAIN_INFO
  1359.               MessageText := "Indicates a Windows NT Server could not be contacted or that" + ;
  1360.                  " objects within the domain are protected such that necessary" + ;
  1361.                  " information could not be retrieved."
  1362.  
  1363.          case MessageId == ERROR_INVALID_SERVER_STATE
  1364.               MessageText := "The security account manager (SAM) or local security" + ;
  1365.                  " authority (LSA) server was in the wrong state to perform" + ;
  1366.                  " the security operation."
  1367.  
  1368.          case MessageId == ERROR_INVALID_DOMAIN_STATE
  1369.               MessageText := "The domain was in the wrong state to perform the security operation."
  1370.  
  1371.          case MessageId == ERROR_INVALID_DOMAIN_ROLE
  1372.               MessageText := "This operation is only allowed for the Primary Domain Controller of the domain."
  1373.  
  1374.          case MessageId == ERROR_NO_SUCH_DOMAIN
  1375.               MessageText := "The specified domain did not exist."
  1376.  
  1377.          case MessageId == ERROR_DOMAIN_EXISTS
  1378.               MessageText := "The specified domain already exists."
  1379.  
  1380.          case MessageId == ERROR_DOMAIN_LIMIT_EXCEEDED
  1381.               MessageText := "An attempt was made to exceed the limit on the number of domains per server."
  1382.  
  1383.          case MessageId == ERROR_INTERNAL_DB_CORRUPTION
  1384.               MessageText := "Unable to complete the requested operation because of either a" + ;
  1385.                  " catastrophic media failure or a data structure corruption on the disk."
  1386.  
  1387.          case MessageId == ERROR_INTERNAL_ERROR
  1388.               MessageText := "The security account database contains an internal inconsistency."
  1389.  
  1390.          case MessageId == ERROR_GENERIC_NOT_MAPPED
  1391.               MessageText := "Generic access types were contained in an access mask which should" + ;
  1392.                  " already be mapped to non-generic types."
  1393.  
  1394.          case MessageId == ERROR_BAD_DESCRIPTOR_FORMAT
  1395.               MessageText := "A security descriptor is not in the right format (absolute or self-relative)."
  1396.  
  1397.          case MessageId == ERROR_NOT_LOGON_PROCESS
  1398.               MessageText := "The requested action is restricted for use by logon processes" + ;
  1399.                  " only.  The calling process has not registered as a logon process."
  1400.  
  1401.          case MessageId == ERROR_LOGON_SESSION_EXISTS
  1402.               MessageText := "Cannot start a new logon session with an ID that is already in use."
  1403.  
  1404.          case MessageId == ERROR_NO_SUCH_PACKAGE
  1405.               MessageText := "A specified authentication package is unknown."
  1406.  
  1407.          case MessageId == ERROR_BAD_LOGON_SESSION_STATE
  1408.               MessageText := "The logon session is not in a state that is consistent with the" + ;
  1409.                  " requested operation."
  1410.  
  1411.          case MessageId == ERROR_LOGON_SESSION_COLLISION
  1412.               MessageText := "The logon session ID is already in use."
  1413.  
  1414.          case MessageId == ERROR_INVALID_LOGON_TYPE
  1415.               MessageText := "A logon request contained an invalid logon type value."
  1416.  
  1417.          case MessageId == ERROR_CANNOT_IMPERSONATE
  1418.               MessageText := "Unable to impersonate via a named pipe until data has been read" + ;
  1419.                  " from that pipe."
  1420.  
  1421.          case MessageId == ERROR_RXACT_INVALID_STATE
  1422.               MessageText := "The transaction state of a Registry subtree is incompatible with the" + ;
  1423.                  " requested operation."
  1424.  
  1425.          case MessageId == ERROR_RXACT_COMMIT_FAILURE
  1426.               MessageText := "An internal security database corruption has been encountered."
  1427.  
  1428.          case MessageId == ERROR_SPECIAL_ACCOUNT
  1429.               MessageText := "Cannot perform this operation on built-in accounts."
  1430.  
  1431.          case MessageId == ERROR_SPECIAL_GROUP
  1432.               MessageText := "Cannot perform this operation on this built-in special group."
  1433.  
  1434.       endcase
  1435.    endif
  1436.  
  1437.    if empty(MessageText)
  1438.       do case
  1439.          case MessageId == ERROR_SPECIAL_USER
  1440.               MessageText := "Cannot perform this operation on this built-in special user."
  1441.  
  1442.          case MessageId == ERROR_MEMBERS_PRIMARY_GROUP
  1443.               MessageText := "The user cannot be removed from a group because the group" + ;
  1444.                  " is currently the user's primary group."
  1445.  
  1446.          case MessageId == ERROR_TOKEN_ALREADY_IN_USE
  1447.               MessageText := "The token is already in use as a primary token."
  1448.  
  1449.          case MessageId == ERROR_NO_SUCH_ALIAS
  1450.               MessageText := "The specified local group does not exist."
  1451.  
  1452.          case MessageId == ERROR_MEMBER_NOT_IN_ALIAS
  1453.               MessageText := "The specified account name is not a member of the local group."
  1454.  
  1455.          case MessageId == ERROR_MEMBER_IN_ALIAS
  1456.               MessageText := "The specified account name is already a member of the local group."
  1457.  
  1458.          case MessageId == ERROR_ALIAS_EXISTS
  1459.               MessageText := "The specified local group already exists."
  1460.  
  1461.          case MessageId == ERROR_LOGON_NOT_GRANTED
  1462.               MessageText := "Logon failure: the user has not been granted the requested" + ;
  1463.                  " logon type at this computer."
  1464.  
  1465.          case MessageId == ERROR_TOO_MANY_SECRETS
  1466.               MessageText := "The maximum number of secrets that may be stored in a single system has been" + ;
  1467.                  " exceeded."
  1468.  
  1469.          case MessageId == ERROR_SECRET_TOO_LONG
  1470.               MessageText := "The length of a secret exceeds the maximum length allowed."
  1471.  
  1472.          case MessageId == ERROR_INTERNAL_DB_ERROR
  1473.               MessageText := "The local security authority database contains an internal inconsistency."
  1474.  
  1475.          case MessageId == ERROR_TOO_MANY_CONTEXT_IDS
  1476.               MessageText := "During a logon attempt, the user's security context accumulated too many" + ;
  1477.                  " security IDs."
  1478.  
  1479.          case MessageId == ERROR_LOGON_TYPE_NOT_GRANTED
  1480.               MessageText := "Logon failure: the user has not been granted the requested logon type" + ;
  1481.                  " at this computer."
  1482.  
  1483.          case MessageId == ERROR_NT_CROSS_ENCRYPTION_REQUIRED
  1484.               MessageText := "A cross-encrypted password is necessary to change a user password."
  1485.  
  1486.          case MessageId == ERROR_NO_SUCH_MEMBER
  1487.               MessageText := "A new member could not be added to a local group because the member does" + ;
  1488.                  " not exist."
  1489.  
  1490.          case MessageId == ERROR_INVALID_MEMBER
  1491.               MessageText := "A new member could not be added to a local group because the member has the" + ;
  1492.                  " wrong account type."
  1493.  
  1494.          case MessageId == ERROR_TOO_MANY_SIDS
  1495.               MessageText := "Too many security IDs have been specified."
  1496.  
  1497.          case MessageId == ERROR_LM_CROSS_ENCRYPTION_REQUIRED
  1498.               MessageText := "A cross-encrypted password is necessary to change this user password."
  1499.  
  1500.          case MessageId == ERROR_NO_INHERITANCE
  1501.               MessageText := "Indicates an ACL contains no inheritable components"
  1502.  
  1503.          case MessageId == ERROR_FILE_CORRUPT
  1504.               MessageText := "The file or directory is corrupt and non-readable."
  1505.  
  1506.          case MessageId == ERROR_DISK_CORRUPT
  1507.               MessageText := "The disk structure is corrupt and non-readable."
  1508.  
  1509.          case MessageId == ERROR_NO_USER_SESSION_KEY
  1510.               MessageText := "There is no user session key for the specified logon session."
  1511.  
  1512.          case MessageId == ERROR_LICENSE_QUOTA_EXCEEDED
  1513.               MessageText := "The service being accessed is licensed for a particular number of" + ;
  1514.                  " connections. No more connections can be made to the service at this time" + ;
  1515.                  " because there are already as many connections as the service can accept."
  1516.  
  1517. // End of security error codes
  1518.  
  1519. ///////////////////////////
  1520. //                       //
  1521. // WinUser Error Codes   //
  1522. //                       //
  1523. ///////////////////////////
  1524.  
  1525.          case MessageId == ERROR_INVALID_WINDOW_HANDLE
  1526.               MessageText := "Invalid window handle."
  1527.  
  1528.          case MessageId == ERROR_INVALID_MENU_HANDLE
  1529.               MessageText := "Invalid menu handle."
  1530.  
  1531.          case MessageId == ERROR_INVALID_CURSOR_HANDLE
  1532.               MessageText := "Invalid cursor handle."
  1533.  
  1534.          case MessageId == ERROR_INVALID_ACCEL_HANDLE
  1535.               MessageText := "Invalid accelerator table handle."
  1536.  
  1537.          case MessageId == ERROR_INVALID_HOOK_HANDLE
  1538.               MessageText := "Invalid hook handle."
  1539.  
  1540.          case MessageId == ERROR_INVALID_DWP_HANDLE
  1541.               MessageText := "Invalid handle to a multiple-window position structure."
  1542.  
  1543.          case MessageId == ERROR_TLW_WITH_WSCHILD
  1544.               MessageText := "Cannot create a top-level child window."
  1545.  
  1546.          case MessageId == ERROR_CANNOT_FIND_WND_CLASS
  1547.               MessageText := "Cannot find window class."
  1548.  
  1549.          case MessageId == ERROR_WINDOW_OF_OTHER_THREAD
  1550.               MessageText := "Invalid window, belongs to other thread."
  1551.  
  1552.          case MessageId == ERROR_HOTKEY_ALREADY_REGISTERED
  1553.               MessageText := "Hot key is already registered."
  1554.  
  1555.          case MessageId == ERROR_CLASS_ALREADY_EXISTS
  1556.               MessageText := "Class already exists."
  1557.  
  1558.          case MessageId == ERROR_CLASS_DOES_NOT_EXIST
  1559.               MessageText := "Class does not exist."
  1560.  
  1561.          case MessageId == ERROR_CLASS_HAS_WINDOWS
  1562.               MessageText := "Class still has open windows."
  1563.  
  1564.          case MessageId == ERROR_INVALID_INDEX
  1565.               MessageText := "Invalid index."
  1566.  
  1567.          case MessageId == ERROR_INVALID_ICON_HANDLE
  1568.               MessageText := "Invalid icon handle."
  1569.  
  1570.          case MessageId == ERROR_PRIVATE_DIALOG_INDEX
  1571.               MessageText := "Using private DIALOG window words."
  1572.  
  1573.          case MessageId == ERROR_LISTBOX_ID_NOT_FOUND
  1574.               MessageText := "The listbox identifier was not found."
  1575.  
  1576.          case MessageId == ERROR_NO_WILDCARD_CHARACTERS
  1577.               MessageText := "No wildcards were found."
  1578.  
  1579.          case MessageId == ERROR_CLIPBOARD_NOT_OPEN
  1580.               MessageText := "Thread does not have a clipboard open."
  1581.  
  1582.          case MessageId == ERROR_HOTKEY_NOT_REGISTERED
  1583.               MessageText := "Hot key is not registered."
  1584.  
  1585.          case MessageId == ERROR_WINDOW_NOT_DIALOG
  1586.               MessageText := "The window is not a valid dialog window."
  1587.  
  1588.          case MessageId == ERROR_CONTROL_ID_NOT_FOUND
  1589.               MessageText := "Control ID not found."
  1590.  
  1591.          case MessageId == ERROR_INVALID_COMBOBOX_MESSAGE
  1592.               MessageText := "Invalid message for a combo box because it does not have an edit control."
  1593.  
  1594.          case MessageId == ERROR_WINDOW_NOT_COMBOBOX
  1595.               MessageText := "The window is not a combo box."
  1596.  
  1597.          case MessageId == ERROR_INVALID_EDIT_HEIGHT
  1598.               MessageText := "Height must be less than 256."
  1599.  
  1600.          case MessageId == ERROR_DC_NOT_FOUND
  1601.               MessageText := "Invalid device context (DC) handle."
  1602.  
  1603.          case MessageId == ERROR_INVALID_HOOK_FILTER
  1604.               MessageText := "Invalid hook procedure type."
  1605.  
  1606.          case MessageId == ERROR_INVALID_FILTER_PROC
  1607.               MessageText := "Invalid hook procedure."
  1608.  
  1609.          case MessageId == ERROR_HOOK_NEEDS_HMOD
  1610.               MessageText := "Cannot set non-local hook without a module handle."
  1611.  
  1612.          case MessageId == ERROR_GLOBAL_ONLY_HOOK
  1613.               MessageText := "This hook procedure can only be set globally."
  1614.  
  1615.          case MessageId == ERROR_JOURNAL_HOOK_SET
  1616.               MessageText := "The journal hook procedure is already installed."
  1617.  
  1618.          case MessageId == ERROR_HOOK_NOT_INSTALLED
  1619.               MessageText := "The hook procedure is not installed."
  1620.  
  1621.          case MessageId == ERROR_INVALID_LB_MESSAGE
  1622.               MessageText := "Invalid message for single-selection listbox."
  1623.  
  1624.          case MessageId == ERROR_SETCOUNT_ON_BAD_LB
  1625.               MessageText := "LB_SETCOUNT sent to non-lazy listbox."
  1626.  
  1627.          case MessageId == ERROR_LB_WITHOUT_TABSTOPS
  1628.               MessageText := "This list box does not support tab stops."
  1629.  
  1630.          case MessageId == ERROR_DESTROY_OBJECT_OF_OTHER_THREAD
  1631.               MessageText := "Cannot destroy object created by another thread."
  1632.  
  1633.          case MessageId == ERROR_CHILD_WINDOW_MENU
  1634.               MessageText := "Child windows cannot have menus."
  1635.  
  1636.          case MessageId == ERROR_NO_SYSTEM_MENU
  1637.               MessageText := "The window does not have a system menu."
  1638.  
  1639.          case MessageId == ERROR_INVALID_MSGBOX_STYLE
  1640.               MessageText := "Invalid message box style."
  1641.  
  1642.          case MessageId == ERROR_INVALID_SPI_VALUE
  1643.               MessageText := "Invalid system-wide (SPI_*) parameter."
  1644.  
  1645.          case MessageId == ERROR_SCREEN_ALREADY_LOCKED
  1646.               MessageText := "Screen already locked."
  1647.  
  1648.          case MessageId == ERROR_HWNDS_HAVE_DIFF_PARENT
  1649.               MessageText := "All handles to windows in a multiple-window position structure must" + ;
  1650.                  " have the same parent."
  1651.  
  1652.          case MessageId == ERROR_NOT_CHILD_WINDOW
  1653.               MessageText := "The window is not a child window."
  1654.  
  1655.          case MessageId == ERROR_INVALID_GW_COMMAND
  1656.               MessageText := "Invalid GW_* command."
  1657.  
  1658.          case MessageId == ERROR_INVALID_THREAD_ID
  1659.               MessageText := "Invalid thread identifier."
  1660.  
  1661.          case MessageId == ERROR_NON_MDICHILD_WINDOW
  1662.               MessageText := "Cannot process a message from a window that is not a multiple document" + ;
  1663.                  " interface (MDI) window."
  1664.  
  1665.          case MessageId == ERROR_POPUP_ALREADY_ACTIVE
  1666.               MessageText := "Popup menu already active."
  1667.  
  1668.          case MessageId == ERROR_NO_SCROLLBARS
  1669.               MessageText := "The window does not have scroll bars."
  1670.  
  1671.          case MessageId == ERROR_INVALID_SCROLLBAR_RANGE
  1672.               MessageText := "Scroll bar range cannot be greater than 0x7FFF."
  1673.  
  1674.          case MessageId == ERROR_INVALID_SHOWWIN_COMMAND
  1675.               MessageText := "Cannot show or remove the window in the way specified."
  1676.  
  1677.          case MessageId == ERROR_NO_SYSTEM_RESOURCES
  1678.               MessageText := "Insufficient system resources exist to complete the requested service."
  1679.  
  1680.          case MessageId == ERROR_NONPAGED_SYSTEM_RESOURCES
  1681.               MessageText := "Insufficient system resources exist to complete the requested service."
  1682.  
  1683.          case MessageId == ERROR_PAGED_SYSTEM_RESOURCES
  1684.               MessageText := "Insufficient system resources exist to complete the requested service."
  1685.  
  1686.          case MessageId == ERROR_WORKING_SET_QUOTA
  1687.               MessageText := "Insufficient quota to complete the requested service."
  1688.  
  1689.          case MessageId == ERROR_PAGEFILE_QUOTA
  1690.               MessageText := "Insufficient quota to complete the requested service."
  1691.  
  1692.          case MessageId == ERROR_COMMITMENT_LIMIT
  1693.               MessageText := "The paging file is too small for this operation to complete."
  1694.  
  1695.          case MessageId == ERROR_MENU_ITEM_NOT_FOUND
  1696.               MessageText := "A menu item was not found."
  1697.  
  1698. // End of WinUser error codes
  1699.  
  1700. ///////////////////////////
  1701. //                       //
  1702. // Eventlog Status Codes //
  1703. //                       //
  1704. ///////////////////////////
  1705.  
  1706.          case MessageId == ERROR_EVENTLOG_FILE_CORRUPT
  1707.               MessageText := "The event log file is corrupt."
  1708.  
  1709.          case MessageId == ERROR_EVENTLOG_CANT_START
  1710.               MessageText := "No event log file could be opened, so the event logging service did not start."
  1711.  
  1712.          case MessageId == ERROR_LOG_FILE_FULL
  1713.               MessageText := "The event log file is full."
  1714.  
  1715.          case MessageId == ERROR_EVENTLOG_FILE_CHANGED
  1716.               MessageText := "The event log file has changed between reads."
  1717.  
  1718. // End of eventlog error codes
  1719.  
  1720. ///////////////////////////
  1721. //                       //
  1722. //   RPC Status Codes    //
  1723. //                       //
  1724. ///////////////////////////
  1725.  
  1726.          case MessageId == RPC_S_INVALID_STRING_BINDING
  1727.               MessageText := "The string binding is invalid."
  1728.  
  1729.          case MessageId == RPC_S_WRONG_KIND_OF_BINDING
  1730.               MessageText := "The binding handle is not the correct type."
  1731.  
  1732.          case MessageId == RPC_S_INVALID_BINDING
  1733.               MessageText := "The binding handle is invalid."
  1734.  
  1735.          case MessageId == RPC_S_PROTSEQ_NOT_SUPPORTED
  1736.               MessageText := "The RPC protocol sequence is not supported."
  1737.  
  1738.          case MessageId == RPC_S_INVALID_RPC_PROTSEQ
  1739.               MessageText := "The RPC protocol sequence is invalid."
  1740.  
  1741.          case MessageId == RPC_S_INVALID_STRING_UUID
  1742.               MessageText := "The string universal unique identifier (UUID) is invalid."
  1743.  
  1744.          case MessageId == RPC_S_INVALID_ENDPOINT_FORMAT
  1745.               MessageText := "The endpoint format is invalid."
  1746.  
  1747.          case MessageId == RPC_S_INVALID_NET_ADDR
  1748.               MessageText := "The network address is invalid."
  1749.  
  1750.          case MessageId == RPC_S_NO_ENDPOINT_FOUND
  1751.               MessageText := "No endpoint was found."
  1752.  
  1753.          case MessageId == RPC_S_INVALID_TIMEOUT
  1754.               MessageText := "The timeout value is invalid."
  1755.  
  1756.          case MessageId == RPC_S_OBJECT_NOT_FOUND
  1757.               MessageText := "The object universal unique identifier (UUID) was not found."
  1758.  
  1759.          case MessageId == RPC_S_ALREADY_REGISTERED
  1760.               MessageText := "The object universal unique identifier (UUID) has already been registered."
  1761.  
  1762.          case MessageId == RPC_S_TYPE_ALREADY_REGISTERED
  1763.               MessageText := "The type universal unique identifier (UUID) has already been registered."
  1764.  
  1765.          case MessageId == RPC_S_ALREADY_LISTENING
  1766.               MessageText := "The RPC server is already listening."
  1767.  
  1768.          case MessageId == RPC_S_NO_PROTSEQS_REGISTERED
  1769.               MessageText := "No protocol sequences have been registered."
  1770.  
  1771.          case MessageId == RPC_S_NOT_LISTENING
  1772.               MessageText := "The RPC server is not listening."
  1773.  
  1774.          case MessageId == RPC_S_UNKNOWN_MGR_TYPE
  1775.               MessageText := "The manager type is unknown."
  1776.  
  1777.          case MessageId == RPC_S_UNKNOWN_IF
  1778.               MessageText := "The interface is unknown."
  1779.  
  1780.          case MessageId == RPC_S_NO_BINDINGS
  1781.               MessageText := "There are no bindings."
  1782.  
  1783.          case MessageId == RPC_S_NO_PROTSEQS
  1784.               MessageText := "There are no protocol sequences."
  1785.  
  1786.          case MessageId == RPC_S_CANT_CREATE_ENDPOINT
  1787.               MessageText := "The endpoint cannot be created."
  1788.  
  1789.          case MessageId == RPC_S_OUT_OF_RESOURCES
  1790.               MessageText := "Not enough resources are available to complete this operation."
  1791.  
  1792.          case MessageId == RPC_S_SERVER_UNAVAILABLE
  1793.               MessageText := "The RPC server is unavailable."
  1794.  
  1795.          case MessageId == RPC_S_SERVER_TOO_BUSY
  1796.               MessageText := "The RPC server is too busy to complete this operation."
  1797.  
  1798.          case MessageId == RPC_S_INVALID_NETWORK_OPTIONS
  1799.               MessageText := "The network options are invalid."
  1800.  
  1801.          case MessageId == RPC_S_NO_CALL_ACTIVE
  1802.               MessageText := "There is not a remote procedure call active in this thread."
  1803.  
  1804.          case MessageId == RPC_S_CALL_FAILED
  1805.               MessageText := "The remote procedure call failed."
  1806.  
  1807.          case MessageId == RPC_S_CALL_FAILED_DNE
  1808.               MessageText := "The remote procedure call failed and did not execute."
  1809.  
  1810.          case MessageId == RPC_S_PROTOCOL_ERROR
  1811.               MessageText := "A remote procedure call (RPC) protocol error occurred."
  1812.  
  1813.          case MessageId == RPC_S_UNSUPPORTED_TRANS_SYN
  1814.               MessageText := "The transfer syntax is not supported by the RPC server."
  1815.  
  1816.          case MessageId == RPC_S_UNSUPPORTED_TYPE
  1817.               MessageText := "The universal unique identifier (UUID) type is not supported."
  1818.  
  1819.          case MessageId == RPC_S_INVALID_TAG
  1820.               MessageText := "The tag is invalid."
  1821.  
  1822.          case MessageId == RPC_S_INVALID_BOUND
  1823.               MessageText := "The array bounds are invalid."
  1824.  
  1825.          case MessageId == RPC_S_NO_ENTRY_NAME
  1826.               MessageText := "The binding does not contain an entry name."
  1827.  
  1828.          case MessageId == RPC_S_INVALID_NAME_SYNTAX
  1829.               MessageText := "The name syntax is invalid."
  1830.  
  1831.          case MessageId == RPC_S_UNSUPPORTED_NAME_SYNTAX
  1832.               MessageText := "The name syntax is not supported."
  1833.  
  1834.          case MessageId == RPC_S_UUID_NO_ADDRESS
  1835.               MessageText := "No network address is available to use to construct a universal" + ;
  1836.                  " unique identifier (UUID)."
  1837.  
  1838.          case MessageId == RPC_S_DUPLICATE_ENDPOINT
  1839.               MessageText := "The endpoint is a duplicate."
  1840.  
  1841.          case MessageId == RPC_S_UNKNOWN_AUTHN_TYPE
  1842.               MessageText := "The authentication type is unknown."
  1843.  
  1844.          case MessageId == RPC_S_MAX_CALLS_TOO_SMALL
  1845.               MessageText := "The maximum number of calls is too small."
  1846.  
  1847.          case MessageId == RPC_S_STRING_TOO_LONG
  1848.               MessageText := "The string is too long."
  1849.  
  1850.          case MessageId == RPC_S_PROTSEQ_NOT_FOUND
  1851.               MessageText := "The RPC protocol sequence was not found."
  1852.  
  1853.          case MessageId == RPC_S_PROCNUM_OUT_OF_RANGE
  1854.               MessageText := "The procedure number is out of range."
  1855.  
  1856.          case MessageId == RPC_S_BINDING_HAS_NO_AUTH
  1857.               MessageText := "The binding does not contain any authentication information."
  1858.  
  1859.          case MessageId == RPC_S_UNKNOWN_AUTHN_SERVICE
  1860.               MessageText := "The authentication service is unknown."
  1861.  
  1862.          case MessageId == RPC_S_UNKNOWN_AUTHN_LEVEL
  1863.               MessageText := "The authentication level is unknown."
  1864.  
  1865.          case MessageId == RPC_S_INVALID_AUTH_IDENTITY
  1866.               MessageText := "The security context is invalid."
  1867.  
  1868.          case MessageId == RPC_S_UNKNOWN_AUTHZ_SERVICE
  1869.               MessageText := "The authorization service is unknown."
  1870.  
  1871.          case MessageId == EPT_S_INVALID_ENTRY
  1872.               MessageText := "The entry is invalid."
  1873.  
  1874.          case MessageId == EPT_S_CANT_PERFORM_OP
  1875.               MessageText := "The server endpoint cannot perform the operation."
  1876.  
  1877.          case MessageId == EPT_S_NOT_REGISTERED
  1878.               MessageText := "There are no more endpoints available from the endpoint mapper."
  1879.  
  1880.          case MessageId == RPC_S_NOTHING_TO_EXPORT
  1881.               MessageText := "No interfaces have been exported."
  1882.  
  1883.          case MessageId == RPC_S_INCOMPLETE_NAME
  1884.               MessageText := "The entry name is incomplete."
  1885.  
  1886.          case MessageId == RPC_S_INVALID_VERS_OPTION
  1887.               MessageText := "The version option is invalid."
  1888.  
  1889.          case MessageId == RPC_S_NO_MORE_MEMBERS
  1890.               MessageText := "There are no more members."
  1891.  
  1892.          case MessageId == RPC_S_NOT_ALL_OBJS_UNEXPORTED
  1893.               MessageText := "There is nothing to unexport."
  1894.  
  1895.          case MessageId == RPC_S_INTERFACE_NOT_FOUND
  1896.               MessageText := "The interface was not found."
  1897.  
  1898.          case MessageId == RPC_S_ENTRY_ALREADY_EXISTS
  1899.               MessageText := "The entry already exists."
  1900.  
  1901.          case MessageId == RPC_S_ENTRY_NOT_FOUND
  1902.               MessageText := "The entry is not found."
  1903.  
  1904.          case MessageId == RPC_S_NAME_SERVICE_UNAVAILABLE
  1905.               MessageText := "The name service is unavailable."
  1906.  
  1907.          case MessageId == RPC_S_INVALID_NAF_ID
  1908.               MessageText := "The network address family is invalid."
  1909.  
  1910.          case MessageId == RPC_S_CANNOT_SUPPORT
  1911.               MessageText := "The requested operation is not supported."
  1912.  
  1913.          case MessageId == RPC_S_NO_CONTEXT_AVAILABLE
  1914.               MessageText := "No security context is available to allow impersonation."
  1915.  
  1916.          case MessageId == RPC_S_INTERNAL_ERROR
  1917.               MessageText := "An internal error occurred in a remote procedure call (RPC)."
  1918.  
  1919.          case MessageId == RPC_S_ZERO_DIVIDE
  1920.               MessageText := "The RPC server attempted an integer division by zero."
  1921.  
  1922.          case MessageId == RPC_S_ADDRESS_ERROR
  1923.               MessageText := "An addressing error occurred in the RPC server."
  1924.  
  1925.          case MessageId == RPC_S_FP_DIV_ZERO
  1926.               MessageText := "A floating-point operation at the RPC server caused a division by zero."
  1927.  
  1928.          case MessageId == RPC_S_FP_UNDERFLOW
  1929.               MessageText := "A floating-point underflow occurred at the RPC server."
  1930.  
  1931.          case MessageId == RPC_S_FP_OVERFLOW
  1932.               MessageText := "A floating-point overflow occurred at the RPC server."
  1933.  
  1934.          case MessageId == RPC_X_NO_MORE_ENTRIES
  1935.               MessageText := "The list of RPC servers available for the binding of auto handles" + ;
  1936.                  " has been exhausted."
  1937.  
  1938.          case MessageId == RPC_X_SS_CHAR_TRANS_OPEN_FAIL
  1939.               MessageText := "Unable to open the character translation table file."
  1940.  
  1941.          case MessageId == RPC_X_SS_CHAR_TRANS_SHORT_FILE
  1942.               MessageText := "The file containing the character translation table has fewer than" + ;
  1943.                  " 512 bytes."
  1944.  
  1945.          case MessageId == RPC_X_SS_IN_NULL_CONTEXT
  1946.               MessageText := "A null context handle was passed from the client to the host during" + ;
  1947.                  " a remote procedure call."
  1948.  
  1949.          case MessageId == RPC_X_SS_CONTEXT_DAMAGED
  1950.               MessageText := "The context handle changed during a remote procedure call."
  1951.  
  1952.          case MessageId == RPC_X_SS_HANDLES_MISMATCH
  1953.               MessageText := "The binding handles passed to a remote procedure call do not match."
  1954.  
  1955.          case MessageId == RPC_X_SS_CANNOT_GET_CALL_HANDLE
  1956.               MessageText := "The stub is unable to get the remote procedure call handle."
  1957.  
  1958.          case MessageId == RPC_X_NULL_REF_POINTER
  1959.               MessageText := "A null reference pointer was passed to the stub."
  1960.  
  1961.          case MessageId == RPC_X_ENUM_VALUE_OUT_OF_RANGE
  1962.               MessageText := "The enumeration value is out of range."
  1963.  
  1964.          case MessageId == RPC_X_BYTE_COUNT_TOO_SMALL
  1965.               MessageText := "The byte count is too small."
  1966.  
  1967.          case MessageId == RPC_X_BAD_STUB_DATA
  1968.               MessageText := "The stub received bad data."
  1969.  
  1970.          case MessageId == ERROR_INVALID_USER_BUFFER
  1971.               MessageText := "The supplied user buffer is not valid for the requested operation."
  1972.  
  1973.          case MessageId == ERROR_UNRECOGNIZED_MEDIA
  1974.               MessageText := "The disk media is not recognized.  It may not be formatted."
  1975.  
  1976.          case MessageId == ERROR_NO_TRUST_LSA_SECRET
  1977.               MessageText := "The workstation does not have a trust secret."
  1978.  
  1979.          case MessageId == ERROR_NO_TRUST_SAM_ACCOUNT
  1980.               MessageText := "The SAM database on the Windows NT Server does not have a computer" + ;
  1981.                  " account for this workstation trust relationship."
  1982.  
  1983.          case MessageId == ERROR_TRUSTED_DOMAIN_FAILURE
  1984.               MessageText := "The trust relationship between the primary domain and the trusted" + ;
  1985.                  " domain failed."
  1986.  
  1987.          case MessageId == ERROR_TRUSTED_RELATIONSHIP_FAILURE
  1988.               MessageText := "The trust relationship between this workstation and the primary" + ;
  1989.                  " domain failed."
  1990.  
  1991.          case MessageId == ERROR_TRUST_FAILURE
  1992.               MessageText := "The network logon failed."
  1993.  
  1994.          case MessageId == RPC_S_CALL_IN_PROGRESS
  1995.               MessageText := "A remote procedure call is already in progress for this thread."
  1996.  
  1997.          case MessageId == ERROR_NETLOGON_NOT_STARTED
  1998.               MessageText := "An attempt was made to logon, but the network logon service was not started."
  1999.  
  2000.          case MessageId == ERROR_ACCOUNT_EXPIRED
  2001.               MessageText := "The user's account has expired."
  2002.  
  2003.          case MessageId == ERROR_REDIRECTOR_HAS_OPEN_HANDLES
  2004.               MessageText := "The redirector is in use and cannot be unloaded."
  2005.  
  2006.          case MessageId == ERROR_PRINTER_DRIVER_ALREADY_INSTALLED
  2007.               MessageText := "The specified printer driver is already installed."
  2008.  
  2009.          case MessageId == ERROR_UNKNOWN_PORT
  2010.               MessageText := "The specified port is unknown."
  2011.  
  2012.          case MessageId == ERROR_UNKNOWN_PRINTER_DRIVER
  2013.               MessageText := "The printer driver is unknown."
  2014.  
  2015.          case MessageId == ERROR_UNKNOWN_PRINTPROCESSOR
  2016.               MessageText := "The print processor is unknown."
  2017.  
  2018.          case MessageId == ERROR_INVALID_SEPARATOR_FILE
  2019.               MessageText := "The specified separator file is invalid."
  2020.  
  2021.          case MessageId == ERROR_INVALID_PRIORITY
  2022.               MessageText := "The specified priority is invalid."
  2023.  
  2024.          case MessageId == ERROR_INVALID_PRINTER_NAME
  2025.               MessageText := "The printer name is invalid."
  2026.  
  2027.          case MessageId == ERROR_PRINTER_ALREADY_EXISTS
  2028.               MessageText := "The printer already exists."
  2029.  
  2030.          case MessageId == ERROR_INVALID_PRINTER_COMMAND
  2031.               MessageText := "The printer command is invalid."
  2032.  
  2033.          case MessageId == ERROR_INVALID_DATATYPE
  2034.               MessageText := "The specified datatype is invalid."
  2035.  
  2036.          case MessageId == ERROR_INVALID_ENVIRONMENT
  2037.               MessageText := "The Environment specified is invalid."
  2038.  
  2039.          case MessageId == RPC_S_NO_MORE_BINDINGS
  2040.               MessageText := "There are no more bindings."
  2041.  
  2042.          case MessageId == ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT
  2043.               MessageText := "The account used is an interdomain trust account.  Use your global user account or local user account to access this server."
  2044.  
  2045.          case MessageId == ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT
  2046.               MessageText := "The account used is a Computer Account.  Use your global user account or local user account to access this server."
  2047.  
  2048.          case MessageId == ERROR_NOLOGON_SERVER_TRUST_ACCOUNT
  2049.               MessageText := "The account used is an server trust account.  Use your global user account or local user account to access this server."
  2050.  
  2051.          case MessageId == ERROR_DOMAIN_TRUST_INCONSISTENT
  2052.               MessageText := "The name or security ID (SID) of the domain specified is inconsistent" + ;
  2053.                  " with the trust information for that domain."
  2054.  
  2055.          case MessageId == ERROR_SERVER_HAS_OPEN_HANDLES
  2056.               MessageText := "The server is in use and cannot be unloaded."
  2057.  
  2058.          case MessageId == ERROR_RESOURCE_DATA_NOT_FOUND
  2059.               MessageText := "The specified image file did not contain a resource section."
  2060.  
  2061.          case MessageId == ERROR_RESOURCE_TYPE_NOT_FOUND
  2062.               MessageText := "The specified resource type can not be found in the image file."
  2063.  
  2064.          case MessageId == ERROR_RESOURCE_NAME_NOT_FOUND
  2065.               MessageText := "The specified resource name can not be found in the image file."
  2066.  
  2067.          case MessageId == ERROR_RESOURCE_LANG_NOT_FOUND
  2068.               MessageText := "The specified resource language ID cannot be found in the image file."
  2069.  
  2070.          case MessageId == ERROR_NOT_ENOUGH_QUOTA
  2071.               MessageText := "Not enough quota is available to process this command."
  2072.  
  2073.          case MessageId == RPC_S_NO_INTERFACES
  2074.               MessageText := "No interfaces have been registered."
  2075.  
  2076.          case MessageId == RPC_S_CALL_CANCELLED
  2077.               MessageText := "The server was altered while processing this call."
  2078.  
  2079.          case MessageId == RPC_S_BINDING_INCOMPLETE
  2080.               MessageText := "The binding handle does not contain all required information."
  2081.  
  2082.          case MessageId == RPC_S_COMM_FAILURE
  2083.               MessageText := "Communications failure."
  2084.  
  2085.          case MessageId == RPC_S_UNSUPPORTED_AUTHN_LEVEL
  2086.               MessageText := "The requested authentication level is not supported."
  2087.  
  2088.          case MessageId == RPC_S_NO_PRINC_NAME
  2089.               MessageText := "No principal name registered."
  2090.  
  2091.          case MessageId == RPC_S_NOT_RPC_ERROR
  2092.               MessageText := "The error specified is not a valid Windows RPC error code."
  2093.  
  2094.          case MessageId == RPC_S_UUID_LOCAL_ONLY
  2095.               MessageText := "A UUID that is valid only on this computer has been allocated."
  2096.  
  2097.          case MessageId == RPC_S_SEC_PKG_ERROR
  2098.               MessageText := "A security package specific error occurred."
  2099.  
  2100.          case MessageId == RPC_S_NOT_CANCELLED
  2101.               MessageText := "Thread is not cancelled."
  2102.  
  2103.          case MessageId == RPC_X_INVALID_ES_ACTION
  2104.               MessageText := "Invalid operation on the encoding/decoding handle."
  2105.  
  2106.          case MessageId == RPC_X_WRONG_ES_VERSION
  2107.               MessageText := "Incompatible version of the serializing package."
  2108.  
  2109.          case MessageId == RPC_X_WRONG_STUB_VERSION
  2110.               MessageText := "Incompatible version of the RPC stub."
  2111.  
  2112.          case MessageId == RPC_S_GROUP_MEMBER_NOT_FOUND
  2113.               MessageText := "The group member was not found."
  2114.  
  2115.          case MessageId == EPT_S_CANT_CREATE
  2116.               MessageText := "The endpoint mapper database could not be created."
  2117.  
  2118.          case MessageId == RPC_S_INVALID_OBJECT
  2119.               MessageText := "The object universal unique identifier (UUID) is the nil UUID."
  2120.  
  2121.          case MessageId == ERROR_INVALID_TIME
  2122.               MessageText := "The specified time is invalid."
  2123.  
  2124.          case MessageId == ERROR_INVALID_FORM_NAME
  2125.               MessageText := "The specified Form name is invalid."
  2126.  
  2127.          case MessageId == ERROR_INVALID_FORM_SIZE
  2128.               MessageText := "The specified Form size is invalid"
  2129.  
  2130.          case MessageId == ERROR_ALREADY_WAITING
  2131.               MessageText := "The specified Printer handle is already being waited on"
  2132.  
  2133.          case MessageId == ERROR_PRINTER_DELETED
  2134.               MessageText := "The specified Printer has been deleted"
  2135.  
  2136.          case MessageId == ERROR_INVALID_PRINTER_STATE
  2137.               MessageText := "The state of the Printer is invalid"
  2138.  
  2139.          case MessageId == ERROR_PASSWORD_MUST_CHANGE
  2140.               MessageText := "The user must change his password before he logs on the first time."
  2141.  
  2142.          case MessageId == ERROR_DOMAIN_CONTROLLER_NOT_FOUND
  2143.               MessageText := "Could not find the domain controller for this domain."
  2144.  
  2145.          case MessageId == ERROR_ACCOUNT_LOCKED_OUT
  2146.               MessageText := "The referenced account is currently locked out and may not be logged on to."
  2147.  
  2148.          case MessageId == ERROR_NO_BROWSER_SERVERS_FOUND
  2149.               MessageText := "The list of servers for this workgroup is not currently available"
  2150.  
  2151. ///////////////////////////
  2152. //                       //
  2153. //   OpenGL Error Code   //
  2154. //                       //
  2155. ///////////////////////////
  2156.  
  2157.          case MessageId == ERROR_INVALID_PIXEL_FORMAT
  2158.               MessageText := "The pixel format is invalid."
  2159.  
  2160.          case MessageId == ERROR_BAD_DRIVER
  2161.               MessageText := "The specified driver is invalid."
  2162.  
  2163.          case MessageId == ERROR_INVALID_WINDOW_STYLE
  2164.               MessageText := "The window style or class attribute is invalid for this operation."
  2165.  
  2166.          case MessageId == ERROR_METAFILE_NOT_SUPPORTED
  2167.               MessageText := "The requested metafile operation is not supported."
  2168.  
  2169.          case MessageId == ERROR_TRANSFORM_NOT_SUPPORTED
  2170.               MessageText := "The requested transformation operation is not supported."
  2171.  
  2172.          case MessageId == ERROR_CLIPPING_NOT_SUPPORTED
  2173.               MessageText := "The requested clipping operation is not supported."
  2174.  
  2175.  
  2176. ////////////////////////////////////
  2177. //                                //
  2178. //     Win32 Spooler Error Codes  //
  2179. //                                //
  2180. //*//////////////////////////////////
  2181.  
  2182.          case MessageId == ERROR_UNKNOWN_PRINT_MONITOR
  2183.               MessageText := "The specified print monitor is unknown."
  2184.  
  2185.          case MessageId == ERROR_PRINTER_DRIVER_IN_USE
  2186.               MessageText := "The specified printer driver is currently in use."
  2187.  
  2188.          case MessageId == ERROR_SPOOL_FILE_NOT_FOUND
  2189.               MessageText := "The spool file was not found."
  2190.  
  2191.          case MessageId == ERROR_SPL_NO_STARTDOC
  2192.               MessageText := "A StartDocPrinter call was not issued."
  2193.  
  2194.          case MessageId == ERROR_SPL_NO_ADDJOB
  2195.               MessageText := "An AddJob call was not issued."
  2196.  
  2197.          case MessageId == ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED
  2198.               MessageText := "The specified print processor has already been installed."
  2199.  
  2200.          case MessageId == ERROR_PRINT_MONITOR_ALREADY_INSTALLED
  2201.               MessageText := "The specified print monitor has already been installed."
  2202.  
  2203. ////////////////////////////////////
  2204. //                                //
  2205. //     Wins Error Codes           //
  2206. //                                //
  2207. ////////////////////////////////////
  2208.  
  2209.          case MessageId == ERROR_WINS_INTERNAL
  2210.               MessageText := "WINS encountered an error while processing the command."
  2211.  
  2212.          case MessageId == ERROR_CAN_NOT_DEL_LOCAL_WINS
  2213.               MessageText := "The local WINS can not be deleted."
  2214.  
  2215.          case MessageId == ERROR_STATIC_INIT
  2216.               MessageText := "The importation from the file failed."
  2217.  
  2218.          case MessageId == ERROR_INC_BACKUP
  2219.               MessageText := "The backup Failed.  Was a full backup done before ?"
  2220.  
  2221.          case MessageId == ERROR_FULL_BACKUP
  2222.               MessageText := "The backup Failed.  Check the directory that you are backing the database to."
  2223.  
  2224.          case MessageId == ERROR_REC_NON_EXISTENT
  2225.               MessageText := "The name does not exist in the WINS database."
  2226.  
  2227.          case MessageId == ERROR_RPL_NOT_ALLOWED
  2228.               MessageText := "Replication with a non-configured partner is not allowed."
  2229.  
  2230.         otherwise
  2231.               MessageText := "Unknown Windows Error."
  2232.  
  2233.      endcase
  2234.    endif
  2235.  
  2236. return ( MessageText )
  2237.