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_open
 Summary Example                         Up Contents Index Back
─────Run-Time Library───────────────────────────────────────────────────────
 
     The _dos_open routine uses system call 0x3D to open the existing
     file pointed to by <filename>. The handle for the opened file is
     copied into the integer pointed to by <handle>. The <mode>
     argument specifies the file's access, sharing, and inheritance
     modes by combining (with the OR operator) manifest constants from
     the three groups shown below. At most, one access mode and one
     sharing mode can be specified at a time.
 
     Do not use the DOS interface routines in conjunction with the
     console, low-level, or stream I/O routines.
 
     Access        Sharing        Inheritance
 
     _O_RDONLY     _SH_COMPAT     _O_NOINHERIT
     _O_WRONLY     _SH_DENYRW
     _O_RDWR       _SH_DENYWR
                   _SH_DENYRD
                   _SH_DENYNO
 
     Return Value
 
     If successful, the function returns 0. Otherwise, it returns the
     DOS error code and sets errno to EACCES, EINVAL, EMFILE, or
     ENOENT.
                                    -♦-