ScanTrustees

Returns information about directory or file trustees

Local Servers:blocking
Remote Servers:blocking
Classification:3.x, 4.x, 5.x, 6.x
SMP Aware:No
Service:File System

Syntax

   #include <nwdir.h> 
    
    int ScanTrustees (  
       char   *pathName, 
       LONG    startingOffset, 
       LONG    vectorSize, 
       LONG   *trusteeVector, 
       WORD   *maskVector, 
       LONG   *actualVectorSize);
   

Parameters

pathName

(IN) Specifies the string containing the path specification for the directory to be scanned (maximum 255 characters, included the NULL terminator).

startingOffset

(IN) Specifies the starting byte.

vectorSize

(IN) Specifies the Number of trusteeVector structures that trusteeVector can hold.

trusteeVector

(OUT) Points to an array of structures containing the trustees of the scanned directory.

maskVector

(OUT) Points to structure that specifies the trustee rights.

actualVectorSize

(OUT) Receives the actual number of trusteeVector structures being returned.

Return Values

Value

Hex

Constant

0

(0x00)

ESUCCESS

NetWare Error

UNSUCCESSFUL

Remarks

An application can use this function iteratively to scan a directory and return information about all the directory trustees.

SetCurrentNameSpace sets the name space which is used for parsing the path input to this function.

NOTE:For NetWare versions before 4.x, this function only works with DOS name space for remote servers.

It's an ID that can be converted into NWDSMapIDToName()

Example:

   ScanTrustees(path, startingOffset, TRUSTEES_PER_SCAN, trusteeVector, maskVector, &actualVectorSize)
   
   for (i = 0; i < actualVectorSize; i++)
   {
       char name[MAX_DN_CHARS + 1];
       LONG trustee = NWLongSwap(trusteeVector[i]);
       ccode = NWDSMapIDToName(context, conn, trustee, name);
   

See Also

ScanBinderyObjectTrusteePaths