I look for a way to extend a file asynchronously and efficiently .
In a support document Asynchronous Disk I/O Appears as Synchronous on Windows NT, Windows 2000, and Windows XP said:
NOTE: Applications can make the previously mentioned write operation asynchronous by changing the Valid Data Length of the file by using the SetFileValidData function, and then issuing a WriteFile.
in MSDN, SetFileValidData
is a function for Sets the valid data length of the specified file
.
But I still not understand what is the "valid data", what is the difference between it and the size of file?
I can use SetFilePointerEx
and SetEndOfFile
to extend the file size, but how do this by SetFileValidData
?
SetFileValidData
cannot input a argument large than the size of file. In this case, what is the living meaning of SetFileValidData
?