I've got a FILE in a dll that is supposed to be a log of everything that happens. The problem is that none of the writes commit until I close the file. Is there a way to get the writes to commit immediately?
Printable View
I've got a FILE in a dll that is supposed to be a log of everything that happens. The problem is that none of the writes commit until I close the file. Is there a way to get the writes to commit immediately?
fflush();
How are you writing the file?
CFile? CArchive? Most write type functions have a flush() method that commits outstanding writes.
I would guess : the fflush function