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.
_dos_commit
 Summary Example                         Up Contents Index Back
─────Run-Time Library───────────────────────────────────────────────────────
 
     The _dos_commit function uses system call 0x68 to flush to disk
     the DOS buffers associated with the file indicated by <handle>. It
     also forces an update on the corresponding disk directory and the
     file allocation table. System call 0x68 ensures that the specified
     file is flushed directly to disk and not flushed at the operating
     system's discretion.
 
     The system call used to implement _dos_commit is only available in
     DOS versions 3.3 and later. Using _dos_commit in earlier versions
     of DOS results in undefined behavior.
 
     Do not use the DOS interface I/O routines with the console,
     low-level, or stream I/O routines.
 
     Return Value
 
     The function returns 0 if successful. Otherwise, it returns the
     DOS error code and sets errno to EBADF, indicating an invalid file
     handle.
                                    -♦-