#include <nwnamspc.h> or #include <nwcalls.h>NWCCODE N_API NWOpenDataStream (NWCONN_HANDLE conn, nuint8 dirHandle, pnstr8 fileName, nuint16 dataStream, nuint16 attrs, nuint16 accessMode, pnuint32 NWHandle, NWFILE_HANDLE N_FAR fileHandle);
For DOS, always pass 0.
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. |
-------------------------------------------------------------------------------------------------------------------- | 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 |
------------------------------ | 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 |
------------------------------- | 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.
Name Space