AddUserSpaceRestriction

Adds a user space restriction

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 AddUserSpaceRestriction (  
       int    volume, 
       LONG   trusteeID, 
       LONG   restriction);
   

Parameters

volume

(IN) Specifies the volume number of the volume where the restriction is to be added (-1 specifies the current volume).

trusteeID

(IN) Specifies the trustee’s object ID.

restriction

(IN) Specifies the number of 4K blocks on the disk that the user is allowed to occupy on the volume.

Return Values

Value

Hex

Constant

0

(0x00)

ESUCCESS

152

(0x98)

ERR_INVALID_VOLUME

If trusteeID is invalid, no error code is returned.

Remarks

This function is used to add disk space restrictions to an object. The restriction parameter specifies the total disk space that an object is to have on the volume.

The value of restriction is a number of disk sectors. The value of restriction is a 4K multiplier. That is, a value of 5 indicates a disk space restriction of 20K (4K X 5 = 20K).

If user A has a disk space restriction of 500 and this function is called with a value of 1000, then user A now has a disk space restriction of 1000 not 1500.

AddUserSpaceRestriction is not supported in a NetWare 2.x environment. On remote servers running NetWare 2.x, this function returns error code 251 (ERR_UNKNOWN_REQUEST).

See Also

DeleteUserSpaceRestriction, GetAvailableUserDiskSpace