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_read
◄Summary► ◄Example► ◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
The _dos_read routine uses system call 0x3F to read <count> bytes
of data from the file specified by <handle> and copy it to the
buffer pointed to by <buffer>. The integer pointed to by <numread>
shows the number of bytes actually read, which may be less than
the number requested in <count>. If the number of bytes actually
read is 0, it means the routine tried to read at end-of-file.
Do not use the DOS interface routines in conjunction with the
console, low-level, or stream I/O routines.
Return Value
If successful, the function returns 0. Otherwise, it returns the
DOS error code and sets errno to either EACCES or EBADF.
-♦-