NWGetDirSpaceInfo

Returns information on space usage for a 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:File System

Syntax

   #include <nwdirect.h> 
   or 
   #include <nwcalls.h> 
    
   N_EXTERN_LIBRARY( NWCCODE )NWGetDirSpaceInfo  ( 
      NWCONN_HANDLE           conn,  
      NWDIR_HANDLE            dirHandle,  
      nuint16                 volNum,  
      DIR_SPACE_INFO  N_FAR  *spaceInfo);
   

Delphi Syntax

   uses calwin32 
    
   Function NWGetDirSpaceInfo 
     (conn : NWCONN_HANDLE; 
      dirHandle : NWDIR_HANDLE; 
      volNum : nuint16; 
      Var spaceInfo : DIR_SPACE_INFO 
   ) : NWCCODE;
   

Parameters

conn

(IN) Specifies the NetWare server connection handle (nuint16).

dirHandle

(IN) Specifies the directory handle associated with the desired directory path (0 if volume information is to be returned).

volNum

(IN) Specifies the volume number to return space information for (0 if directory information is to be returned).

spaceInfo

(OUT) Points to the DIR_SPACE_INFO structure.

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

0x8998

VOLUME_DOES_NOT_EXIST

0x899B

BAD_DIRECTORY_HANDLE

0x899C

INVALID_PATH

Remarks

If the dirHandle parameter is zero, NWGetDirSpaceInfo returns the volume information to the DIR_SPACE_INFO structure. Pass the volume number in volNum, which is obtained from calling NWGetVolumeNumber.

purgeableBlocks and nonYetPurgeableBlocks are set to 0 if the dirHandle parameter contains a nonzero value.

The availableBlocks field is the only field that returns information when disk space restrictions are in effect. The rest of the structure fields contain volume-wide information. If disk space restrictions are not in effect, the availableBlocks field will contain the number of blocks available for use on the entire volume.

One block equals the size of the block size for the specified volume, which is obtained by multiplying sectorsPerBlock by 512 bytes.

You can call NWGetExtendedVolumeInfo (Volume Services) to return the block size (in bytes).

NCP Calls

See Also

NWGetVolumeNumber (Volume Management)