#include <nwnamspc.h> or #include <nwcalls.h>NWCCODE N_API NWOpenNSEntry (NWCONN_HANDLE conn, nuint8 dirHandle, nuint8 namSpc, nuint8 dataStream, pnstr8 path, NW_NS_OPEN N_FAR NSOpen, NWFILE_HANDLE N_FAR fileHandle);
For DOS, always pass 0.
dirHandle can be zero if the path contains the complete path, including the volume name. (dirHandle/path should match namSpc.)
OC_MODE_ constants used in openCreateMode
are listed below:
C Value | Value Name |
---|---|
0x01 | OC_MODE_OPEN |
0x02 | OC_MODE_TRUNCATE |
0x02 | OC_MODE_REPLACE |
0x08 | OC_MODE_CREATE |
----------------------------- | C Value| Value Name | |--------|-------------------| | 0x01 | OC_MODE_OPEN | |--------|-------------------| | 0x02 | OC_MODE_TRUNCATE | |--------|-------------------| | 0x02 | OC_MODE_REPLACE | |--------|-------------------| | 0x08 | OC_MODE_CREATE | |--------|-------------------|
SA_ constants used in searchAttributes
are listed below:
C Value | Value Name |
---|---|
0x0000 | SA_NORMAL |
0x0002 | SA_HIDDEN |
0x0004 | SA_SYSTEM |
0x0010 | SA_SUBDIR_ONLY |
0x8000 | SA_SUBDIR_FILES |
0x8006 | SA_ALL |
--------------------------- | C Value| Value Name | |--------|-----------------| | 0x0000 | SA_NORMAL | |--------|-----------------| | 0x0002 | SA_HIDDEN | |--------|-----------------| | 0x0004 | SA_SYSTEM | |--------|-----------------| | 0x0010 | SA_SUBDIR_ONLY | |--------|-----------------| | 0x8000 | SA_SUBDIR_FILES| |--------|-----------------| | 0x8006 | SA_ALL | |--------|-----------------|
A_ constants used in createAttributes
are listed below:
C Value | Value Name |
---|---|
0x00000000L | A_NORMAL |
0x00000001L | A_READ_ONLY |
0x00000002L | A_HIDDEN |
0x00000004L | A_SYSTEM |
0x00000008L | A_EXECUTE_ONLY |
0x00000010L | A_DIRECTORY |
0x00000020L | A_NEEDS_ARCHIVED |
0x00000080L | A_SHAREABLE |
0x00001000L | A_TRANSACTIONAL |
0x00002000L | A_INDEXED |
0x00004000L | A_READ_AUDIT |
0x00008000L | A_WRITE_AUDIT |
0x00010000L | A_IMMEDIATE_PURGE |
0x00020000L | A_RENAME_INHIBIT |
0x00040000L | A_DELETE_INHIBIT |
0x00080000L | A_COPY_INHIBIT |
0x00400000L | A_FILE_MIGRATED |
0x00800000L | A_DONT_MIGRATE |
0x02000000L | A_IMMEDIATE_COMPRESS |
0x04000000L | A_FILE_COMPRESSED |
0x08000000L | A_DONT_COMPRESS |
0x20000000L | A_CANT_COMPRESS |
------------------------------------- | C Value | Value Name | |------------|-----------------------| | 0x00000000L| A_NORMAL | |------------|-----------------------| | 0x00000001L| A_READ_ONLY | |------------|-----------------------| | 0x00000002L| A_HIDDEN | |------------|-----------------------| | 0x00000004L| A_SYSTEM | |------------|-----------------------| | 0x00000008L| A_EXECUTE_ONLY | |------------|-----------------------| | 0x00000010L| A_DIRECTORY | |------------|-----------------------| | 0x00000020L| A_NEEDS_ARCHIVED | |------------|-----------------------| | 0x00000080L| A_SHAREABLE | |------------|-----------------------| | 0x00001000L| A_TRANSACTIONAL | |------------|-----------------------| | 0x00002000L| A_INDEXED | |------------|-----------------------| | 0x00004000L| A_READ_AUDIT | |------------|-----------------------| | 0x00008000L| A_WRITE_AUDIT | |------------|-----------------------| | 0x00010000L| A_IMMEDIATE_PURGE | |------------|-----------------------| | 0x00020000L| A_RENAME_INHIBIT | |------------|-----------------------| | 0x00040000L| A_DELETE_INHIBIT | |------------|-----------------------| | 0x00080000L| A_COPY_INHIBIT | |------------|-----------------------| | 0x00400000L| A_FILE_MIGRATED | |------------|-----------------------| | 0x00800000L| A_DONT_MIGRATE | |------------|-----------------------| | 0x02000000L| A_IMMEDIATE_COMPRESS | |------------|-----------------------| | 0x04000000L| A_FILE_COMPRESSED | |------------|-----------------------| | 0x08000000L| A_DONT_COMPRESS | |------------|-----------------------| | 0x20000000L| A_CANT_COMPRESS | |------------|-----------------------|
AR_ constants used in desiredAccessRights
are listed below:
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 | |--------|---------------------|
OC_ACTION_ constants used in openCreateAction
are listed
below:
C Value | Value Name |
---|---|
0x01 | OC_ACTION_NONE |
0x01 | OC_ACTION_OPEN |
0x02 | OC_ACTION_CREATE |
0x04 | OC_ACTION_TRUNCATE |
0x04 | OC_ACTION_REPLACE |
------------------------------- | C Value| Value Name | |--------|---------------------| | 0x01 | OC_ACTION_NONE | |--------|---------------------| | 0x01 | OC_ACTION_OPEN | |--------|---------------------| | 0x02 | OC_ACTION_CREATE | |--------|---------------------| | 0x04 | OC_ACTION_TRUNCATE | |--------|---------------------| | 0x04 | OC_ACTION_REPLACE | |--------|---------------------|
The file handle returned is appropriate for the platform the API is written for. This file handle may be used for access to the attribute value through standard file I/O with the handle. This includes closing the file as well as reading and writing to the file.
For Windows, call _lread, _lwrite, _lclose, and _lseek rather than calling the standard file I/O functions. Calling standard file I/O functions in Windows returns unexpected results.
Name Space