Compartilhar via


2.4.13 FileEndOfFileInformation

This information class is used to set end-of-file information for a file.

A FILE_END_OF_FILE_INFORMATION data element, defined as follows, is provided by the client.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

EndOfFile

...

EndOfFile (8 bytes):  A 64-bit signed integer that contains the absolute new end of file position as a byte offset from the start of the file. EndOfFile specifies the offset from the beginning of the file of the byte following the last byte in the file. That is, it is the offset from the beginning of the file at which new bytes appended to the file will be written. The value of this field MUST be greater than or equal to 0.

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_INVALID_PARAMETER

0xC000000D

The handle was for a directory and not a file, or the allocation is greater than the maximum file size allowed.

STATUS_ACCESS_DENIED

0xC0000022

The handle was not opened to read file data or file attributes.

STATUS_DISK_FULL

0xC000007F

The disk is full.

STATUS_INFO_LENGTH_MISMATCH

0xC0000004

The specified information record length does not match the length that is required for the specified information class.