| Previous | Next |
| STATUS_INVALID_DEVICE_REQUEST | STATUS_WRONG_VOLUME |
STATUS_END_OF_FILE
The requested byte range is outside the file's current data extent
STATUS_END_OF_FILE is a boundary result, not evidence that the file is corrupt. Windows file I/O is offset-based: a caller asks to read or process bytes beginning at a particular position, and the current file size defines the last valid data extent. When the request begins beyond that extent, or a sequential reader has consumed the available data, the operation can complete with an end-of-file status.
The critical diagnostic values are the file size observed at the time of the request, the requested offset, and the requested length. Do not infer those values from a later directory listing. Another writer can extend or truncate the file between observations, and memory-mapped or asynchronous code can retain offsets calculated from an older size.
This status is different from STATUS_DATA_ERROR: EOF says there is no valid data beyond the boundary; it does not say existing bytes failed an integrity check. It is also different from a short read that successfully returns fewer bytes because the request crossed the current end.
What to inspect
- The exact file offset and length supplied by the failing read, copy, or offload operation.
- The file size from the same point in the operation and whether another component can truncate the file.
- Loop logic that advances offsets after partial reads; an extra iteration after consuming the last bytes is a common benign source of EOF.
References
- Microsoft: ReadFile
- Microsoft: FSCTL_OFFLOAD_WRITE return statuses
- Microsoft: File pointers
- Microsoft Open Specifications: NTSTATUS values
Looking for a different code? Search another status or error code.