NWSetDirSpaceLimit

Specifies a space limit (in 4 KB blocks) on a particular subdirectory

NetWare Server:3.11, 3.12, 3.2, 4.x, 5.x, 6.x
Platform:Windows NT, Windows 95, Windows 98
Library:Cross-Platform NetWare Calls (CAL*.*)
Service:File System

Syntax

   #include <nwdirect.h> 
   or 
   #include <nwcalls.h> 
    
   N_EXTERN_LIBRARY( NWCCODE )NWSetDirSpaceLimit  ( 
      NWCONN_HANDLE   conn,  
      NWDIR_HANDLE    dirHandle,  
      nuint32         spaceLimit);
   

Delphi Syntax

   uses calwin32 
    
   Function NWSetDirSpaceLimit 
     (conn : NWCONN_HANDLE; 
      dirHandle : NWDIR_HANDLE; 
      spaceLimit : nuint32 
   ) : NWCCODE;
   

Parameters

conn

(IN) Specifies the NetWare server connection handle.

dirHandle

(IN) Specifies the NetWare directory handle pointing to the directory to scan.

spaceLimit

(IN) Specifies the directory space limit (in 4 KB sizes).

Return Values

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

0x0000

SUCCESSFUL

0x8801

INVALID_CONNECTION

0x8901

ERR_INSUFFICIENT_SPACE

0x898C

NO_MODIFY_PRIVILEGES

0x89BF

INVALID_NAME_SPACE

Remarks

If the space limit is set to 0, space limit restrictions are lifted. If the restriction is 0xFFFFFFFF, the space limit on the directory is set to 0.

Before space limit restrictions can be lifted, they must previously have been set. If 0 is passed to the spaceLimit parameter when no restrictions are set, NWSetDirSpaceLimit fails and returns 0x89FF.

NOTE:All restrictions are set in units of 4K blocks.

NSS volumes and traditional volumes have very different architectures, so this function behaves differently, depending upon the volume the directory resides on. For example, traditional volumes take a long time to mount because as the volume mounts, all entries are placed in memory and disk space usage information is calculated and kept current. NSS volumes mount quickly because the entire file system is not scanned and thus disk space usage information must be calculated when a request comes in. For a few disk space requests, you will not see a great deal of difference between an NSS volume and a traditional volume. However, if you send through 3000 requests at the same time to an NSS volume, utilization can spike to 100%, causing the server to drop connections.

NCP Calls

See Also

NWGetDirSpaceLimitList, NWGetDirSpaceLimitList2