Returns the maximum disk space restriction for a particular user
#include <nwdir.h>
int GetMaximumUserSpaceRestriction (
long trusteeID,
int volume,
LONG *maxRestriction);
(IN) Specifies the desired user object ID.
(IN) Specifies the desired volume (0-63 for NetWare 3.1 and later; 0-31 for previous versions).
(OUT) Receives the number of 4K blocks to which the user is restricted. If this value is 0, there is no restriction.
GetMaximumUserSpaceRestriction is not supported in a NetWare 2.x environment. Remote servers running NetWare 2.x return error code 251 (ERR_UNKNOWN_REQUEST).
#include <stdlib.h>
#include <nwdir.h>
main()
{
int rc;
long objectID;
LONG maxRestriction;
rc = GetBinderyObjectID("testuser", 1, &objectID);
if( rc != 0)
{
printf("GetBinderyObjectID() status = %x\n", rc);
return;
}
rc = GetMaximumUserSpaceRestriction( objectID, 0,
&maxRestriction);
if( rc != 0)
{
printf("GetMaximumUserSpaceRestriction() status = %x\n", rc);
return;
}
printf("Max Disk Space Restriction for ’testuser’ = %d\n",
maxRestriction*4096);
}