Hi,
I would like to have your view on using an optimum method in order to execute writing operations on a file under Windows environment. It may seem basic as question but I'm experiencing some unpleaseant performance, as following.
I have a complex application written in C which worked fine so far. It handles files that I operate in binary format, in create, write and read modes. When I bring it now on XP, Vista and Windows Mobile I'm having problems with flushing the write buffers. If I don't flush I have a high speed but memory doesn't clean-up and I have to close, then re-open the file. If I flush the buffer, then continue, I get very low execution time. I execute a large volume of write operations one after the other.
My application - that I'm currently "refurbishing" for the operating systems above mentioned - has been using basic DOS and C library functions so far.
My question is: by your experience, do you have a reccomendation for what method (when create should I set some parametr for strainght writing, without buffering?) and what functions (DOS, Win32 API, other?) I must consider so that to have the best performance in terms of high-speed and memory usage for just writing binary files on disk?
Many thanks in advance!