Home |
RTFiles-32 Error Codes |
RTFiles-32 Error CodesThis appendix lists and explains all error codes that can be returned by RTFiles-32. The errors are sorted in numerical order. For each error, the numeric value, symbolic constant, and a description are given. RTF_NO_ERROR (0)Not an error. This value indicates success of an operation. RTF_ERROR_RESERVED (-1)This error code is reserved and will not be returned by RTFiles-32. RTF_PARAM_ERROR (-2)The parameters passed to an RTFiles-32 function are invalid. For example, the flags passed to RTFOpen are contradictory or the size of a string buffer is too small. RTF_INVALID_FILENAME (-3)A device, directory, or file name passed to RTFiles-32 has an invalid syntax, contains illegal characters, or exceeds RTF_MAX_PATH (260) bytes. RTF_DRIVE_NOT_FOUND (-4)The program attempted to access a logical drive which is not mounted. RTF_TOO_MANY_FILES (-5)The program attempted to open more files than slots were available in the file table. Changing the size of the file table is described in Configuring RTFiles-32, RTFiles-32 Data Tables. Please note that this error can also be returned by functions other than RTFOpen and RTFFindFirstEx, since many other RTFiles-32 API functions need one (or two in case of RTFRename) file slots internally. RTF_NO_MORE_FILES (-6)This value is returned by RTFFindFirstEx and RTFFindNextEx when no more files satisfy the search criteria. RTF_WRONG_MEDIA (-7)A diskette has been replaced in a diskette drive, and the serial number of the new disk does not match the serial number of the original disk. To correct this error, the original diskette must be inserted or the operation must be failed. RTF_INVALID_FILE_SYSTEM (-8)The information found in the boot record of a logical drive is inconsistent and probably corrupted. The drive cannot be mounted. RTF_FILE_NOT_FOUND (-9)The requested file name was not found on the disk. RTF_INVALID_FILE_HANDLE (-10)A file handle passed to an RTFiles-32 API function is invalid. Either it has been closed already or it was not returned by a previous successful call to RTFOpen or RTFFindFirstEx, or it was closed automatically due to the removal of the media hosting the file. RTF_UNSUPPORTED_DEVICE (-11)A device in the device list specified a device other than RTF_DEVICE_DISKETTE or RTF_DEVICE_FDISK in the DeviceType field. RTF_UNSUPPORTED_DRIVER_FUNCTION (-12)This error is returned by device drivers or system drivers. For example, a device driver for read-only devices would return this error on attempts to write to the device. RTF_CORRUPTED_PARTITION_TABLE (-13)RTFiles-32 has found inconsistent values in a device's partition table. The device cannot be mounted. RTF_TOO_MANY_DRIVES (-14)The number of logical drives found on all devices given in the device list exceeds RTFiles-32's internal drive table. Changing the size of the drive table is described in section Configuring RTFiles-32, RTFiles-32 Data Tables. RTF_INVALID_FILE_POS (-15)A call to RTFSeek attempted to position the file pointer before the start of the file. RTF_ACCESS_DENIED (-16)This error is returned whenever a security check fails. A few such checks are:
RTF_STRING_BUFFER_TOO_SMALL (-17)The size of a string buffer passed to an RTFiles-32 function is too small to hold the result. RTF_GENERAL_FAILURE (-18)A device driver reported an error without supplying additional information about the cause. For example, non-existing hardware or fatal hardware failures could generate this error. RTF_PATH_NOT_FOUND (-19)The path for a file or a directory passed to RTFiles-32 was not found. RTF_FAT_ALLOC_ERROR (-20)RTFiles-32 has found invalid values in a FAT. The FAT is most likely corrupted and the partition must be reformatted. RTF_ROOT_DIR_FULL (-21)It was attempted to create a new file in a root directory, but the directory is full. Root directories on FAT-12 and FAT-16 volumes have a fixed size and cannot be extended. RTF_DISK_FULL (-22)It was attempted to extend a file or directory, but not enough free clusters to satisfy the request were found. For function RTFExtend, this error is returned when not enough contiguous clusters are found. RTF_TIMEOUT (-23)This device error is reported when a device fails to respond within a reasonable period of time. RTF_BAD_SECTOR (-24)A device driver has reported that a sector on the disk could not be read or written. RTF_DATA_ERROR (-25)A device driver has reported that a sector read from disk has failed a data integrity check. Typically, data is stored with CRC check sums which are used for such checks. RTF_MEDIA_CHANGED (-26)During a device access, the driver has detected that the media in the drive has been removed or exchanged. RTF_SECTOR_NOT_FOUND (-27)A device driver was not able to locate a requested sector. Either a corrupted boot sector or corrupted low-level formatting can cause this error. RTF_ADDRESS_MARK_NOT_FOUND (-28)The address mark normally written during a low-level format was not found during a disk read or write operation. RTF_DRIVE_NOT_READY (-29)A disk device does not respond, either because it is not present, the media is not inserted, or because of a hardware failure. RTF_WRITE_PROTECTION (-30)It was attempted to write to a write-protected media. RTF_DMA_OVERRUN (-31)A DMA controller has reported this error. This can happen when a DMA buffer spans a 64k address boundary. RTF_CRC_ERROR (-32)A CRC check failed during a device read or write operation. RTF_DEVICE_RESOURCE_ERROR (-33)A device driver has reported that some resource it requires is not available. For example, the floppy driver was unable to allocate a DMA buffer or the RAM disk driver was unable to allocate space for new sectors. RTF_INVALID_SECTOR_SIZE (-34)A device reported itself to be formatted with a non-standard sector size. Usually, FAT volumes should use sectors of 512 or 4096 bytes size. Please contact On Time for information about how RTFiles-32 can support other sector sizes. RTF_OUT_OF_BUFFERS (-35)RTFiles-32 was unable to allocate a new buffer in its internal buffer cache. This situation can occur if all buffers are dirty and none of the dirty buffers reside on the same physical device for which a new buffer is required. To avoid this error, increase the number of buffers, close some files, or flush buffers before the failing function is called. RTF_FILE_EXISTS (-36)This error is reported on an attempt to rename a file to an existing file name or create a directory with the name of an existing directory or file. RTF_LONG_FILE_POS (-37)This return code does not constitute an error. It is returned by RTFSeek when the new file pointer value exceeds 231-1 (2G minus one). However, the function has succeeded when this value is returned. Use function RTFGetFileInfoEx or RTFSeekEx to retrieve the actual file pointer. RTFSeekEx never returns this value. RTF_FILE_TOO_LARGE (-38)The application has attempted to extend a FAT file to contain 1T (140) or more bytes, which is not supported. This error can also be returned if a file size or file pointer requires more than 32 bits, but the API function accommodates for only 32 bits. Use function RTFGetFileInfoEx of RTFSeekEx in such cases. RTF_BAD_DIR_ENTRY (-39)The directory entry of a directory contains an invalid start cluster value. The directory entry is corrupted. RTFCheckDisk can delete such directory entries. RTF_ABORTED (-40)The Error handler callback used by RTFCheckDisk has returned value RTF_CHK_ABORT to immediately abort the current disk check operation. The disk check is incomplete. Some device drivers may also return this error when an I/O operation was aborted (e.g., because it did not complete within a timeout period). RTF_NO_DRIVE (-41)RTF_NO_DRIVE should only be returned by the MountDevice function of device drivers when the drive implementing a removable disk is not present. Applications trying to access this drive will receive code RTF_DRIVE_NOT_FOUND instead. RTF_NO_MEDIA (-42)RTF_NO_MEDIA should only be returned by the MountDevice function of device drivers when no media is present in a removable disk drive. Applications trying to access this drive will receive code RTF_DRIVE_NOT_READY instead.
|