Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Novlib 3.30 Online Reference - <b> usrvolresget() / usrvolresset()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 UsrVolResGet() / UsrVolResSet()
------------------------------------------------------------------------------
 Purpose:
 Get / set the volume space restriction of a user.

 Syntax:
 dwVolRes = UsrVolResGet( iVolNum, dwUserID )
 dwVolRes = UsrVolResSet( iVolNum, dwUserID,

 dwNewRes )

 Parameters:
 iVolNum  The volume number - 0 for the first volume, 1 for the second
 andso on.
 dwUserID The bindery ID number of the user.
 dwNewRes The new amount of space to which a user is restricted.

 Returns:
 A numeric value (unsigned long int).

 Description:
 UsrVolResGet() returns the number of disk blocks a user is
 restricted to on the specified volume. iVolNum is the volume number and
 dwUserID is the bindery object ID number of the user.

 UsrVolResSet() sets the number of disk blocks that the user is
 restricted to on the specified volume to dwNewRes and returns the previous
 restriction.

 Returns a value representing the number of blocks on the specified volume,
 NOVNOVOLRES if no restriction applies or NOVERRLONG if an error occurs.

 Example:
 // To return how much volume space KATIE is allowed on volume SYS (0):
 dwUserRes = UsrVolResGet( 0, UsrIDGet( "KATIE" ) )
 do case
    case dwUserRes > 0
       ? "User KATIE is restricted to ", dwUserRes
       ?? "blocks on volume 0"
    case dwUserRes = NOVNOVOLRES
       ? "User KATIE has unrestricted disk space on volume 0"
    otherwise
       ? "Error"
 endcase
 // To set user PETE's allowed space on volume 0 (SYS) to 4000 blocks:
 UsrVolResSet( 0, UsrIDGet( "PETE" ), 4000 )
 dwBlocks = UsrVolResGet( 0, UsrIDGet( "PETE" ) )
 iBlocksize = VolBlkSizGet( 0 )
 dwTotalspace = dwBlocks * iBlocksize
 ? "User Pete is restricted to ", dwBlocks, " blocks on volume 0 "
 ?? "which amounts to ", dwTotalspace, " bytes"

 Notes:
 These functions only work with NetWare 386 and require Supervisor
 equivalence. The block size normally defaults to 4Kb and varies between 4Kb
 and 16Kb depending on the setup of the file server. If the configured block
 size of the file server is 4Kb (4096) and a user is restricted to 1000
 blocks, the actual space is 4,096,000 bytes.

 The block size in bytes of the specified volume is returned by the function
 VolBlkSizGet().

See Also: UsrDskBlkGet() UsrDirCntGet() VolBlkSizGet()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson