SetEndOfFile
The SetEndOfFile function moves the end-of-file (EOF) position for the specified file to the current position of the file pointer.
Syntax
BOOL SetEndOfFile(
HANDLE hFile
);
Parameters
hFile
Handle to the file to have its EOF position moved. The file handle must have been created with the GENERIC_WRITE access right.
Return Value
A non-zero value if the function succeeds, 0 (zero) if the function fails
To get extended error information, call GetLastError.
Remarks
This function can be used to truncate or extend a file. If the file is extended, the contents of the file between the old EOF position and the new position are not defined.
Requirements
Minimum Supported Version | RTX64 2013 |
Header | windows.h |
Library | Rtx_Rtss.lib |