home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-11-20 | 95.4 KB | 2,237 lines |
- //--------------------------------------------------------------
- //
- // WINERROR.PRG
- //
- // This file contains functions to retrieve information about
- // Windows error messages. The functions are modeled after the
- // other error number/message functions, such as dberror() and
- // dbmessage(). The two functions are:
- //
- // WINERROR() - Returns the most recent error number.
- // WINMESSAGE([<expN>]) - Returns the most recent error message.
- // If you pass a numeric parameter, it
- // returns the error message that matches
- // that error number.
- //
- // USAGE: (in a file)
- // SET PROCEDURE TO WINERROR.PRG ADDITIVE
- // X = WINERROR() && most recent error
- // Y = WINMESSAGE() && most recent message
- // Z = WINMESSAGE(5) && message for error number 5
- //
- //
- // Visual dBASE 7.0 Samples Group
- //
- // $Revision: 1.1 $
- //
- // Copyright (c) 1997, Borland International, Inc.
- // All rights reserved.
- //
- //--------------------------------------------------------------
-
-
- #include winerror.h
-
- function winerror
- //
- // Returns the most recent Windows error.
- //
- if type('GetLastError') = 'U'
- extern clong GetLastError() kernel32
- endif
- return GetLastError()
-
- function WinMessage (MessageId)
- //
- // Returns the text of the last Windows error.
- // If you pass an error number, it returns the text for that
- // particular error number.
- //
-
- local MessageText
- MessageText = ""
-
- if pcount() = 0
- MessageId = winerror()
- endif
-
- do case
- case MessageId == ERROR_SUCCESS
- MessageText := "The operation completed successfully."
-
- case MessageId == ERROR_INVALID_FUNCTION
- MessageText := "Incorrect function."
-
- case MessageId == ERROR_FILE_NOT_FOUND
- MessageText := "The system cannot find the file specified."
-
- case MessageId == ERROR_PATH_NOT_FOUND
- MessageText := "The system cannot find the path specified."
-
- case MessageId == ERROR_TOO_MANY_OPEN_FILES
- MessageText := "The system cannot open the file."
-
- case MessageId == ERROR_ACCESS_DENIED
- MessageText := "Access is denied."
-
- case MessageId == ERROR_INVALID_HANDLE
- MessageText := "The handle is invalid."
-
- case MessageId == ERROR_ARENA_TRASHED
- MessageText := "The storage control blocks were destroyed."
-
- case MessageId == ERROR_NOT_ENOUGH_MEMORY
- MessageText := "Not enough storage is available to process this command."
-
- case MessageId == ERROR_INVALID_BLOCK
- MessageText := "The storage control block address is invalid."
-
- case MessageId == ERROR_BAD_ENVIRONMENT
- MessageText := "The environment is incorrect."
-
- case MessageId == ERROR_BAD_FORMAT
- MessageText := "An attempt was made to load a program with an" + ;
- " incorrect format."
-
- case MessageId == ERROR_INVALID_ACCESS
- MessageText := "The access code is invalid."
-
- case MessageId == ERROR_INVALID_DATA
- MessageText := "The data is invalid."
-
- case MessageId == ERROR_OUTOFMEMORY
- MessageText := "Not enough storage is available to complete this operation."
-
- case MessageId == ERROR_INVALID_DRIVE
- MessageText := "The system cannot find the drive specified."
-
- case MessageId == ERROR_CURRENT_DIRECTORY
- MessageText := "The directory cannot be removed."
-
- case MessageId == ERROR_NOT_SAME_DEVICE
- MessageText := "The system cannot move the file" + ;
- " to a different disk drive."
-
- case MessageId == ERROR_NO_MORE_FILES
- MessageText := "There are no more files."
-
- case MessageId == ERROR_WRITE_PROTECT
- MessageText := "The media is write protected."
-
- case MessageId == ERROR_BAD_UNIT
- MessageText := "The system cannot find the device specified."
-
- case MessageId == ERROR_NOT_READY
- MessageText := "The device is not ready."
-
- case MessageId == ERROR_BAD_COMMAND
- MessageText := "The device does not recognize the command."
-
- case MessageId == ERROR_CRC
- MessageText := "Data error (cyclic redundancy check)"
-
- case MessageId == ERROR_BAD_LENGTH
- MessageText := "The program issued a command but the" + ;
- " command length is incorrect."
-
- case MessageId == ERROR_SEEK
- MessageText := "The drive cannot locate a specific" + ;
- " area or track on the disk."
-
- case MessageId == ERROR_NOT_DOS_DISK
- MessageText := "The specified disk or diskette cannot be accessed."
-
- case MessageId == ERROR_SECTOR_NOT_FOUND
- MessageText := "The drive cannot find the sector requested."
-
- case MessageId == ERROR_OUT_OF_PAPER
- MessageText := "The printer is out of paper."
-
- case MessageId == ERROR_WRITE_FAULT
- MessageText := "The system cannot write to the specified device."
-
- case MessageId == ERROR_READ_FAULT
- MessageText := "The system cannot read from the specified device."
-
- case MessageId == ERROR_GEN_FAILURE
- MessageText := "A device attached to the system is not functioning."
-
- case MessageId == ERROR_SHARING_VIOLATION
- MessageText := "The process cannot access the file because" + ;
- " it is being used by another process."
-
- case MessageId == ERROR_LOCK_VIOLATION
- MessageText := "The process cannot access the file because" + ;
- " another process has locked a portion of the file."
-
- case MessageId == ERROR_WRONG_DISK
- MessageText := "The wrong diskette is in the drive." + ;
- " Insert %2 (Volume Serial Number: %3)" + ;
- " into drive %1."
-
- case MessageId == ERROR_SHARING_BUFFER_EXCEEDED
- MessageText := "Too many files opened for sharing."
-
- case MessageId == ERROR_HANDLE_EOF
- MessageText := "Reached end of file."
-
- case MessageId == ERROR_HANDLE_DISK_FULL
- MessageText := "The disk is full."
-
- case MessageId == ERROR_NOT_SUPPORTED
- MessageText := "The network request is not supported."
-
- case MessageId == ERROR_REM_NOT_LIST
- MessageText := "The remote computer is not available."
-
- case MessageId == ERROR_DUP_NAME
- MessageText := "A duplicate name exists on the network."
-
- case MessageId == ERROR_BAD_NETPATH
- MessageText := "The network path was not found."
-
- case MessageId == ERROR_NETWORK_BUSY
- MessageText := "The network is busy."
-
- case MessageId == ERROR_DEV_NOT_EXIST
- MessageText := "The specified network resource or device is no longer" + ;
- " available."
-
- case MessageId == ERROR_TOO_MANY_CMDS
- MessageText := "The network BIOS command limit has been reached."
-
- case MessageId == ERROR_ADAP_HDW_ERR
- MessageText := "A network adapter hardware error occurred."
-
- case MessageId == ERROR_BAD_NET_RESP
- MessageText := "The specified server cannot perform the requested" + ;
- " operation."
-
- case MessageId == ERROR_UNEXP_NET_ERR
- MessageText := "An unexpected network error occurred."
-
- case MessageId == ERROR_BAD_REM_ADAP
- MessageText := "The remote adapter is not compatible."
-
- case MessageId == ERROR_PRINTQ_FULL
- MessageText := "The printer queue is full."
-
- case MessageId == ERROR_NO_SPOOL_SPACE
- MessageText := "Space to store the file waiting to be printed is" + ;
- " not available on the server."
-
- case MessageId == ERROR_PRINT_CANCELLED
- MessageText := "Your file waiting to be printed was deleted."
-
- case MessageId == ERROR_NETNAME_DELETED
- MessageText := "The specified network name is no longer available."
-
- case MessageId == ERROR_NETWORK_ACCESS_DENIED
- MessageText := "Network access is denied."
-
- case MessageId == ERROR_BAD_DEV_TYPE
- MessageText := "The network resource type is not correct."
-
- case MessageId == ERROR_BAD_NET_NAME
- MessageText := "The network name cannot be found."
-
- case MessageId == ERROR_TOO_MANY_NAMES
- MessageText := "The name limit for the local computer network" + ;
- " adapter card was exceeded."
-
- case MessageId == ERROR_TOO_MANY_SESS
- MessageText := "The network BIOS session limit was exceeded."
-
- case MessageId == ERROR_SHARING_PAUSED
- MessageText := "The remote server has been paused or is in the" + ;
- " process of being started."
-
- case MessageId == ERROR_REQ_NOT_ACCEP
- MessageText := "No more connections can be made to this remote computer at this time" + ;
- " because there are already as many connections as the computer can accept."
-
- case MessageId == ERROR_REDIR_PAUSED
- MessageText := "The specified printer or disk device has been paused."
-
- case MessageId == ERROR_FILE_EXISTS
- MessageText := "The file exists."
-
- case MessageId == ERROR_CANNOT_MAKE
- MessageText := "The directory or file cannot be created."
-
- case MessageId == ERROR_FAIL_I24
- MessageText := "Fail on INT 24"
-
- case MessageId == ERROR_OUT_OF_STRUCTURES
- MessageText := "Storage to process this request is not available."
-
- case MessageId == ERROR_ALREADY_ASSIGNED
- MessageText := "The local device name is already in use."
-
- case MessageId == ERROR_INVALID_PASSWORD
- MessageText := "The specified network password is not correct."
-
- case MessageId == ERROR_INVALID_PARAMETER
- MessageText := "The parameter is incorrect."
-
- case MessageId == ERROR_NET_WRITE_FAULT
- MessageText := "A write fault occurred on the network."
-
- case MessageId == ERROR_NO_PROC_SLOTS
- MessageText := "The system cannot start another process at" + ;
- " this time."
-
- case MessageId == ERROR_TOO_MANY_SEMAPHORES
- MessageText := "Cannot create another system semaphore."
-
- case MessageId == ERROR_EXCL_SEM_ALREADY_OWNED
- MessageText := "The exclusive semaphore is owned by another process."
-
- case MessageId == ERROR_SEM_IS_SET
- MessageText := "The semaphore is set and cannot be closed."
-
- case MessageId == ERROR_TOO_MANY_SEM_REQUESTS
- MessageText := "The semaphore cannot be set again."
-
- case MessageId == ERROR_INVALID_AT_INTERRUPT_TIME
- MessageText := "Cannot request exclusive semaphores at interrupt time."
-
- case MessageId == ERROR_SEM_OWNER_DIED
- MessageText := "The previous ownership of this semaphore has ended."
-
- case MessageId == ERROR_SEM_USER_LIMIT
- MessageText := "Insert the diskette for drive %1."
-
- case MessageId == ERROR_DISK_CHANGE
- MessageText := "Program stopped because alternate diskette was not inserted."
-
- case MessageId == ERROR_DRIVE_LOCKED
- MessageText := "The disk is in use or locked by" + ;
- " another process."
-
- case MessageId == ERROR_BROKEN_PIPE
- MessageText := "The pipe has been ended."
-
- case MessageId == ERROR_OPEN_FAILED
- MessageText := "The system cannot open the" + ;
- " device or file specified."
-
- case MessageId == ERROR_BUFFER_OVERFLOW
- MessageText := "The file name is too long."
-
- case MessageId == ERROR_DISK_FULL
- MessageText := "There is not enough space on the disk."
-
- case MessageId == ERROR_NO_MORE_SEARCH_HANDLES
- MessageText := "No more internal file identifiers available."
-
- case MessageId == ERROR_INVALID_TARGET_HANDLE
- MessageText := "The target internal file identifier is incorrect."
-
- case MessageId == ERROR_INVALID_CATEGORY
- MessageText := "The IOCTL call made by the application program is" + ;
- " not correct."
-
- case MessageId == ERROR_INVALID_VERIFY_SWITCH
- MessageText := "The verify-on-write switch parameter value is not" + ;
- " correct."
-
- case MessageId == ERROR_BAD_DRIVER_LEVEL
- MessageText := "The system does not support the command requested."
-
- case MessageId == ERROR_CALL_NOT_IMPLEMENTED
- MessageText := "This function is only valid in Win32 mode."
-
- case MessageId == ERROR_SEM_TIMEOUT
- MessageText := "The semaphore timeout period has expired."
-
- case MessageId == ERROR_INSUFFICIENT_BUFFER
- MessageText := "The data area passed to a system call is too" + ;
- " small."
-
- case MessageId == ERROR_INVALID_NAME
- MessageText := "The filename, directory name, or volume label syntax is incorrect."
-
- case MessageId == ERROR_INVALID_LEVEL
- MessageText := "The system call level is not correct."
-
- case MessageId == ERROR_NO_VOLUME_LABEL
- MessageText := "The disk has no volume label."
-
- case MessageId == ERROR_MOD_NOT_FOUND
- MessageText := "The specified module could not be found."
-
- case MessageId == ERROR_PROC_NOT_FOUND
- MessageText := "The specified procedure could not be found."
-
- case MessageId == ERROR_WAIT_NO_CHILDREN
- MessageText := "There are no child processes to wait for."
-
- case MessageId == ERROR_CHILD_NOT_COMPLETE
- MessageText := "The %1 application cannot be run in Win32 mode."
-
- case MessageId == ERROR_DIRECT_ACCESS_HANDLE
- MessageText := "Attempt to use a file handle to an open disk partition for an" + ;
- " operation other than raw disk I/O."
-
- case MessageId == ERROR_NEGATIVE_SEEK
- MessageText := "An attempt was made to move the file pointer before the beginning of the file."
-
- case MessageId == ERROR_SEEK_ON_DEVICE
- MessageText := "The file pointer cannot be set on the specified device or file."
-
- case MessageId == ERROR_IS_JOIN_TARGET
- MessageText := "A JOIN or SUBST command" + ;
- " cannot be used for a drive that" + ;
- " contains previously joined drives."
-
- case MessageId == ERROR_IS_JOINED
- MessageText := "An attempt was made to use a" + ;
- " JOIN or SUBST command on a drive that has" + ;
- " already been joined."
-
- case MessageId == ERROR_IS_SUBSTED
- MessageText := "An attempt was made to use a" + ;
- " JOIN or SUBST command on a drive that has" + ;
- " already been substituted."
-
- case MessageId == ERROR_NOT_JOINED
- MessageText := "The system tried to delete" + ;
- " the JOIN of a drive that is not joined."
-
- case MessageId == ERROR_NOT_SUBSTED
- MessageText := "The system tried to delete the" + ;
- " substitution of a drive that is not substituted."
-
- case MessageId == ERROR_JOIN_TO_JOIN
- MessageText := "The system tried to join a drive" + ;
- " to a directory on a joined drive."
-
- case MessageId == ERROR_SUBST_TO_SUBST
- MessageText := "The system tried to substitute a" + ;
- " drive to a directory on a substituted drive."
-
- case MessageId == ERROR_JOIN_TO_SUBST
- MessageText := "The system tried to join a drive to" + ;
- " a directory on a substituted drive."
-
- case MessageId == ERROR_SUBST_TO_JOIN
- MessageText := "The system tried to SUBST a drive" + ;
- " to a directory on a joined drive."
-
- case MessageId == ERROR_BUSY_DRIVE
- MessageText := "The system cannot perform a JOIN or SUBST at this time."
-
- case MessageId == ERROR_SAME_DRIVE
- MessageText := "The system cannot join or substitute a" + ;
- " drive to or for a directory on the same drive."
-
- case MessageId == ERROR_DIR_NOT_ROOT
- MessageText := "The directory is not a subdirectory of the root directory."
-
- case MessageId == ERROR_DIR_NOT_EMPTY
- MessageText := "The directory is not empty."
-
- case MessageId == ERROR_IS_SUBST_PATH
- MessageText := "The path specified is being used in" + ;
- " a substitute."
-
- case MessageId == ERROR_IS_JOIN_PATH
- MessageText := "Not enough resources are available to" + ;
- " process this command."
-
- case MessageId == ERROR_PATH_BUSY
- MessageText := "The path specified cannot be used at this time."
-
- case MessageId == ERROR_IS_SUBST_TARGET
- MessageText := "An attempt was made to join" + ;
- " or substitute a drive for which a directory" + ;
- " on the drive is the target of a previous" + ;
- " substitute."
-
- case MessageId == ERROR_SYSTEM_TRACE
- MessageText := "System trace information was not specified in your" + ;
- " CONFIG.SYS file, or tracing is disallowed."
-
- case MessageId == ERROR_INVALID_EVENT_COUNT
- MessageText := "The number of specified semaphore events for" + ;
- " DosMuxSemWait is not correct."
-
- case MessageId == ERROR_TOO_MANY_MUXWAITERS
- MessageText := "DosMuxSemWait did not execute; too many semaphores" + ;
- " are already set."
-
- case MessageId == ERROR_INVALID_LIST_FORMAT
- MessageText := "The DosMuxSemWait list is not correct."
-
- case MessageId == ERROR_LABEL_TOO_LONG
- MessageText := "The volume label you entered exceeds the label character" + ;
- " limit of the target file system."
-
- case MessageId == ERROR_TOO_MANY_TCBS
- MessageText := "Cannot create another thread."
-
- case MessageId == ERROR_SIGNAL_REFUSED
- MessageText := "The recipient process has refused the signal."
-
- case MessageId == ERROR_DISCARDED
- MessageText := "The segment is already discarded and cannot be locked."
-
- case MessageId == ERROR_NOT_LOCKED
- MessageText := "The segment is already unlocked."
-
- case MessageId == ERROR_BAD_THREADID_ADDR
- MessageText := "The address for the thread ID is not correct."
-
- case MessageId == ERROR_BAD_ARGUMENTS
- MessageText := "The argument string passed to DosExecPgm is not correct."
-
- case MessageId == ERROR_BAD_PATHNAME
- MessageText := "The specified path is invalid."
-
- case MessageId == ERROR_SIGNAL_PENDING
- MessageText := "A signal is already pending."
-
- case MessageId == ERROR_MAX_THRDS_REACHED
- MessageText := "No more threads can be created in the system."
-
- case MessageId == ERROR_LOCK_FAILED
- MessageText := "Unable to lock a region of a file."
-
- case MessageId == ERROR_BUSY
- MessageText := "The requested resource is in use."
-
- case MessageId == ERROR_CANCEL_VIOLATION
- MessageText := "A lock request was not outstanding for the supplied cancel region."
-
- case MessageId == ERROR_ATOMIC_LOCKS_NOT_SUPPORTED
- MessageText := "The file system does not support atomic changes to the lock type."
-
- case MessageId == ERROR_INVALID_SEGMENT_NUMBER
- MessageText := "The system detected a segment number that was not correct."
-
- case MessageId == ERROR_INVALID_ORDINAL
- MessageText := "The operating system cannot run %1."
-
- case MessageId == ERROR_ALREADY_EXISTS
- MessageText := "Cannot create a file when that file already exists."
-
- case MessageId == ERROR_INVALID_FLAG_NUMBER
- MessageText := "The flag passed is not correct."
-
- case MessageId == ERROR_SEM_NOT_FOUND
- MessageText := "The specified system semaphore name was not found."
-
- case MessageId == ERROR_INVALID_STARTING_CODESEG
- MessageText := "The operating system cannot run %1."
-
- case MessageId == ERROR_INVALID_STACKSEG
- MessageText := "The operating system cannot run %1."
-
- case MessageId == ERROR_INVALID_MODULETYPE
- MessageText := "The operating system cannot run %1."
-
- case MessageId == ERROR_INVALID_EXE_SIGNATURE
- MessageText := "Cannot run %1 in Win32 mode."
-
- case MessageId == ERROR_EXE_MARKED_INVALID
- MessageText := "The operating system cannot run %1."
-
- case MessageId == ERROR_BAD_EXE_FORMAT
- MessageText := "%1 is not a valid Win32 application."
-
- case MessageId == ERROR_ITERATED_DATA_EXCEEDS_64k
- MessageText := "The operating system cannot run %1."
-
- case MessageId == ERROR_INVALID_MINALLOCSIZE
- MessageText := "The operating system cannot run %1."
-
- case MessageId == ERROR_DYNLINK_FROM_INVALID_RING
- MessageText := "The operating system cannot run this" + ;
- " application program."
-
- case MessageId == ERROR_IOPL_NOT_ENABLED
- MessageText := "The operating system is not presently" + ;
- " configured to run this application."
-
- case MessageId == ERROR_INVALID_SEGDPL
- MessageText := "The operating system cannot run %1."
-
- case MessageId == ERROR_AUTODATASEG_EXCEEDS_64k
- MessageText := "The operating system cannot run this" + ;
- " application program."
-
- case MessageId == ERROR_RING2SEG_MUST_BE_MOVABLE
- MessageText := "The code segment cannot be greater than or equal to 64KB."
-
- case MessageId == ERROR_RELOC_CHAIN_XEEDS_SEGLIM
- MessageText := "The operating system cannot run %1."
-
- case MessageId == ERROR_INFLOOP_IN_RELOC_CHAIN
- MessageText := "The operating system cannot run %1."
-
- case MessageId == ERROR_ENVVAR_NOT_FOUND
- MessageText := "The system could not find the environment" + ;
- " option that was entered."
-
- case MessageId == ERROR_NO_SIGNAL_SENT
- MessageText := "No process in the command subtree has a" + ;
- " signal handler."
-
- case MessageId == ERROR_FILENAME_EXCED_RANGE
- MessageText := "The filename or extension is too long."
-
- case MessageId == ERROR_RING2_STACK_IN_USE
- MessageText := "The ring 2 stack is in use."
-
- case MessageId == ERROR_META_EXPANSION_TOO_LONG
- MessageText := "The global filename characters, * or ?, are entered" + ;
- " incorrectly or too many global filename characters are specified."
-
- case MessageId == ERROR_INVALID_SIGNAL_NUMBER
- MessageText := "The signal being posted is not correct."
-
- case MessageId == ERROR_THREAD_1_INACTIVE
- MessageText := "The signal handler cannot be set."
-
- case MessageId == ERROR_LOCKED
- MessageText := "The segment is locked and cannot be reallocated."
-
- case MessageId == ERROR_TOO_MANY_MODULES
- MessageText := "Too many dynamic link modules are attached to this" + ;
- " program or dynamic link module."
-
- case MessageId == ERROR_NESTING_NOT_ALLOWED
- MessageText := "Can't nest calls to LoadModule."
-
- case MessageId == ERROR_BAD_PIPE
- MessageText := "The pipe state is invalid."
-
- case MessageId == ERROR_PIPE_BUSY
- MessageText := "All pipe instances are busy."
-
- case MessageId == ERROR_NO_DATA
- MessageText := "The pipe is being closed."
-
- case MessageId == ERROR_PIPE_NOT_CONNECTED
- MessageText := "No process is on the other end of the pipe."
-
- case MessageId == ERROR_MORE_DATA
- MessageText := "More data is available."
-
- case MessageId == ERROR_VC_DISCONNECTED
- MessageText := "The session was cancelled."
-
- case MessageId == ERROR_INVALID_EA_NAME
- MessageText := "The specified extended attribute name was invalid."
-
- case MessageId == ERROR_EA_LIST_INCONSISTENT
- MessageText := "The extended attributes are inconsistent."
-
- case MessageId == ERROR_NO_MORE_ITEMS
- MessageText := "No more data is available."
-
- case MessageId == ERROR_CANNOT_COPY
- MessageText := "The Copy API cannot be used."
-
- case MessageId == ERROR_DIRECTORY
- MessageText := "The directory name is invalid."
-
- case MessageId == ERROR_EAS_DIDNT_FIT
- MessageText := "The extended attributes did not fit in the buffer."
-
- case MessageId == ERROR_EA_FILE_CORRUPT
- MessageText := "The extended attribute file on the mounted file system is corrupt."
-
- case MessageId == ERROR_EA_TABLE_FULL
- MessageText := "The extended attribute table file is full."
-
- case MessageId == ERROR_INVALID_EA_HANDLE
- MessageText := "The specified extended attribute handle is invalid."
-
- case MessageId == ERROR_EAS_NOT_SUPPORTED
- MessageText := "The mounted file system does not support extended attributes."
-
- case MessageId == ERROR_NOT_OWNER
- MessageText := "Attempt to release mutex not owned by caller."
-
- case MessageId == ERROR_TOO_MANY_POSTS
- MessageText := "Too many posts were made to a semaphore."
-
- case MessageId == ERROR_PARTIAL_COPY
- MessageText := "Only part of a Read/WriteProcessMemory request was completed."
-
- case MessageId == ERROR_MR_MID_NOT_FOUND
- MessageText := "The system cannot find message for message number 0x%1" + ;
- " in message file for %2."
-
- case MessageId == ERROR_INVALID_ADDRESS
- MessageText := "Attempt to access invalid address."
-
- case MessageId == ERROR_ARITHMETIC_OVERFLOW
- MessageText := "Arithmetic result exceeded 32 bits."
-
- case MessageId == ERROR_PIPE_CONNECTED
- MessageText := "There is a process on other end of the pipe."
-
- case MessageId == ERROR_PIPE_LISTENING
- MessageText := "Waiting for a process to open the other end of the pipe."
-
- case MessageId == ERROR_EA_ACCESS_DENIED
- MessageText := "Access to the extended attribute was denied."
-
- case MessageId == ERROR_OPERATION_ABORTED
- MessageText := "The I/O operation has been aborted because of either a thread exit" + ;
- " or an application request."
-
- case MessageId == ERROR_IO_INCOMPLETE
- MessageText := "Overlapped I/O event is not in a signalled state."
-
- case MessageId == ERROR_IO_PENDING
- MessageText := "Overlapped I/O operation is in progress."
-
- case MessageId == ERROR_NOACCESS
- MessageText := "Invalid access to memory location."
-
- case MessageId == ERROR_SWAPERROR
- MessageText := "Error performing inpage operation."
-
- case MessageId == ERROR_STACK_OVERFLOW
- MessageText := "Recursion too deep, stack overflowed."
-
- case MessageId == ERROR_INVALID_MESSAGE
- MessageText := "The window cannot act on the sent message."
-
- case MessageId == ERROR_CAN_NOT_COMPLETE
- MessageText := "Cannot complete this function."
-
- case MessageId == ERROR_INVALID_FLAGS
- MessageText := "Invalid flags."
-
- case MessageId == ERROR_UNRECOGNIZED_VOLUME
- MessageText := "The volume does not contain a recognized file system." + ;
- " Please make sure that all required file system drivers are loaded and that the" + ;
- " volume is not corrupt."
-
- case MessageId == ERROR_FILE_INVALID
- MessageText := "The volume for a file has been externally altered such that the" + ;
- " opened file is no longer valid."
-
- case MessageId == ERROR_FULLSCREEN_MODE
- MessageText := "The requested operation cannot be performed in full-screen mode."
-
- case MessageId == ERROR_NO_TOKEN
- MessageText := "An attempt was made to reference a token that does not exist."
-
- case MessageId == ERROR_BADDB
- MessageText := "The configuration registry database is corrupt."
-
- endcase
-
- if empty(MessageText)
- do case
- case MessageId == ERROR_BADKEY
- MessageText := "The configuration registry key is invalid."
-
- case MessageId == ERROR_CANTOPEN
- MessageText := "The configuration registry key could not be opened."
-
- case MessageId == ERROR_CANTREAD
- MessageText := "The configuration registry key could not be read."
-
- case MessageId == ERROR_CANTWRITE
- MessageText := "The configuration registry key could not be written."
-
- case MessageId == ERROR_REGISTRY_RECOVERED
- MessageText := "One of the files in the Registry database had to be recovered" + ;
- " by use of a log or alternate copy. The recovery was successful."
-
- case MessageId == ERROR_REGISTRY_CORRUPT
- MessageText := "The Registry is corrupt. The structure of one of the files that contains" + ;
- " Registry data is corrupt, or the system's image of the file in memory" + ;
- " is corrupt, or the file could not be recovered because the alternate" + ;
- " copy or log was absent or corrupt."
-
- case MessageId == ERROR_REGISTRY_IO_FAILED
- MessageText := "An I/O operation initiated by the Registry failed unrecoverably." + ;
- " The Registry could not read in, or write out, or flush, one of the files" + ;
- " that contain the system's image of the Registry."
-
- case MessageId == ERROR_NOT_REGISTRY_FILE
- MessageText := "The system has attempted to load or restore a file into the Registry, but the" + ;
- " specified file is not in a Registry file format."
-
- case MessageId == ERROR_KEY_DELETED
- MessageText := "Illegal operation attempted on a Registry key which has been marked for deletion."
-
- case MessageId == ERROR_NO_LOG_SPACE
- MessageText := "System could not allocate the required space in a Registry log."
-
- case MessageId == ERROR_KEY_HAS_CHILDREN
- MessageText := "Cannot create a symbolic link in a Registry key that already" + ;
- " has subkeys or values."
-
- case MessageId == ERROR_CHILD_MUST_BE_VOLATILE
- MessageText := "Cannot create a stable subkey under a volatile parent key."
-
- case MessageId == ERROR_NOTIFY_ENUM_DIR
- MessageText := "A notify change request is being completed and the information" + ;
- " is not being returned in the caller's buffer. The caller now" + ;
- " needs to enumerate the files to find the changes."
-
- case MessageId == ERROR_DEPENDENT_SERVICES_RUNNING
- MessageText := "A stop control has been sent to a service which other running services" + ;
- " are dependent on."
-
- case MessageId == ERROR_INVALID_SERVICE_CONTROL
- MessageText := "The requested control is not valid for this service"
-
- case MessageId == ERROR_SERVICE_REQUEST_TIMEOUT
- MessageText := "The service did not respond to the start or control request in a timely" + ;
- " fashion."
-
- case MessageId == ERROR_SERVICE_NO_THREAD
- MessageText := "A thread could not be created for the service."
-
- case MessageId == ERROR_SERVICE_DATABASE_LOCKED
- MessageText := "The service database is locked."
-
- case MessageId == ERROR_SERVICE_ALREADY_RUNNING
- MessageText := "An instance of the service is already running."
-
- case MessageId == ERROR_INVALID_SERVICE_ACCOUNT
- MessageText := "The account name is invalid or does not exist."
-
- case MessageId == ERROR_SERVICE_DISABLED
- MessageText := "The specified service is disabled and cannot be started."
-
- case MessageId == ERROR_CIRCULAR_DEPENDENCY
- MessageText := "Circular service dependency was specified."
-
- case MessageId == ERROR_SERVICE_DOES_NOT_EXIST
- MessageText := "The specified service does not exist as an installed service."
-
- case MessageId == ERROR_SERVICE_CANNOT_ACCEPT_CTRL
- MessageText := "The service cannot accept control messages at this time."
-
- case MessageId == ERROR_SERVICE_NOT_ACTIVE
- MessageText := "The service has not been started."
-
- case MessageId == ERROR_FAILED_SERVICE_CONTROLLER_CONNECT
- MessageText := "The service process could not connect to the service controller."
-
- case MessageId == ERROR_EXCEPTION_IN_SERVICE
- MessageText := "An exception occurred in the service when handling the control request."
-
- case MessageId == ERROR_DATABASE_DOES_NOT_EXIST
- MessageText := "The database specified does not exist."
-
- case MessageId == ERROR_SERVICE_SPECIFIC_ERROR
- MessageText := "The service has returned a service-specific error code."
-
- case MessageId == ERROR_PROCESS_ABORTED
- MessageText := "The process terminated unexpectedly."
-
- case MessageId == ERROR_SERVICE_DEPENDENCY_FAIL
- MessageText := "The dependency service or group failed to start."
-
- case MessageId == ERROR_SERVICE_LOGON_FAILED
- MessageText := "The service did not start due to a logon failure."
-
- case MessageId == ERROR_SERVICE_START_HANG
- MessageText := "After starting, the service hung in a start-pending state."
-
- case MessageId == ERROR_INVALID_SERVICE_LOCK
- MessageText := "The specified service database lock is invalid."
-
- case MessageId == ERROR_SERVICE_MARKED_FOR_DELETE
- MessageText := "The specified service has been marked for deletion."
-
- case MessageId == ERROR_SERVICE_EXISTS
- MessageText := "The specified service already exists."
-
- case MessageId == ERROR_ALREADY_RUNNING_LKG
- MessageText := "The system is currently running with the last-known-good configuration."
-
- case MessageId == ERROR_SERVICE_DEPENDENCY_DELETED
- MessageText := "The dependency service does not exist or has been marked for" + ;
- " deletion."
-
- case MessageId == ERROR_BOOT_ALREADY_ACCEPTED
- MessageText := "The current boot has already been accepted for use as the" + ;
- " last-known-good control set."
-
- case MessageId == ERROR_SERVICE_NEVER_STARTED
- MessageText := "No attempts to start the service have been made since the last boot."
-
- case MessageId == ERROR_DUPLICATE_SERVICE_NAME
- MessageText := "The name is already in use as either a service name or a service display" + ;
- " name."
-
- case MessageId == ERROR_END_OF_MEDIA
- MessageText := "The physical end of the tape has been reached."
-
- case MessageId == ERROR_FILEMARK_DETECTED
- MessageText := "A tape access reached a filemark."
-
- case MessageId == ERROR_BEGINNING_OF_MEDIA
- MessageText := "Beginning of tape or partition was encountered."
-
- case MessageId == ERROR_SETMARK_DETECTED
- MessageText := "A tape access reached the end of a set of files."
-
- case MessageId == ERROR_NO_DATA_DETECTED
- MessageText := "No more data is on the tape."
-
- case MessageId == ERROR_PARTITION_FAILURE
- MessageText := "Tape could not be partitioned."
-
- case MessageId == ERROR_INVALID_BLOCK_LENGTH
- MessageText := "When accessing a new tape of a multivolume partition, the current" + ;
- " blocksize is incorrect."
-
- case MessageId == ERROR_DEVICE_NOT_PARTITIONED
- MessageText := "Tape partition information could not be found when loading a tape."
-
- case MessageId == ERROR_UNABLE_TO_LOCK_MEDIA
- MessageText := "Unable to lock the media eject mechanism."
-
- case MessageId == ERROR_UNABLE_TO_UNLOAD_MEDIA
- MessageText := "Unable to unload the media."
-
- case MessageId == ERROR_MEDIA_CHANGED
- MessageText := "Media in drive may have changed."
-
- case MessageId == ERROR_BUS_RESET
- MessageText := "The I/O bus was reset."
-
- case MessageId == ERROR_NO_MEDIA_IN_DRIVE
- MessageText := "No media in drive."
-
- case MessageId == ERROR_NO_UNICODE_TRANSLATION
- MessageText := "No mapping for the Unicode character exists in the target multi-byte code page."
-
- case MessageId == ERROR_DLL_INIT_FAILED
- MessageText := "A dynamic link library (DLL) initialization routine failed."
-
- case MessageId == ERROR_SHUTDOWN_IN_PROGRESS
- MessageText := "A system shutdown is in progress."
-
- case MessageId == ERROR_NO_SHUTDOWN_IN_PROGRESS
- MessageText := "Unable to abort the system shutdown because no shutdown was in progress."
-
- case MessageId == ERROR_IO_DEVICE
- MessageText := "The request could not be performed because of an I/O device error."
-
- case MessageId == ERROR_SERIAL_NO_DEVICE
- MessageText := "No serial device was successfully initialized. The serial driver will unload."
-
- case MessageId == ERROR_IRQ_BUSY
- MessageText := "Unable to open a device that was sharing an interrupt request (IRQ)" + ;
- " with other devices. At least one other device that uses that IRQ" + ;
- " was already opened."
-
- case MessageId == ERROR_MORE_WRITES
- MessageText := "A serial I/O operation was completed by another write to the serial port." + ;
- " (The IOCTL_SERIAL_XOFF_COUNTER reached zero.)"
-
- case MessageId == ERROR_COUNTER_TIMEOUT
- MessageText := "A serial I/O operation completed because the time-out period expired." + ;
- " (The IOCTL_SERIAL_XOFF_COUNTER did not reach zero.)"
-
- case MessageId == ERROR_FLOPPY_ID_MARK_NOT_FOUND
- MessageText := "No ID address mark was found on the floppy disk."
-
- case MessageId == ERROR_FLOPPY_WRONG_CYLINDER
- MessageText := "Mismatch between the floppy disk sector ID field and the floppy disk" + ;
- " controller track address."
-
- case MessageId == ERROR_FLOPPY_UNKNOWN_ERROR
- MessageText := "The floppy disk controller reported an error that is not recognized" + ;
- " by the floppy disk driver."
-
- case MessageId == ERROR_FLOPPY_BAD_REGISTERS
- MessageText := "The floppy disk controller returned inconsistent results in its registers."
-
- case MessageId == ERROR_DISK_RECALIBRATE_FAILED
- MessageText := "While accessing the hard disk, a recalibrate operation failed, even after retries."
-
- case MessageId == ERROR_DISK_OPERATION_FAILED
- MessageText := "While accessing the hard disk, a disk operation failed even after retries."
-
- case MessageId == ERROR_DISK_RESET_FAILED
- MessageText := "While accessing the hard disk, a disk controller reset was needed, but" + ;
- " even that failed."
-
- case MessageId == ERROR_EOM_OVERFLOW
- MessageText := "Physical end of tape encountered."
-
- case MessageId == ERROR_NOT_ENOUGH_SERVER_MEMORY
- MessageText := "Not enough server storage is available to process this command."
-
- case MessageId == ERROR_POSSIBLE_DEADLOCK
- MessageText := "A potential deadlock condition has been detected."
-
- case MessageId == ERROR_MAPPED_ALIGNMENT
- MessageText := "The base address or the file offset specified does not have the proper" + ;
- " alignment."
-
- case MessageId == ERROR_SET_POWER_STATE_VETOED
- MessageText := "An attempt to change the system power state was vetoed by another" + ;
- " application or driver."
-
- case MessageId == ERROR_SET_POWER_STATE_FAILED
- MessageText := "The system BIOS failed an attempt to change the system power state."
-
- case MessageId == ERROR_OLD_WIN_VERSION
- MessageText := "The specified program requires a newer version of Windows."
-
- case MessageId == ERROR_APP_WRONG_OS
- MessageText := "The specified program is not a Windows or MS-DOS program."
-
- case MessageId == ERROR_SINGLE_INSTANCE_APP
- MessageText := "Cannot start more than one instance of the specified program."
-
- case MessageId == ERROR_RMODE_APP
- MessageText := "The specified program was written for an older version of Windows."
-
- case MessageId == ERROR_INVALID_DLL
- MessageText := "One of the library files needed to run this application is damaged."
-
- case MessageId == ERROR_NO_ASSOCIATION
- MessageText := "No application is associated with the specified file for this operation."
-
- case MessageId == ERROR_DDE_FAIL
- MessageText := "An error occurred in sending the command to the application."
-
- case MessageId == ERROR_DLL_NOT_FOUND
- MessageText := "One of the library files needed to run this application cannot be found."
-
-
- ///////////////////////////
- // //
- // Winnet32 Status Codes //
- // //
- ///////////////////////////
-
-
- case MessageId == ERROR_BAD_USERNAME
- MessageText := "The specified username is invalid."
-
- case MessageId == ERROR_NOT_CONNECTED
- MessageText := "This network connection does not exist."
-
- case MessageId == ERROR_OPEN_FILES
- MessageText := "This network connection has files open or requests pending."
-
- case MessageId == ERROR_ACTIVE_CONNECTIONS
- MessageText := "Active connections still exist."
-
- case MessageId == ERROR_DEVICE_IN_USE
- MessageText := "The device is in use by an active process and cannot be disconnected."
-
- case MessageId == ERROR_BAD_DEVICE
- MessageText := "The specified device name is invalid."
-
- case MessageId == ERROR_CONNECTION_UNAVAIL
- MessageText := "The device is not currently connected but it is a remembered connection."
-
- case MessageId == ERROR_DEVICE_ALREADY_REMEMBERED
- MessageText := "An attempt was made to remember a device that had previously been remembered."
-
- case MessageId == ERROR_NO_NET_OR_BAD_PATH
- MessageText := "No network provider accepted the given network path."
-
- case MessageId == ERROR_BAD_PROVIDER
- MessageText := "The specified network provider name is invalid."
-
- case MessageId == ERROR_CANNOT_OPEN_PROFILE
- MessageText := "Unable to open the network connection profile."
-
- case MessageId == ERROR_BAD_PROFILE
- MessageText := "The network connection profile is corrupt."
-
- case MessageId == ERROR_NOT_CONTAINER
- MessageText := "Cannot enumerate a non-container."
-
- case MessageId == ERROR_EXTENDED_ERROR
- MessageText := "An extended error has occurred."
-
- case MessageId == ERROR_INVALID_GROUPNAME
- MessageText := "The format of the specified group name is invalid."
-
- case MessageId == ERROR_INVALID_COMPUTERNAME
- MessageText := "The format of the specified computer name is invalid."
-
- case MessageId == ERROR_INVALID_EVENTNAME
- MessageText := "The format of the specified event name is invalid."
-
- case MessageId == ERROR_INVALID_DOMAINNAME
- MessageText := "The format of the specified domain name is invalid."
-
- case MessageId == ERROR_INVALID_SERVICENAME
- MessageText := "The format of the specified service name is invalid."
-
- case MessageId == ERROR_INVALID_NETNAME
- MessageText := "The format of the specified network name is invalid."
-
- case MessageId == ERROR_INVALID_SHARENAME
- MessageText := "The format of the specified share name is invalid."
-
- case MessageId == ERROR_INVALID_PASSWORDNAME
- MessageText := "The format of the specified password is invalid."
-
- case MessageId == ERROR_INVALID_MESSAGENAME
- MessageText := "The format of the specified message name is invalid."
-
- case MessageId == ERROR_INVALID_MESSAGEDEST
- MessageText := "The format of the specified message destination is invalid."
-
- case MessageId == ERROR_SESSION_CREDENTIAL_CONFLICT
- MessageText := "The credentials supplied conflict with an existing set of credentials."
-
- case MessageId == ERROR_REMOTE_SESSION_LIMIT_EXCEEDED
- MessageText := "An attempt was made to establish a session to a network server, but there" + ;
- " are already too many sessions established to that server."
-
- case MessageId == ERROR_DUP_DOMAINNAME
- MessageText := "The workgroup or domain name is already in use by another computer on the" + ;
- " network."
-
- case MessageId == ERROR_NO_NETWORK
- MessageText := "The network is not present or not started."
-
- case MessageId == ERROR_CANCELLED
- MessageText := "The operation was cancelled by the user."
-
- case MessageId == ERROR_USER_MAPPED_FILE
- MessageText := "The requested operation cannot be performed on a file with a user mapped section open."
-
- case MessageId == ERROR_CONNECTION_REFUSED
- MessageText := "The remote system refused the network connection."
-
- case MessageId == ERROR_GRACEFUL_DISCONNECT
- MessageText := "The network connection was gracefully closed."
-
- case MessageId == ERROR_ADDRESS_ALREADY_ASSOCIATED
- MessageText := "The network transport endpoint already has an address associated with it."
-
- case MessageId == ERROR_ADDRESS_NOT_ASSOCIATED
- MessageText := "An address has not yet been associated with the network endpoint."
-
- case MessageId == ERROR_CONNECTION_INVALID
- MessageText := "An operation was attempted on a non-existent network connection."
-
- case MessageId == ERROR_CONNECTION_ACTIVE
- MessageText := "An invalid operation was attempted on an active network connection."
-
- case MessageId == ERROR_NETWORK_UNREACHABLE
- MessageText := "The remote network is not reachable by the transport."
-
- case MessageId == ERROR_HOST_UNREACHABLE
- MessageText := "The remote system is not reachable by the transport."
-
- case MessageId == ERROR_PROTOCOL_UNREACHABLE
- MessageText := "The remote system does not support the transport protocol."
-
- case MessageId == ERROR_PORT_UNREACHABLE
- MessageText := "No service is operating at the destination network endpoint" + ;
- " on the remote system."
-
- case MessageId == ERROR_REQUEST_ABORTED
- MessageText := "The request was aborted."
-
- case MessageId == ERROR_CONNECTION_ABORTED
- MessageText := "The network connection was aborted by the local system."
-
- case MessageId == ERROR_RETRY
- MessageText := "The operation could not be completed. A retry should be performed."
-
- case MessageId == ERROR_CONNECTION_COUNT_LIMIT
- MessageText := "A connection to the server could not be made because the limit on the number of" + ;
- " concurrent connections for this account has been reached."
-
- case MessageId == ERROR_LOGIN_TIME_RESTRICTION
- MessageText := "Attempting to login during an unauthorized time of day for this account."
-
- case MessageId == ERROR_LOGIN_WKSTA_RESTRICTION
- MessageText := "The account is not authorized to login from this station."
-
- case MessageId == ERROR_INCORRECT_ADDRESS
- MessageText := "The network address could not be used for the operation requested."
-
- case MessageId == ERROR_ALREADY_REGISTERED
- MessageText := "The service is already registered."
-
- case MessageId == ERROR_SERVICE_NOT_FOUND
- MessageText := "The specified service does not exist."
-
- case MessageId == ERROR_NOT_AUTHENTICATED
- MessageText := "The operation being requested was not performed because the user" + ;
- " has not been authenticated."
-
- case MessageId == ERROR_NOT_LOGGED_ON
- MessageText := "The operation being requested was not performed because the user" + ;
- " has not logged on to the network." + ;
- " The specified service does not exist."
-
- case MessageId == ERROR_CONTINUE
- MessageText := "Return that wants caller to continue with work in progress."
-
- case MessageId == ERROR_ALREADY_INITIALIZED
- MessageText := "An attempt was made to perform an initialization operation when" + ;
- " initialization has already been completed."
-
- case MessageId == ERROR_NO_MORE_DEVICES
- MessageText := "No more local devices."
-
- ///////////////////////////
- // //
- // Security Status Codes //
- // //
- ///////////////////////////
-
- case MessageId == ERROR_NOT_ALL_ASSIGNED
- MessageText := "Not all privileges referenced are assigned to the caller."
-
- case MessageId == ERROR_SOME_NOT_MAPPED
- MessageText := "Some mapping between account names and security IDs was not done."
-
- case MessageId == ERROR_NO_QUOTAS_FOR_ACCOUNT
- MessageText := "No system quota limits are specifically set for this account."
-
- case MessageId == ERROR_LOCAL_USER_SESSION_KEY
- MessageText := "No encryption key is available. A well-known encryption key was returned."
-
- case MessageId == ERROR_NULL_LM_PASSWORD
- MessageText := "The NT password is too complex to be converted to a LAN Manager" + ;
- " password. The LAN Manager password returned is a NULL string."
-
- case MessageId == ERROR_UNKNOWN_REVISION
- MessageText := "The revision level is unknown."
-
- case MessageId == ERROR_REVISION_MISMATCH
- MessageText := "Indicates two revision levels are incompatible."
-
- case MessageId == ERROR_INVALID_OWNER
- MessageText := "This security ID may not be assigned as the owner of this object."
-
- case MessageId == ERROR_INVALID_PRIMARY_GROUP
- MessageText := "This security ID may not be assigned as the primary group of an object."
-
- case MessageId == ERROR_NO_IMPERSONATION_TOKEN
- MessageText := "An attempt has been made to operate on an impersonation token" + ;
- " by a thread that is not currently impersonating a client."
-
- case MessageId == ERROR_CANT_DISABLE_MANDATORY
- MessageText := "The group may not be disabled."
-
- case MessageId == ERROR_NO_LOGON_SERVERS
- MessageText := "There are currently no logon servers available to service the logon" + ;
- " request."
-
- case MessageId == ERROR_NO_SUCH_LOGON_SESSION
- MessageText := " A specified logon session does not exist. It may already have" + ;
- " been terminated."
-
- case MessageId == ERROR_NO_SUCH_PRIVILEGE
- MessageText := " A specified privilege does not exist."
-
- case MessageId == ERROR_PRIVILEGE_NOT_HELD
- MessageText := " A required privilege is not held by the client."
-
- case MessageId == ERROR_INVALID_ACCOUNT_NAME
- MessageText := "The name provided is not a properly formed account name."
-
- case MessageId == ERROR_USER_EXISTS
- MessageText := "The specified user already exists."
-
- case MessageId == ERROR_NO_SUCH_USER
- MessageText := "The specified user does not exist."
-
- case MessageId == ERROR_GROUP_EXISTS
- MessageText := "The specified group already exists."
-
- case MessageId == ERROR_NO_SUCH_GROUP
- MessageText := "The specified group does not exist."
-
- case MessageId == ERROR_MEMBER_IN_GROUP
- MessageText := "Either the specified user account is already a member of the specified" + ;
- " group, or the specified group cannot be deleted because it contains" + ;
- " a member."
-
- case MessageId == ERROR_MEMBER_NOT_IN_GROUP
- MessageText := "The specified user account is not a member of the specified group account."
-
- case MessageId == ERROR_LAST_ADMIN
- MessageText := "The last remaining administration account cannot be disabled" + ;
- " or deleted."
-
- case MessageId == ERROR_WRONG_PASSWORD
- MessageText := "Unable to update the password. The value provided as the current" + ;
- " password is incorrect."
-
- case MessageId == ERROR_ILL_FORMED_PASSWORD
- MessageText := "Unable to update the password. The value provided for the new password" + ;
- " contains values that are not allowed in passwords."
-
- case MessageId == ERROR_PASSWORD_RESTRICTION
- MessageText := "Unable to update the password because a password update rule has been" + ;
- " violated."
-
- case MessageId == ERROR_LOGON_FAILURE
- MessageText := "Logon failure: unknown user name or bad password."
-
- case MessageId == ERROR_ACCOUNT_RESTRICTION
- MessageText := "Logon failure: user account restriction."
-
- case MessageId == ERROR_INVALID_LOGON_HOURS
- MessageText := "Logon failure: account logon time restriction violation."
-
- case MessageId == ERROR_INVALID_WORKSTATION
- MessageText := "Logon failure: user not allowed to log on to this computer."
-
- case MessageId == ERROR_PASSWORD_EXPIRED
- MessageText := "Logon failure: the specified account password has expired."
-
- case MessageId == ERROR_ACCOUNT_DISABLED
- MessageText := "Logon failure: account currently disabled."
-
- case MessageId == ERROR_NONE_MAPPED
- MessageText := "No mapping between account names and security IDs was done."
-
- case MessageId == ERROR_TOO_MANY_LUIDS_REQUESTED
- MessageText := "Too many local user identifiers (LUIDs) were requested at one time."
-
- case MessageId == ERROR_LUIDS_EXHAUSTED
- MessageText := "No more local user identifiers (LUIDs) are available."
-
- case MessageId == ERROR_INVALID_SUB_AUTHORITY
- MessageText := "The subauthority part of a security ID is invalid for this particular use."
-
- case MessageId == ERROR_INVALID_ACL
- MessageText := "The access control list (ACL) structure is invalid."
-
- case MessageId == ERROR_INVALID_SID
- MessageText := "The security ID structure is invalid."
-
- case MessageId == ERROR_INVALID_SECURITY_DESCR
- MessageText := "The security descriptor structure is invalid."
-
- case MessageId == ERROR_BAD_INHERITANCE_ACL
- MessageText := "The inherited access control list (ACL) or access control entry (ACE)" + ;
- " could not be built."
-
- case MessageId == ERROR_SERVER_DISABLED
- MessageText := "The server is currently disabled."
-
- case MessageId == ERROR_SERVER_NOT_DISABLED
- MessageText := "The server is currently enabled."
-
- case MessageId == ERROR_INVALID_ID_AUTHORITY
- MessageText := "The value provided was an invalid value for an identifier authority."
-
- case MessageId == ERROR_ALLOTTED_SPACE_EXCEEDED
- MessageText := "No more memory is available for security information updates."
-
- case MessageId == ERROR_INVALID_GROUP_ATTRIBUTES
- MessageText := "The specified attributes are invalid, or incompatible with the" + ;
- " attributes for the group as a whole."
-
- case MessageId == ERROR_BAD_IMPERSONATION_LEVEL
- MessageText := "Either a required impersonation level was not provided, or the" + ;
- " provided impersonation level is invalid."
-
- case MessageId == ERROR_CANT_OPEN_ANONYMOUS
- MessageText := "Cannot open an anonymous level security token."
-
- case MessageId == ERROR_BAD_VALIDATION_CLASS
- MessageText := "The validation information class requested was invalid."
-
- case MessageId == ERROR_BAD_TOKEN_TYPE
- MessageText := "The type of the token is inappropriate for its attempted use."
-
- case MessageId == ERROR_NO_SECURITY_ON_OBJECT
- MessageText := "Unable to perform a security operation on an object" + ;
- " which has no associated security."
-
- case MessageId == ERROR_CANT_ACCESS_DOMAIN_INFO
- MessageText := "Indicates a Windows NT Server could not be contacted or that" + ;
- " objects within the domain are protected such that necessary" + ;
- " information could not be retrieved."
-
- case MessageId == ERROR_INVALID_SERVER_STATE
- MessageText := "The security account manager (SAM) or local security" + ;
- " authority (LSA) server was in the wrong state to perform" + ;
- " the security operation."
-
- case MessageId == ERROR_INVALID_DOMAIN_STATE
- MessageText := "The domain was in the wrong state to perform the security operation."
-
- case MessageId == ERROR_INVALID_DOMAIN_ROLE
- MessageText := "This operation is only allowed for the Primary Domain Controller of the domain."
-
- case MessageId == ERROR_NO_SUCH_DOMAIN
- MessageText := "The specified domain did not exist."
-
- case MessageId == ERROR_DOMAIN_EXISTS
- MessageText := "The specified domain already exists."
-
- case MessageId == ERROR_DOMAIN_LIMIT_EXCEEDED
- MessageText := "An attempt was made to exceed the limit on the number of domains per server."
-
- case MessageId == ERROR_INTERNAL_DB_CORRUPTION
- MessageText := "Unable to complete the requested operation because of either a" + ;
- " catastrophic media failure or a data structure corruption on the disk."
-
- case MessageId == ERROR_INTERNAL_ERROR
- MessageText := "The security account database contains an internal inconsistency."
-
- case MessageId == ERROR_GENERIC_NOT_MAPPED
- MessageText := "Generic access types were contained in an access mask which should" + ;
- " already be mapped to non-generic types."
-
- case MessageId == ERROR_BAD_DESCRIPTOR_FORMAT
- MessageText := "A security descriptor is not in the right format (absolute or self-relative)."
-
- case MessageId == ERROR_NOT_LOGON_PROCESS
- MessageText := "The requested action is restricted for use by logon processes" + ;
- " only. The calling process has not registered as a logon process."
-
- case MessageId == ERROR_LOGON_SESSION_EXISTS
- MessageText := "Cannot start a new logon session with an ID that is already in use."
-
- case MessageId == ERROR_NO_SUCH_PACKAGE
- MessageText := "A specified authentication package is unknown."
-
- case MessageId == ERROR_BAD_LOGON_SESSION_STATE
- MessageText := "The logon session is not in a state that is consistent with the" + ;
- " requested operation."
-
- case MessageId == ERROR_LOGON_SESSION_COLLISION
- MessageText := "The logon session ID is already in use."
-
- case MessageId == ERROR_INVALID_LOGON_TYPE
- MessageText := "A logon request contained an invalid logon type value."
-
- case MessageId == ERROR_CANNOT_IMPERSONATE
- MessageText := "Unable to impersonate via a named pipe until data has been read" + ;
- " from that pipe."
-
- case MessageId == ERROR_RXACT_INVALID_STATE
- MessageText := "The transaction state of a Registry subtree is incompatible with the" + ;
- " requested operation."
-
- case MessageId == ERROR_RXACT_COMMIT_FAILURE
- MessageText := "An internal security database corruption has been encountered."
-
- case MessageId == ERROR_SPECIAL_ACCOUNT
- MessageText := "Cannot perform this operation on built-in accounts."
-
- case MessageId == ERROR_SPECIAL_GROUP
- MessageText := "Cannot perform this operation on this built-in special group."
-
- endcase
- endif
-
- if empty(MessageText)
- do case
- case MessageId == ERROR_SPECIAL_USER
- MessageText := "Cannot perform this operation on this built-in special user."
-
- case MessageId == ERROR_MEMBERS_PRIMARY_GROUP
- MessageText := "The user cannot be removed from a group because the group" + ;
- " is currently the user's primary group."
-
- case MessageId == ERROR_TOKEN_ALREADY_IN_USE
- MessageText := "The token is already in use as a primary token."
-
- case MessageId == ERROR_NO_SUCH_ALIAS
- MessageText := "The specified local group does not exist."
-
- case MessageId == ERROR_MEMBER_NOT_IN_ALIAS
- MessageText := "The specified account name is not a member of the local group."
-
- case MessageId == ERROR_MEMBER_IN_ALIAS
- MessageText := "The specified account name is already a member of the local group."
-
- case MessageId == ERROR_ALIAS_EXISTS
- MessageText := "The specified local group already exists."
-
- case MessageId == ERROR_LOGON_NOT_GRANTED
- MessageText := "Logon failure: the user has not been granted the requested" + ;
- " logon type at this computer."
-
- case MessageId == ERROR_TOO_MANY_SECRETS
- MessageText := "The maximum number of secrets that may be stored in a single system has been" + ;
- " exceeded."
-
- case MessageId == ERROR_SECRET_TOO_LONG
- MessageText := "The length of a secret exceeds the maximum length allowed."
-
- case MessageId == ERROR_INTERNAL_DB_ERROR
- MessageText := "The local security authority database contains an internal inconsistency."
-
- case MessageId == ERROR_TOO_MANY_CONTEXT_IDS
- MessageText := "During a logon attempt, the user's security context accumulated too many" + ;
- " security IDs."
-
- case MessageId == ERROR_LOGON_TYPE_NOT_GRANTED
- MessageText := "Logon failure: the user has not been granted the requested logon type" + ;
- " at this computer."
-
- case MessageId == ERROR_NT_CROSS_ENCRYPTION_REQUIRED
- MessageText := "A cross-encrypted password is necessary to change a user password."
-
- case MessageId == ERROR_NO_SUCH_MEMBER
- MessageText := "A new member could not be added to a local group because the member does" + ;
- " not exist."
-
- case MessageId == ERROR_INVALID_MEMBER
- MessageText := "A new member could not be added to a local group because the member has the" + ;
- " wrong account type."
-
- case MessageId == ERROR_TOO_MANY_SIDS
- MessageText := "Too many security IDs have been specified."
-
- case MessageId == ERROR_LM_CROSS_ENCRYPTION_REQUIRED
- MessageText := "A cross-encrypted password is necessary to change this user password."
-
- case MessageId == ERROR_NO_INHERITANCE
- MessageText := "Indicates an ACL contains no inheritable components"
-
- case MessageId == ERROR_FILE_CORRUPT
- MessageText := "The file or directory is corrupt and non-readable."
-
- case MessageId == ERROR_DISK_CORRUPT
- MessageText := "The disk structure is corrupt and non-readable."
-
- case MessageId == ERROR_NO_USER_SESSION_KEY
- MessageText := "There is no user session key for the specified logon session."
-
- case MessageId == ERROR_LICENSE_QUOTA_EXCEEDED
- MessageText := "The service being accessed is licensed for a particular number of" + ;
- " connections. No more connections can be made to the service at this time" + ;
- " because there are already as many connections as the service can accept."
-
- // End of security error codes
-
- ///////////////////////////
- // //
- // WinUser Error Codes //
- // //
- ///////////////////////////
-
- case MessageId == ERROR_INVALID_WINDOW_HANDLE
- MessageText := "Invalid window handle."
-
- case MessageId == ERROR_INVALID_MENU_HANDLE
- MessageText := "Invalid menu handle."
-
- case MessageId == ERROR_INVALID_CURSOR_HANDLE
- MessageText := "Invalid cursor handle."
-
- case MessageId == ERROR_INVALID_ACCEL_HANDLE
- MessageText := "Invalid accelerator table handle."
-
- case MessageId == ERROR_INVALID_HOOK_HANDLE
- MessageText := "Invalid hook handle."
-
- case MessageId == ERROR_INVALID_DWP_HANDLE
- MessageText := "Invalid handle to a multiple-window position structure."
-
- case MessageId == ERROR_TLW_WITH_WSCHILD
- MessageText := "Cannot create a top-level child window."
-
- case MessageId == ERROR_CANNOT_FIND_WND_CLASS
- MessageText := "Cannot find window class."
-
- case MessageId == ERROR_WINDOW_OF_OTHER_THREAD
- MessageText := "Invalid window, belongs to other thread."
-
- case MessageId == ERROR_HOTKEY_ALREADY_REGISTERED
- MessageText := "Hot key is already registered."
-
- case MessageId == ERROR_CLASS_ALREADY_EXISTS
- MessageText := "Class already exists."
-
- case MessageId == ERROR_CLASS_DOES_NOT_EXIST
- MessageText := "Class does not exist."
-
- case MessageId == ERROR_CLASS_HAS_WINDOWS
- MessageText := "Class still has open windows."
-
- case MessageId == ERROR_INVALID_INDEX
- MessageText := "Invalid index."
-
- case MessageId == ERROR_INVALID_ICON_HANDLE
- MessageText := "Invalid icon handle."
-
- case MessageId == ERROR_PRIVATE_DIALOG_INDEX
- MessageText := "Using private DIALOG window words."
-
- case MessageId == ERROR_LISTBOX_ID_NOT_FOUND
- MessageText := "The listbox identifier was not found."
-
- case MessageId == ERROR_NO_WILDCARD_CHARACTERS
- MessageText := "No wildcards were found."
-
- case MessageId == ERROR_CLIPBOARD_NOT_OPEN
- MessageText := "Thread does not have a clipboard open."
-
- case MessageId == ERROR_HOTKEY_NOT_REGISTERED
- MessageText := "Hot key is not registered."
-
- case MessageId == ERROR_WINDOW_NOT_DIALOG
- MessageText := "The window is not a valid dialog window."
-
- case MessageId == ERROR_CONTROL_ID_NOT_FOUND
- MessageText := "Control ID not found."
-
- case MessageId == ERROR_INVALID_COMBOBOX_MESSAGE
- MessageText := "Invalid message for a combo box because it does not have an edit control."
-
- case MessageId == ERROR_WINDOW_NOT_COMBOBOX
- MessageText := "The window is not a combo box."
-
- case MessageId == ERROR_INVALID_EDIT_HEIGHT
- MessageText := "Height must be less than 256."
-
- case MessageId == ERROR_DC_NOT_FOUND
- MessageText := "Invalid device context (DC) handle."
-
- case MessageId == ERROR_INVALID_HOOK_FILTER
- MessageText := "Invalid hook procedure type."
-
- case MessageId == ERROR_INVALID_FILTER_PROC
- MessageText := "Invalid hook procedure."
-
- case MessageId == ERROR_HOOK_NEEDS_HMOD
- MessageText := "Cannot set non-local hook without a module handle."
-
- case MessageId == ERROR_GLOBAL_ONLY_HOOK
- MessageText := "This hook procedure can only be set globally."
-
- case MessageId == ERROR_JOURNAL_HOOK_SET
- MessageText := "The journal hook procedure is already installed."
-
- case MessageId == ERROR_HOOK_NOT_INSTALLED
- MessageText := "The hook procedure is not installed."
-
- case MessageId == ERROR_INVALID_LB_MESSAGE
- MessageText := "Invalid message for single-selection listbox."
-
- case MessageId == ERROR_SETCOUNT_ON_BAD_LB
- MessageText := "LB_SETCOUNT sent to non-lazy listbox."
-
- case MessageId == ERROR_LB_WITHOUT_TABSTOPS
- MessageText := "This list box does not support tab stops."
-
- case MessageId == ERROR_DESTROY_OBJECT_OF_OTHER_THREAD
- MessageText := "Cannot destroy object created by another thread."
-
- case MessageId == ERROR_CHILD_WINDOW_MENU
- MessageText := "Child windows cannot have menus."
-
- case MessageId == ERROR_NO_SYSTEM_MENU
- MessageText := "The window does not have a system menu."
-
- case MessageId == ERROR_INVALID_MSGBOX_STYLE
- MessageText := "Invalid message box style."
-
- case MessageId == ERROR_INVALID_SPI_VALUE
- MessageText := "Invalid system-wide (SPI_*) parameter."
-
- case MessageId == ERROR_SCREEN_ALREADY_LOCKED
- MessageText := "Screen already locked."
-
- case MessageId == ERROR_HWNDS_HAVE_DIFF_PARENT
- MessageText := "All handles to windows in a multiple-window position structure must" + ;
- " have the same parent."
-
- case MessageId == ERROR_NOT_CHILD_WINDOW
- MessageText := "The window is not a child window."
-
- case MessageId == ERROR_INVALID_GW_COMMAND
- MessageText := "Invalid GW_* command."
-
- case MessageId == ERROR_INVALID_THREAD_ID
- MessageText := "Invalid thread identifier."
-
- case MessageId == ERROR_NON_MDICHILD_WINDOW
- MessageText := "Cannot process a message from a window that is not a multiple document" + ;
- " interface (MDI) window."
-
- case MessageId == ERROR_POPUP_ALREADY_ACTIVE
- MessageText := "Popup menu already active."
-
- case MessageId == ERROR_NO_SCROLLBARS
- MessageText := "The window does not have scroll bars."
-
- case MessageId == ERROR_INVALID_SCROLLBAR_RANGE
- MessageText := "Scroll bar range cannot be greater than 0x7FFF."
-
- case MessageId == ERROR_INVALID_SHOWWIN_COMMAND
- MessageText := "Cannot show or remove the window in the way specified."
-
- case MessageId == ERROR_NO_SYSTEM_RESOURCES
- MessageText := "Insufficient system resources exist to complete the requested service."
-
- case MessageId == ERROR_NONPAGED_SYSTEM_RESOURCES
- MessageText := "Insufficient system resources exist to complete the requested service."
-
- case MessageId == ERROR_PAGED_SYSTEM_RESOURCES
- MessageText := "Insufficient system resources exist to complete the requested service."
-
- case MessageId == ERROR_WORKING_SET_QUOTA
- MessageText := "Insufficient quota to complete the requested service."
-
- case MessageId == ERROR_PAGEFILE_QUOTA
- MessageText := "Insufficient quota to complete the requested service."
-
- case MessageId == ERROR_COMMITMENT_LIMIT
- MessageText := "The paging file is too small for this operation to complete."
-
- case MessageId == ERROR_MENU_ITEM_NOT_FOUND
- MessageText := "A menu item was not found."
-
- // End of WinUser error codes
-
- ///////////////////////////
- // //
- // Eventlog Status Codes //
- // //
- ///////////////////////////
-
- case MessageId == ERROR_EVENTLOG_FILE_CORRUPT
- MessageText := "The event log file is corrupt."
-
- case MessageId == ERROR_EVENTLOG_CANT_START
- MessageText := "No event log file could be opened, so the event logging service did not start."
-
- case MessageId == ERROR_LOG_FILE_FULL
- MessageText := "The event log file is full."
-
- case MessageId == ERROR_EVENTLOG_FILE_CHANGED
- MessageText := "The event log file has changed between reads."
-
- // End of eventlog error codes
-
- ///////////////////////////
- // //
- // RPC Status Codes //
- // //
- ///////////////////////////
-
- case MessageId == RPC_S_INVALID_STRING_BINDING
- MessageText := "The string binding is invalid."
-
- case MessageId == RPC_S_WRONG_KIND_OF_BINDING
- MessageText := "The binding handle is not the correct type."
-
- case MessageId == RPC_S_INVALID_BINDING
- MessageText := "The binding handle is invalid."
-
- case MessageId == RPC_S_PROTSEQ_NOT_SUPPORTED
- MessageText := "The RPC protocol sequence is not supported."
-
- case MessageId == RPC_S_INVALID_RPC_PROTSEQ
- MessageText := "The RPC protocol sequence is invalid."
-
- case MessageId == RPC_S_INVALID_STRING_UUID
- MessageText := "The string universal unique identifier (UUID) is invalid."
-
- case MessageId == RPC_S_INVALID_ENDPOINT_FORMAT
- MessageText := "The endpoint format is invalid."
-
- case MessageId == RPC_S_INVALID_NET_ADDR
- MessageText := "The network address is invalid."
-
- case MessageId == RPC_S_NO_ENDPOINT_FOUND
- MessageText := "No endpoint was found."
-
- case MessageId == RPC_S_INVALID_TIMEOUT
- MessageText := "The timeout value is invalid."
-
- case MessageId == RPC_S_OBJECT_NOT_FOUND
- MessageText := "The object universal unique identifier (UUID) was not found."
-
- case MessageId == RPC_S_ALREADY_REGISTERED
- MessageText := "The object universal unique identifier (UUID) has already been registered."
-
- case MessageId == RPC_S_TYPE_ALREADY_REGISTERED
- MessageText := "The type universal unique identifier (UUID) has already been registered."
-
- case MessageId == RPC_S_ALREADY_LISTENING
- MessageText := "The RPC server is already listening."
-
- case MessageId == RPC_S_NO_PROTSEQS_REGISTERED
- MessageText := "No protocol sequences have been registered."
-
- case MessageId == RPC_S_NOT_LISTENING
- MessageText := "The RPC server is not listening."
-
- case MessageId == RPC_S_UNKNOWN_MGR_TYPE
- MessageText := "The manager type is unknown."
-
- case MessageId == RPC_S_UNKNOWN_IF
- MessageText := "The interface is unknown."
-
- case MessageId == RPC_S_NO_BINDINGS
- MessageText := "There are no bindings."
-
- case MessageId == RPC_S_NO_PROTSEQS
- MessageText := "There are no protocol sequences."
-
- case MessageId == RPC_S_CANT_CREATE_ENDPOINT
- MessageText := "The endpoint cannot be created."
-
- case MessageId == RPC_S_OUT_OF_RESOURCES
- MessageText := "Not enough resources are available to complete this operation."
-
- case MessageId == RPC_S_SERVER_UNAVAILABLE
- MessageText := "The RPC server is unavailable."
-
- case MessageId == RPC_S_SERVER_TOO_BUSY
- MessageText := "The RPC server is too busy to complete this operation."
-
- case MessageId == RPC_S_INVALID_NETWORK_OPTIONS
- MessageText := "The network options are invalid."
-
- case MessageId == RPC_S_NO_CALL_ACTIVE
- MessageText := "There is not a remote procedure call active in this thread."
-
- case MessageId == RPC_S_CALL_FAILED
- MessageText := "The remote procedure call failed."
-
- case MessageId == RPC_S_CALL_FAILED_DNE
- MessageText := "The remote procedure call failed and did not execute."
-
- case MessageId == RPC_S_PROTOCOL_ERROR
- MessageText := "A remote procedure call (RPC) protocol error occurred."
-
- case MessageId == RPC_S_UNSUPPORTED_TRANS_SYN
- MessageText := "The transfer syntax is not supported by the RPC server."
-
- case MessageId == RPC_S_UNSUPPORTED_TYPE
- MessageText := "The universal unique identifier (UUID) type is not supported."
-
- case MessageId == RPC_S_INVALID_TAG
- MessageText := "The tag is invalid."
-
- case MessageId == RPC_S_INVALID_BOUND
- MessageText := "The array bounds are invalid."
-
- case MessageId == RPC_S_NO_ENTRY_NAME
- MessageText := "The binding does not contain an entry name."
-
- case MessageId == RPC_S_INVALID_NAME_SYNTAX
- MessageText := "The name syntax is invalid."
-
- case MessageId == RPC_S_UNSUPPORTED_NAME_SYNTAX
- MessageText := "The name syntax is not supported."
-
- case MessageId == RPC_S_UUID_NO_ADDRESS
- MessageText := "No network address is available to use to construct a universal" + ;
- " unique identifier (UUID)."
-
- case MessageId == RPC_S_DUPLICATE_ENDPOINT
- MessageText := "The endpoint is a duplicate."
-
- case MessageId == RPC_S_UNKNOWN_AUTHN_TYPE
- MessageText := "The authentication type is unknown."
-
- case MessageId == RPC_S_MAX_CALLS_TOO_SMALL
- MessageText := "The maximum number of calls is too small."
-
- case MessageId == RPC_S_STRING_TOO_LONG
- MessageText := "The string is too long."
-
- case MessageId == RPC_S_PROTSEQ_NOT_FOUND
- MessageText := "The RPC protocol sequence was not found."
-
- case MessageId == RPC_S_PROCNUM_OUT_OF_RANGE
- MessageText := "The procedure number is out of range."
-
- case MessageId == RPC_S_BINDING_HAS_NO_AUTH
- MessageText := "The binding does not contain any authentication information."
-
- case MessageId == RPC_S_UNKNOWN_AUTHN_SERVICE
- MessageText := "The authentication service is unknown."
-
- case MessageId == RPC_S_UNKNOWN_AUTHN_LEVEL
- MessageText := "The authentication level is unknown."
-
- case MessageId == RPC_S_INVALID_AUTH_IDENTITY
- MessageText := "The security context is invalid."
-
- case MessageId == RPC_S_UNKNOWN_AUTHZ_SERVICE
- MessageText := "The authorization service is unknown."
-
- case MessageId == EPT_S_INVALID_ENTRY
- MessageText := "The entry is invalid."
-
- case MessageId == EPT_S_CANT_PERFORM_OP
- MessageText := "The server endpoint cannot perform the operation."
-
- case MessageId == EPT_S_NOT_REGISTERED
- MessageText := "There are no more endpoints available from the endpoint mapper."
-
- case MessageId == RPC_S_NOTHING_TO_EXPORT
- MessageText := "No interfaces have been exported."
-
- case MessageId == RPC_S_INCOMPLETE_NAME
- MessageText := "The entry name is incomplete."
-
- case MessageId == RPC_S_INVALID_VERS_OPTION
- MessageText := "The version option is invalid."
-
- case MessageId == RPC_S_NO_MORE_MEMBERS
- MessageText := "There are no more members."
-
- case MessageId == RPC_S_NOT_ALL_OBJS_UNEXPORTED
- MessageText := "There is nothing to unexport."
-
- case MessageId == RPC_S_INTERFACE_NOT_FOUND
- MessageText := "The interface was not found."
-
- case MessageId == RPC_S_ENTRY_ALREADY_EXISTS
- MessageText := "The entry already exists."
-
- case MessageId == RPC_S_ENTRY_NOT_FOUND
- MessageText := "The entry is not found."
-
- case MessageId == RPC_S_NAME_SERVICE_UNAVAILABLE
- MessageText := "The name service is unavailable."
-
- case MessageId == RPC_S_INVALID_NAF_ID
- MessageText := "The network address family is invalid."
-
- case MessageId == RPC_S_CANNOT_SUPPORT
- MessageText := "The requested operation is not supported."
-
- case MessageId == RPC_S_NO_CONTEXT_AVAILABLE
- MessageText := "No security context is available to allow impersonation."
-
- case MessageId == RPC_S_INTERNAL_ERROR
- MessageText := "An internal error occurred in a remote procedure call (RPC)."
-
- case MessageId == RPC_S_ZERO_DIVIDE
- MessageText := "The RPC server attempted an integer division by zero."
-
- case MessageId == RPC_S_ADDRESS_ERROR
- MessageText := "An addressing error occurred in the RPC server."
-
- case MessageId == RPC_S_FP_DIV_ZERO
- MessageText := "A floating-point operation at the RPC server caused a division by zero."
-
- case MessageId == RPC_S_FP_UNDERFLOW
- MessageText := "A floating-point underflow occurred at the RPC server."
-
- case MessageId == RPC_S_FP_OVERFLOW
- MessageText := "A floating-point overflow occurred at the RPC server."
-
- case MessageId == RPC_X_NO_MORE_ENTRIES
- MessageText := "The list of RPC servers available for the binding of auto handles" + ;
- " has been exhausted."
-
- case MessageId == RPC_X_SS_CHAR_TRANS_OPEN_FAIL
- MessageText := "Unable to open the character translation table file."
-
- case MessageId == RPC_X_SS_CHAR_TRANS_SHORT_FILE
- MessageText := "The file containing the character translation table has fewer than" + ;
- " 512 bytes."
-
- case MessageId == RPC_X_SS_IN_NULL_CONTEXT
- MessageText := "A null context handle was passed from the client to the host during" + ;
- " a remote procedure call."
-
- case MessageId == RPC_X_SS_CONTEXT_DAMAGED
- MessageText := "The context handle changed during a remote procedure call."
-
- case MessageId == RPC_X_SS_HANDLES_MISMATCH
- MessageText := "The binding handles passed to a remote procedure call do not match."
-
- case MessageId == RPC_X_SS_CANNOT_GET_CALL_HANDLE
- MessageText := "The stub is unable to get the remote procedure call handle."
-
- case MessageId == RPC_X_NULL_REF_POINTER
- MessageText := "A null reference pointer was passed to the stub."
-
- case MessageId == RPC_X_ENUM_VALUE_OUT_OF_RANGE
- MessageText := "The enumeration value is out of range."
-
- case MessageId == RPC_X_BYTE_COUNT_TOO_SMALL
- MessageText := "The byte count is too small."
-
- case MessageId == RPC_X_BAD_STUB_DATA
- MessageText := "The stub received bad data."
-
- case MessageId == ERROR_INVALID_USER_BUFFER
- MessageText := "The supplied user buffer is not valid for the requested operation."
-
- case MessageId == ERROR_UNRECOGNIZED_MEDIA
- MessageText := "The disk media is not recognized. It may not be formatted."
-
- case MessageId == ERROR_NO_TRUST_LSA_SECRET
- MessageText := "The workstation does not have a trust secret."
-
- case MessageId == ERROR_NO_TRUST_SAM_ACCOUNT
- MessageText := "The SAM database on the Windows NT Server does not have a computer" + ;
- " account for this workstation trust relationship."
-
- case MessageId == ERROR_TRUSTED_DOMAIN_FAILURE
- MessageText := "The trust relationship between the primary domain and the trusted" + ;
- " domain failed."
-
- case MessageId == ERROR_TRUSTED_RELATIONSHIP_FAILURE
- MessageText := "The trust relationship between this workstation and the primary" + ;
- " domain failed."
-
- case MessageId == ERROR_TRUST_FAILURE
- MessageText := "The network logon failed."
-
- case MessageId == RPC_S_CALL_IN_PROGRESS
- MessageText := "A remote procedure call is already in progress for this thread."
-
- case MessageId == ERROR_NETLOGON_NOT_STARTED
- MessageText := "An attempt was made to logon, but the network logon service was not started."
-
- case MessageId == ERROR_ACCOUNT_EXPIRED
- MessageText := "The user's account has expired."
-
- case MessageId == ERROR_REDIRECTOR_HAS_OPEN_HANDLES
- MessageText := "The redirector is in use and cannot be unloaded."
-
- case MessageId == ERROR_PRINTER_DRIVER_ALREADY_INSTALLED
- MessageText := "The specified printer driver is already installed."
-
- case MessageId == ERROR_UNKNOWN_PORT
- MessageText := "The specified port is unknown."
-
- case MessageId == ERROR_UNKNOWN_PRINTER_DRIVER
- MessageText := "The printer driver is unknown."
-
- case MessageId == ERROR_UNKNOWN_PRINTPROCESSOR
- MessageText := "The print processor is unknown."
-
- case MessageId == ERROR_INVALID_SEPARATOR_FILE
- MessageText := "The specified separator file is invalid."
-
- case MessageId == ERROR_INVALID_PRIORITY
- MessageText := "The specified priority is invalid."
-
- case MessageId == ERROR_INVALID_PRINTER_NAME
- MessageText := "The printer name is invalid."
-
- case MessageId == ERROR_PRINTER_ALREADY_EXISTS
- MessageText := "The printer already exists."
-
- case MessageId == ERROR_INVALID_PRINTER_COMMAND
- MessageText := "The printer command is invalid."
-
- case MessageId == ERROR_INVALID_DATATYPE
- MessageText := "The specified datatype is invalid."
-
- case MessageId == ERROR_INVALID_ENVIRONMENT
- MessageText := "The Environment specified is invalid."
-
- case MessageId == RPC_S_NO_MORE_BINDINGS
- MessageText := "There are no more bindings."
-
- case MessageId == ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT
- MessageText := "The account used is an interdomain trust account. Use your global user account or local user account to access this server."
-
- case MessageId == ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT
- MessageText := "The account used is a Computer Account. Use your global user account or local user account to access this server."
-
- case MessageId == ERROR_NOLOGON_SERVER_TRUST_ACCOUNT
- MessageText := "The account used is an server trust account. Use your global user account or local user account to access this server."
-
- case MessageId == ERROR_DOMAIN_TRUST_INCONSISTENT
- MessageText := "The name or security ID (SID) of the domain specified is inconsistent" + ;
- " with the trust information for that domain."
-
- case MessageId == ERROR_SERVER_HAS_OPEN_HANDLES
- MessageText := "The server is in use and cannot be unloaded."
-
- case MessageId == ERROR_RESOURCE_DATA_NOT_FOUND
- MessageText := "The specified image file did not contain a resource section."
-
- case MessageId == ERROR_RESOURCE_TYPE_NOT_FOUND
- MessageText := "The specified resource type can not be found in the image file."
-
- case MessageId == ERROR_RESOURCE_NAME_NOT_FOUND
- MessageText := "The specified resource name can not be found in the image file."
-
- case MessageId == ERROR_RESOURCE_LANG_NOT_FOUND
- MessageText := "The specified resource language ID cannot be found in the image file."
-
- case MessageId == ERROR_NOT_ENOUGH_QUOTA
- MessageText := "Not enough quota is available to process this command."
-
- case MessageId == RPC_S_NO_INTERFACES
- MessageText := "No interfaces have been registered."
-
- case MessageId == RPC_S_CALL_CANCELLED
- MessageText := "The server was altered while processing this call."
-
- case MessageId == RPC_S_BINDING_INCOMPLETE
- MessageText := "The binding handle does not contain all required information."
-
- case MessageId == RPC_S_COMM_FAILURE
- MessageText := "Communications failure."
-
- case MessageId == RPC_S_UNSUPPORTED_AUTHN_LEVEL
- MessageText := "The requested authentication level is not supported."
-
- case MessageId == RPC_S_NO_PRINC_NAME
- MessageText := "No principal name registered."
-
- case MessageId == RPC_S_NOT_RPC_ERROR
- MessageText := "The error specified is not a valid Windows RPC error code."
-
- case MessageId == RPC_S_UUID_LOCAL_ONLY
- MessageText := "A UUID that is valid only on this computer has been allocated."
-
- case MessageId == RPC_S_SEC_PKG_ERROR
- MessageText := "A security package specific error occurred."
-
- case MessageId == RPC_S_NOT_CANCELLED
- MessageText := "Thread is not cancelled."
-
- case MessageId == RPC_X_INVALID_ES_ACTION
- MessageText := "Invalid operation on the encoding/decoding handle."
-
- case MessageId == RPC_X_WRONG_ES_VERSION
- MessageText := "Incompatible version of the serializing package."
-
- case MessageId == RPC_X_WRONG_STUB_VERSION
- MessageText := "Incompatible version of the RPC stub."
-
- case MessageId == RPC_S_GROUP_MEMBER_NOT_FOUND
- MessageText := "The group member was not found."
-
- case MessageId == EPT_S_CANT_CREATE
- MessageText := "The endpoint mapper database could not be created."
-
- case MessageId == RPC_S_INVALID_OBJECT
- MessageText := "The object universal unique identifier (UUID) is the nil UUID."
-
- case MessageId == ERROR_INVALID_TIME
- MessageText := "The specified time is invalid."
-
- case MessageId == ERROR_INVALID_FORM_NAME
- MessageText := "The specified Form name is invalid."
-
- case MessageId == ERROR_INVALID_FORM_SIZE
- MessageText := "The specified Form size is invalid"
-
- case MessageId == ERROR_ALREADY_WAITING
- MessageText := "The specified Printer handle is already being waited on"
-
- case MessageId == ERROR_PRINTER_DELETED
- MessageText := "The specified Printer has been deleted"
-
- case MessageId == ERROR_INVALID_PRINTER_STATE
- MessageText := "The state of the Printer is invalid"
-
- case MessageId == ERROR_PASSWORD_MUST_CHANGE
- MessageText := "The user must change his password before he logs on the first time."
-
- case MessageId == ERROR_DOMAIN_CONTROLLER_NOT_FOUND
- MessageText := "Could not find the domain controller for this domain."
-
- case MessageId == ERROR_ACCOUNT_LOCKED_OUT
- MessageText := "The referenced account is currently locked out and may not be logged on to."
-
- case MessageId == ERROR_NO_BROWSER_SERVERS_FOUND
- MessageText := "The list of servers for this workgroup is not currently available"
-
- ///////////////////////////
- // //
- // OpenGL Error Code //
- // //
- ///////////////////////////
-
- case MessageId == ERROR_INVALID_PIXEL_FORMAT
- MessageText := "The pixel format is invalid."
-
- case MessageId == ERROR_BAD_DRIVER
- MessageText := "The specified driver is invalid."
-
- case MessageId == ERROR_INVALID_WINDOW_STYLE
- MessageText := "The window style or class attribute is invalid for this operation."
-
- case MessageId == ERROR_METAFILE_NOT_SUPPORTED
- MessageText := "The requested metafile operation is not supported."
-
- case MessageId == ERROR_TRANSFORM_NOT_SUPPORTED
- MessageText := "The requested transformation operation is not supported."
-
- case MessageId == ERROR_CLIPPING_NOT_SUPPORTED
- MessageText := "The requested clipping operation is not supported."
-
-
- ////////////////////////////////////
- // //
- // Win32 Spooler Error Codes //
- // //
- //*//////////////////////////////////
-
- case MessageId == ERROR_UNKNOWN_PRINT_MONITOR
- MessageText := "The specified print monitor is unknown."
-
- case MessageId == ERROR_PRINTER_DRIVER_IN_USE
- MessageText := "The specified printer driver is currently in use."
-
- case MessageId == ERROR_SPOOL_FILE_NOT_FOUND
- MessageText := "The spool file was not found."
-
- case MessageId == ERROR_SPL_NO_STARTDOC
- MessageText := "A StartDocPrinter call was not issued."
-
- case MessageId == ERROR_SPL_NO_ADDJOB
- MessageText := "An AddJob call was not issued."
-
- case MessageId == ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED
- MessageText := "The specified print processor has already been installed."
-
- case MessageId == ERROR_PRINT_MONITOR_ALREADY_INSTALLED
- MessageText := "The specified print monitor has already been installed."
-
- ////////////////////////////////////
- // //
- // Wins Error Codes //
- // //
- ////////////////////////////////////
-
- case MessageId == ERROR_WINS_INTERNAL
- MessageText := "WINS encountered an error while processing the command."
-
- case MessageId == ERROR_CAN_NOT_DEL_LOCAL_WINS
- MessageText := "The local WINS can not be deleted."
-
- case MessageId == ERROR_STATIC_INIT
- MessageText := "The importation from the file failed."
-
- case MessageId == ERROR_INC_BACKUP
- MessageText := "The backup Failed. Was a full backup done before ?"
-
- case MessageId == ERROR_FULL_BACKUP
- MessageText := "The backup Failed. Check the directory that you are backing the database to."
-
- case MessageId == ERROR_REC_NON_EXISTENT
- MessageText := "The name does not exist in the WINS database."
-
- case MessageId == ERROR_RPL_NOT_ALLOWED
- MessageText := "Replication with a non-configured partner is not allowed."
-
- otherwise
- MessageText := "Unknown Windows Error."
-
- endcase
- endif
-
- return ( MessageText )
-