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:

-1

The NetWare or DOS error is in NetWareErrno. (The DOS and NetWare error codes do not overlap. If NetWareErrno = -1, DOS is not present.)

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:

The following values can be ORed with the above access modes:

The following share modes are defined in nwshare.h:

See Also

DOSOpen, sopen