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?
FlushPreferenceBuffer()
FlushPreferenceBuffer()
poor English...
PureBasic & Delphi & VBA
PureBasic & Delphi & VBA
Re: FlushPreferenceBuffer()
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.leonhardt wrote: Now I must call ClosePreferences() every time after writing data accomplished just in case
+1
Re: FlushPreferenceBuffer()
+1 Either that or return a normal file number when using OpenPreferences & CreatePreferences so we can use FlushFileBuffers(#File)