NWGetVolumeInfoWithHandle

Returns the physical information or data of a server’s volumes

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) NWGetVolumeInfoWithHandle ( 
      NWCONN_HANDLE   conn,  
      NWDIR_HANDLE    dirHandle,  
      pnstr8          volName,  
      pnuint16        totalBlocks,  
      pnuint16        sectorsPerBlock,  
      pnuint16        availableBlocks,  
      pnuint16        totalDirEntries,  
      pnuint16        availableDirEntries,  
      pnuint16        volIsRemovableFlag); 
   
   

Pascal Syntax

   uses calwin32 
    
   Function NWGetVolumeInfoWithHandle( 
      conn : NWCONN_HANDLE; 
      dirHandle : NWDIR_HANDLE; 
      volName : pnstr8; 
      totalBlocks : pnuint16; 
      sectorsPerBlock : pnuint16; 
      availableBlocks : pnuint16; 
      totalDirEntries : pnuint16; 
      availableDirEntries : pnuint16; 
      volIsRemovableFlag : pnuint16 
   ) : NWCCODE; 
   

Parameters

conn
(IN) Specifies the NetWare server connection handle.
dirHandle
(IN) Specifies the directory handle pointing to the directory on the volume whose information is to be reported.
volName
(OUT) Points to the volume name (optional 17 character buffer including the terminating NULL).
totalBlocks
(OUT) Points to the total number of blocks on the volume (optional).
sectorsPerBlock
(OUT) Points to the number of sectors per block (optional).
availableBlocks
(OUT) Points to the total number of unused blocks on the volume (optional).
totalDirEntries
(OUT) Points to the total number of physical directory entries (optional).
availableDirEntries
(OUT) Points to the number of unused directory entries (optional).
volIsRemovableFlag
(OUT) Set to NULL. The value in this field is never set.

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

0x89FF

HARDWARE_FAILURE

Remarks

NWGetVolumeInfoWithHandle returns a 16-bit number in the totalBlocks parameter. If the volume size is greater than a 16-bit number (or 256 megabytes), NWGetDirSpaceInfo should be called.

dirHandle is an index number (1 through 255) pointing to a volume, directory, or subdirectory on the NetWare server. Directory handles are recorded in the Directory Handle Table maintained by the server for each logged-in workstation. When a workstation allocates a directory handle, the NetWare server enters the volume number and directory entry number for the specified directory into the Directory Handle Table. Applications running on the workstation can then refer to a directory using a directory handle, which is actually an index into the Directory Handle Table.

Since all of the output parameters are optional, substitute NULL for unwanted information. However, all parameter positions must be filled.

Volumes use logical sector sizes of 512 bytes. If the physical media uses a different sector size, the server performs appropriate mappings. Volume space is allocated in groups of sectors called blocks.

sectorsPerBlock indicates how many 512-byte sectors are contained in each block of the specified volume.

totalDirEntries indicates how many directory entries were allocated for the specified volume during installation. If this information is meaningless under a given server’s implementation, it is 0xFFFF.

volIsRemovableFlag indicates whether a user can physically remove the volume from the NetWare server. It returns one of the following values:

   0x0000 = not removable/fixed media 
   non-zero = removable/mountable
   

With NetWare 4.x, 5.x, 6.x, and SFTIII, the volume sector size can be changed from the 512-byte default. If changed, NWGetVolumeInfoWithHandle may return adjusted data meeting DOS requirements. totalBlocks, sectorsPerBlock and availableBlocks may be affected. To see the actual field size, call NWGetExtendedVolumeInfo.

NOTE:Block size can be found by calling NWGetExtendedVolumeInfo and multiplying sectorSize and sectorPerCluster.

NCP Calls

See Also

NWGetDirSpaceInfo (Multiple and Inter-File Services), NWGetVolumeInfoWithNumber