Quantcast
Channel: VBForums - API
Viewing all articles
Browse latest Browse all 207

Is FlushFileBuffer absolutely needed?

$
0
0
If I open a file with CreateFile, write to it with WriteFile, and then close it with CloseHandle, doesn't this automatically cause the data to get written to the file? Or is there some possibility that some data will not get written to the file before the file is closed, and thus there will be missing data near the end of the file? I'd like to know just how mandatory it is to include a FlushFileBuffer function when using the API to write to a file. I know for certain that there is no flush command needed when using the internal VB6 commands for filewriting, but am not sure about if it is necessary to do a flush when using the API commands for file writing.

Viewing all articles
Browse latest Browse all 207

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>