WitieFile API completiton progress

drjackool 956 Reputation points
2023-06-10T20:16:03.0666667+00:00

hi in my app (win32 platform) i create a new file using CreateFile() then use SetFilePointer() to pre-allocate a big space for example 2GB then use SetEndOfFile() every thing is ok til here, then I call WriteFile() to write some data to the end of file; but issue is here writefile takes a long time to complete because system is allocating physical space for file, my question is, is there a way to calc/access the write operation progress completition value of the WiteFile()?

Such CopyFileEx() that has ProgressRoutine

Thanks

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,422 questions
{count} votes