DOS Fn 3eH: Close a File Handle
Compatibility: 2.0+
Expects: AH 3eH
BX file handle
──────────────────────────────────────────────────────────────────
Returns: AX error code if CF is set to CY
──────────────────────────────────────────────────────────────────
Info: Closes an open file.
BX contains a file handle returned from an Open operation. The file
represented by that handle is closed, its buffers are flushed,
and the directory is updated with the correct size, time, and
date.
Because of the potential shortage of file handles (default=8,
max=20 with DOS < 3.3), you may want to close one or more of the
default handles, such as handle 3 (Standard AUX).
Notes: ■ Smartdrv may decide not to flush its cache for up to several
seconds. To force "commit" to disk, use Fn 0dH (reset disk)
after closing the file.
■ With DOS 3.3+, you can force a "commit to disk" without closing
the file. See Fn 68H (commit file).
See Also: Handle-Oriented File I/O
DOS Functions
-♦-