NWAddTrustee

Adds a trustee to the list of trustees in a file or directory

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:File System

Syntax

   #include <nwdentry.h> 
   or 
   #include <nwcalls.h> 
    
   N_EXTERN_LIBRARY(NWCCODE)NWAddTrustee ( 
      NWCONN_HANDLE       conn,  
      NWDIR_HANDLE        dirHandle,  
      const nstr8 N_FAR  *path,  
      nuint32             objID,  
      nuint16             rightsMask);
   

Delphi Syntax

   uses calwin32 
    
   Function NWAddTrustee 
     (conn : NWCONN_HANDLE; 
      dirHandle : NWDIR_HANDLE; 
      const path : pnstr8; 
      objID : nuint32;  
      rightsMask : nuint16 
   ) : NWCCODE;
   

Parameters

conn

(IN) Specifies the NetWare® server connection handle.

dirHandle

(IN) Specifies the directory handle associated with the desired directory path (0 if the path parameter contains the complete path, including the volume name).

path

(IN) Points to the absolute path (or a path relative to the dirHandle parameter) of the directory to which a trustee is being added.

objID

(IN) Specifies the object ID for the object being added as a trustee.

rightsMask

(IN) Specifies the access rights mask being granted to the new trustee.

Return Values

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

0x0000

SUCCESSFUL

0x8801

INVALID_CONNECTION

0x890A

NLM_INVALID_CONNECTION

0x898C

NO_MODIFY_PRIVILEGES

0x8990

NO_FILES_AFFECTED_READ_ONLY

0x8996

SERVER_OUT_OF_MEMORY

0x8998

VOLUME_DOES_NOT_EXIST

0x8999

DIRECTORY_FULL

0x899B

BAD_DIRECTORY_HANDLE

0x899C

INVALID_PATH

0x89A1

DIRECTORY_IO_ERROR

0x89FC

NO_SUCH_OBJECT

0x89FD

BAD_STATION_NUMBER

0x89FF

HARDWARE_FAILURE

Remarks

To modify a trustee rights list, the requesting workstation must have access control rights to the directory or to a parent of the directory.

If the object is already a trustee for the specified directory, the current access mask of the trustee is replaced by the value contained in the rightsMask parameter. Otherwise, the object is added as a trustee to the directory with rights equal to the rightsMask parameter.

NCP Calls

See Also

NWAddTrusteeToDirectory, NWScanNSDirectoryForTrustees