NWScanNSDirectoryForTrustees

Scans a directory for trustees using the specified path and directory handle under a specified name space

Local Servers:blocking
Remote Servers:blocking
NetWare Server:3.11, 3.12, 3.2, 4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98
Library:Cross-Platform NetWare Calls (CAL*.*)
Service:Name Space

Syntax

   #include <nwnamspc.h> 
   or 
   #include <nwcalls.h> 
    
   NWCCODE N_API NWScanNSDirectoryForTrustees ( 
      NWCONN_HANDLE           conn,  
      nuint8                  namSpc,  
      nuint8                  dirHandle,  
      const nstr8 N_FAR      *srchPath,  
      pnuint32                iterHandle,  
      pnstr8                  dirName,  
      pnuint32                dirDateTime,  
      pnuint32                ownerID,  
      TRUSTEE_INFO N_FAR     *trusteeList);
   

Parameters

conn

(IN) Specifies the NetWare server connection handle.

namSpc

(IN) Specifies the name space of the dirHandle/srchPath combination (see Section 20.5, Name Space Flag Values).

dirHandle

(IN) Specifies the NetWare directory handle for the directory being scanned (0 if the srchPath parameter points to the complete path, including the volume name)

srchPath

(IN) Points to an absolute directory path (or a path relative to the directory handle) and a search pattern

iterHandle

(IN/OUT) Points to the sequence number to be used for subsequent calls (0 initially)

dirName

(OUT) Points to the directory name found (optional, up to 256 bytes)

dirDateTime

(OUT) Points to the creation date and time of the directory (optional)

ownerID

(OUT) Points to the object ID of the directory owner (optional)

trusteeList

(OUT) Points to an array of 20 TRUSTEE_INFO structures

Return Values

These are common return values; see Return Values (Return Values for C) for more information.

0x0000

SUCCESSFUL

0x8801

INVALID_CONNECTION

0x898C

NO_MODIFY_PRIVILEGES

0x8996

SERVER_OUT_OF_MEMORY

0x8998

VOLUME_DOES_NOT_EXIST

0x899B

BAD_DIRECTORY_HANDLE

0x899C

NO_MORE_TRUSTEES

IINVALID_PATH

Remarks

Directories can have any number of objects as trustees. The directory trustees are stored and retrieved in groups on the server. To obtain a complete list, use the iterHandle parameter.

NWScanNSDirectoryForTrustees increments the value referenced by the iterHandle parameter to the next appropriate value. For subsequent calls, pass in the new value of the iterHandle parameter.

Trustees are returned in groups of 20 TRUSTEE_INFO structures. Due to subtle differences in operation, trustees may remain after an iteration, even though not all 20 positions are filled. If a position is not filled, the objectID field of TRUSTEE_INFO has to a value of 0L.

NWScanNSDirectoryForTrustees should be called until iterHandle is -1 or it returns 0x899C (NO_MORE_TRUSTEES). Because 0x899C also means INVALID_PATH, ensure the dirHandle/pbstrSrchPath parameter combination is correct.

NULL can be substituted for all optional items. However, all parameter positions must be filled.

NCP Calls

See Also

NWAddTrustee, NWAddTrusteeToDirectory, NWAddTrusteeToNSDirectory, NWDeleteTrustee, NWDeleteTrusteeFromDirectory, NWDeleteTrusteeFromNSDirectory, NWScanDirectoryForTrustees2