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.
sopen
◄Description► ◄Example► ◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
Include: <fcntl.h>, <io.h>, <share.h>, <sys\types.h>, <sys\stat.h>,
<errno.h>
Syntax: int sopen( char *filename, int oflag,
int shflag [, int pmode] );
oflag: O_APPEND, O_BINARY, O_CREAT, O_EXCL, O_RDONLY
O_RDWR, O_TEXT, O_TRUNC, O_WRONLY
(may be joined by |)
shflag: SH_COMPAT, SH_DENYNO, SH_DENYRD, SH_DENYRW,
SH_DENYWR
pmode: S_IWRITE, S_IREAD, S_IREAD | S_IWRITE
Returns: a handle if successful, or -1 if not.
errno: EACCES, EEXIST, EMFILE, ENOENT
See also: close, creat, fopen, open, umask
-♦-