(IN) Specifies the NetWare server connection handle.
dirHandle
(IN) Specifies the directory handle associated with the directory containing the file.
fileName
(IN) Points to the name of the file containing the data stream.
dataStream
(IN) Specifies the data stream number if the name space is Mac O/S:
0 =Resource Fork
1=Data Fork
For DOS, always pass 0.
attrs
(IN) Specifies the attributes to use in searching for the file to open.
accessMode
(IN) Specifies the rights to use in opening the file.
NWHandle
(OUT) Points to a 4-byte NetWare handle to dataStream (optional).
fileHandle
(OUT) Points to a file handle.
Return values
0x0000
SUCCESSFUL
0x8801
INVALID_CONNECTION
0x8998
VOLUME_DOES_NOT_EXIST
0x899B
BAD_DIRECTORY_HANDLE
0x899C
INVALID_PATH
0x8980
ERR_LOCK_FAIL
0x8982
NO_OPEN_PRIVILEGES
0x8990
NO_FILES_AFFECTED_READ_ONLY
0x89BE
INVALID_DATA_STREAM
0x89FF
NO_FILES_FOUND_ERROR
Notices
NWOpenDataStream also obtains a NetWare file handle to a data stream.
Three data streams are defined for NetWare:
NW_DS_DOS 0
NW_DS_MAC 1
NW_DS_FTAM 2
All name spaces can access their main data stream through the DOS data stream. For example, the MAC data fork can be accessed through this data stream. However, it would be
impractical to access the data for the DOS data stream through NWOpenDataStream since that stream is available through the open functions for the particular client OS.
These constants identify trustee access rights for opening a a directory with NWOpenDataStream.
C Value
Value Name
Value Description
0x00
TA_NONE
Specifies no Reads or Writes are allowed.
0x01
TA_READ
Specifies file Reads are allowed.
0x02
TA_WRITE
Specifies file Writes are allowed.
0x04
TA_OPEN
Specifies files can be opened; obsolete in 3.x and higher.
0x08
TA_CREATE
Specifies files can be created.
0x10
TA_DELETE
Specifies files can be deleted.
0x20
TA_OWNERSHIP
Specifies subdirectories can be created or deleted and trustee rights granted or revoked.
0x40
TA_SEARCH
Specifies the directory can be searched.
0x80
TA_MODIFY
Specifies file attributes can be modified.
0xFB
TA_ALL
Specifies the trustee has all the above rights to the directory.
attrs definitions follow:
C Value
Value Name
0x00
FA_NORMAL
0x01
FA_READ_ONLY
0x02
FA_HIDDEN
0x04
FA_SYSTEM
0x08
FA_EXECUTE_ONLY
0x10
FA_DIRECTORY
0x20
FA_NEEDS_ARCHIVED
0x80
FA_SHAREABLE
accessMode definitions follow:
C Value
Value Name
0x0001
AR_READ
0x0002
AR_WRITE
0x0001
AR_READ_ONLY
0x0002
AR_WRITE_ONLY
0x0004
AR_DENY_READ
0x0008
AR_DENY_WRITE
0x0010
AR_COMPATABILITY
0x0040
AR_WRITE_THROUGH
0x0100
AR_OPEN_COMPRESSED
For DOS, the NetWare shell currently offers a function to get a DOS handle from a NetWare handle.