C Language and Libraries Help (clang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Using the Commit-to-Disk Feature with Existing Code
                                             Up Contents Index Back
─────C/C++ Language─────────────────────────────────────────────────────────
 
     By default, calls to the fflush or _flushall library functions
     write data to buffers maintained by the operating system; the
     operating system determines the optimal time to actually write the
     data to disk. The commit-to-disk feature of the run-time library
     lets you ensure that critical data is written directly to disk
     rather than to the operating system's buffers. You can give this
     capability to an existing program without rewriting it by linking
     its object files with COMMODE.OBJ. COMMODE.OBJ is provided in the
     compiler's LIB directory. For example:
 
          link proj.obj commode.obj /noe,,,slibcer.lib;
 
     In the resulting executable file, calls to the fflush function
     write the contents of the buffer directly to disk, and calls to
     the _flushall function write the contents of all buffers to disk.
     These two functions are the only ones affected by COMMODE.OBJ.
 
     See also: fflush, _flushall, _fdopen, fopen, _commit, _dos_commit
                                    -♦-