Page 1 of 1

FlushPreferenceBuffer()

Posted: Sat Dec 07, 2013 9:09 am
by leonhardt
If there is a command like this:
FlushPreferenceBuffer(Preference),then when I crashed my app by accident, I won't lost all my writing to the preference file.
Now I must call ClosePreferences() every time after writing data accomplished just in case,while I need to write data some other time I need to call OpenPreferences() again, a little cost in performance huh?

Re: FlushPreferenceBuffer()

Posted: Fri May 08, 2015 11:32 pm
by juror
leonhardt wrote: Now I must call ClosePreferences() every time after writing data accomplished just in case
Alas, even closing the file does not result in the buffers being flushed should the program terminate abnormally subsequently. Some way to ensure the integrity of the preferences file is needed.

+1

Re: FlushPreferenceBuffer()

Posted: Sat May 09, 2015 1:55 am
by Julian
+1 Either that or return a normal file number when using OpenPreferences & CreatePreferences so we can use FlushFileBuffers(#File)