NWGetDiskUtilization

Allows a client to determine how much physical space the specified object ID is using on the given volume

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:Volume

Syntax

   #include <nwvol.h> 
   or 
   #include <nwcalls.h> 
    
   N_EXTERN_LIBRARY( NWCCODE ) NWGetDiskUtilization  ( 
      NWCONN_HANDLE   conn,  
      nuint32         objID,  
      nuint8          volNum,  
      pnuint16        usedDirectories,  
      pnuint16        usedFiles,  
      pnuint16        usedBlocks); 
   
   

Pascal Syntax

   uses calwin32 
    
   Function NWGetDiskUtilization 
     (conn : NWCONN_HANDLE; 
      objID : nuint32; 
      volNum : nuint8; 
      usedDirectories : pnuint16; 
      usedFiles : pnuint16; 
      usedBlocks : pnuint16 
   ) : NWCCODE; 
   
   

Parameters

conn
(IN) Specifies the NetWare® server connection handle.
objID
(IN) Specifies the object ID.
volNum
(IN) Specifies the volume number.
usedDirectories
(OUT) Points to the number of directories on the volume owned by objID.
usedFiles
(OUT) Points to the number of files on the volume owned by objID.
usedBlocks
(OUT) Points to the number of physical volume blocks occupied by files owned by objID.

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

0x8996

SERVER_OUT_OF_MEMORY

0x8998

VOLUME_DOES_NOT_EXIST

0x89A1

DIRECTORY_IO_ERROR

0x89F2

NO_OBJECT_READ_PRIVILEGE

0x89FC

NO_SUCH_OBJECT

Remarks

usedBlocks will return incorrect information for disks larger than 268 megabytes. Call NWGetObjDiskRestrictions to get the disk space being used by an object.

Clients who are SUPERVISOR equivalent can call NWGetDiskUtilization for any object. Clients not having SUPERVISOR rights can call NWGetDiskUtilization only for the object used when logging in.

Call either NWGetObjectID or NWDSMapNameToID to get the object ID.

NWGetDiskUtilization will not validate objID. If objID is invalid or does not exist on the server, NWGetDiskUtilization will return zero (0) for the disk utilization.

NCP Calls

See Also

NWDSMapNameToID (NDS Core Services), NWGetObjDiskRestrictions, NWGetObjectID (NDK: Bindery Management)