C Language and Libraries Help (clang.hlp) (Table of Contents; Topic list)
_dos_creat, _dos_creatnew
 Summary Example                         Up Contents Index Back
─────Run-Time Library───────────────────────────────────────────────────────
 
     The _dos_creat and _dos_creatnew routines create and open a new
     file named <filename>. This new file has the access attributes
     specified in the <attrib> argument. The new file's handle is
     copied into the integer location pointed to by <handle>. The file
     is opened for both read and write access. If file sharing is
     installed, the file is opened in compatibility mode.
 
     The _dos_creat routine uses system call 0x3C, and the
     _dos_creatnew routine uses system call 0x5B. If the file already
     exists, _dos_creat erases its contents and leaves its attributes
     unchanged. The _dos_creatnew routine, however, fails if the file
     already exists.
 
     Return Value
 
     If successful, both routines return 0. Otherwise, they return the
     DOS error code and set errno to EACCES, EEXIST, EMFILE, or ENOENT.
                                    -♦-