delorie.com/djgpp/doc/libc/libc_601.html | search |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#include <io.h> int _open(const char *path, int attrib); |
This is a direct connection to the MS-DOS open function call, int 0x21,
%ah = 0x3d, on versions of DOS earlier than 7.0. On DOS version 7.0 or
later _open
calls function int 0x21, %ax = 0x6c00. When long
file names are supported, _open
calls function 0x716c of Int
0x21.
On FAT32 file systems file sizes up to 2^32-2 are supported. Note that WINDOWS 98 has a bug which only lets you create these big files if LFN is enabled. In plain DOS mode it plainly works.
The file is set to binary mode.
The attrib parameter is a combination of one or more bits from the following:
O_RDONLY
O_WRONLY
O_RDWR
O_NOINHERIT
SH_COMPAT
SH_DENYRW
SH_DENYWR
SH_DENYRD
SH_DENYNO
This function can be hooked by File System Extensions
(see section File System Extensions). If you don't want this, you should
use _dos_open
(see section _dos_open) (but note that the latter
doesn't support long file names).
The new file descriptor, else -1 on error.
ANSI/ISO C | No |
POSIX | No |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
webmaster | delorie software privacy |
Copyright © 2004 | Updated Apr 2004 |