DOSsopen
Opens a DOS file for shared access
- Local Servers:blocking
- Remote Servers:N/A
- NetWare Server:3.11, 3.12, 3.2,
4.x, 5.x, 6.x
- Platform:NLM
- Service:DOS Partition
Syntax
#include <nwdos.h>
int DOSsopen (
const char *filename,
int access,
int share,
int permission);
Parameters
- access
- (IN) Specifies the access mode of the file on open
(defined in fcntl.h).
- share
- (IN) Specifies the sharing mode of the file on open
for DOS 3.0+. (0 for DOS 2.x).
- permission
- (IN) Specifies a file permissions if file is created:
- 0x00 Normal Read/write
- 0x01 Read Only
Return Values
Returns a file handle if successful. Otherwise, returns:
Remarks
DOSsopen is similar to the NetWare partition function sopen
except that it does not support O_APPEND and O_BINARY.
The following access modes are defined in fcntl.h:
- 0x0000 O_RDONLY Read only
- 0x0001 O_WRONLY Write only
- 0x0002 O_RDWR Read/Write
The following values can be ORed with the above access modes:
- 0x0020 O_CREAT Create new file
- 0x0040 O_TRUNC Truncate existing file
The following share modes are defined in nwshare.h:
- 0x00 SH_COMPAT Compatibility mode
- 0x10 SH_DENYRW Deny read/write mode
- 0x20 SH_DENYWR Deny write mode
- 0x30 SH_DENYRD Deny read mode
- 0x40 SH_DENYNO Deny none mode