dosclose
Purpose
Closes a DOS file.
Library
DOS Services Library (libdos.a)
Syntax
#include <dos.h>
int dosclose (dosfile)
DOSFILE dosfile;
Description
The dosclose subroutine closes the file descriptor speci-
fied by the dosfile parameter.
The dosfile parameter is a file descriptor obtained from
a dosopen, doscreate, or dosdup subroutine.
Warning: DOS files are not implicitly closed when a
process terminates. You must explicitly close all DOS
files or you may lose data.
Return Value
Upon successful completion, a value of 0 is returned. If
the dosclose subroutine fails, a value of -1 is returned
and doserrno is set to indicate the error.
Related Information
In this book: "DOS services library," "doscreate,"
"dosdup," and "dosopen."