I want to open a file for writing using CreateFile(). If the file exists, I will set the file pointer to the end and then write data using WriteFile(). If it doesn't exist, I'll write at the beggining of the file.
Should I use FILE_APPEND_DATA or should I use FILE_WRITE_DATA or maybe FILE_WRITE_DATA|FILE_APPEND_DATA in the dwDesiredAccess parameter of CreateFile()?
Isn't the writing at the end is also a writing, so why is there FILE_APPEND_DATA?