NWScanDirectoryForTrustees2

Scans a directory for trustees using the specified path and directory handle

NetWare Server:3.11, 3.12, 3.2, 4.x, 5.x, 6.x
Platform:Windows NT, Windows 95, Windows 98
Library:Cross-Platform NetWare Calls (CAL*.*)
Service:File System

Syntax

   #include <nwdirect.h> 
   or 
   #include <nwcalls.h> 
    
   N_EXTERN_LIBRARY(NWCCODE) NWScanDirectoryForTrustees2 ( 
      NWCONN_HANDLE         conn,  
      NWDIR_HANDLE          dirHandle,  
      const nstr8 N_FAR    *srchPath,  
      pnuint32              iterHandle,  
      pnstr8                dirName, 
      pnuint32              dirDateTime,  
      pnuint32              ownerID,  
      TRUSTEE_INFO  N_FAR  *trusteeList);
   

Delphi Syntax

   uses calwin32 
    
   Function NWScanDirectoryForTrustees2 
     (conn : NWCONN_HANDLE; 
      dirHandle : NWDIR_HANDLE; 
      searchPath : pnstr8; 
      iterHandle : pnuint32; 
      dirName : pnstr8; 
      dirDateTime : pnuint32; 
      ownerID : pnuint32; 
      Var trusteeList : TRUSTEE_INFO 
   ) : NWCCODE;
   

Parameters

conn

(IN) Specifies the NetWare server connection handle.

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

Remarks

The srchPath parameter can include wildcard characters.

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.

NWScanDirectoryForTrustees2 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 points to a value of 0L.

NWScanDirectoryForTrustees2 should be called until 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

NWScanNSDirectoryForTrustees