Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This information class is used to query or set the position of the file pointer within a file.<143>
A FILE_POSITION_INFORMATION data element, defined as follows, is returned by the server or provided by the client.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
CurrentByteOffset |
|||||||||||||||||||||||||||||||
|
... |
|||||||||||||||||||||||||||||||
CurrentByteOffset (8 bytes): A 64-bit signed integer that MUST contain the offset, in bytes, of the file pointer from the beginning of the file. A unique offset value is maintained for each open of a file. When setting the position, only values greater than or equal to zero are valid. If the given file was opened using the FILE_NO_INTERMEDIATE_BUFFERING flag, the offset that is being set SHOULD be aligned to a sector boundary. This value SHOULD<144> be updated by read and write operations if the given file was opened using the FILE_SYNCHRONOUS_IO_ALERT or FILE_SYNCHRONOUS_IO_NONALERT flags.
This operation returns a status code as specified in section 2.2. Upon success, the status code returned by the function that processes this file information class is STATUS_SUCCESS. The most common error codes are listed in the following table.
|
Error code |
Meaning |
|---|---|
|
STATUS_INFO_LENGTH_MISMATCH 0xC0000004 |
The specified information record length does not match the length that is required for the specified information class. |
|
STATUS_INVALID_PARAMETER 0xC000000D |
Returned when setting the offset if the CurrentByteOffset is negative or the file was opened using the FILE_NO_INTERMEDIATE_BUFFERING flag and CurrentByteOffset is not aligned to a sector boundary. |