NWGetVolumeInfoWithHandle(3nw)


NWGetVolumeInfoWithHandle -- returns the physical information or data of a server's volumes

Synopsis

   #include <nwvol.h> 
   or 
   #include <nwcalls.h> 
   

NWCCODE N_API NWGetVolumeInfoWithHandle (NWCONN_HANDLE conn, NWDIR_HANDLE dirHandle, pnstr8 volName, pnuint16 totalBlocks, pnuint16 sectorsPerBlock, pnuint16 availableBlocks, pnuint16 totalDirEntries, pnuint16 availableDirEntries, pnuint16 volIsRemovableFlag);

Description

The parameters are as follows:

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) Points to a flag indicating whether the volume is removable (optional).

Return values

0x0000
SUCCESSFUL

0x8801
INVALID_CONNECTION

0x8998
VOLUME_DOES_NOT_EXIST

0x899B
BAD_DIRECTORY_HANDLE

0x899C
INVALID_PATH

0x89FF
HARDWARE_FAILURE

Notices

NWGetDirSpaceInfo should be called to return information on volumes whose size is greater than 256 megabytes.

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 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.


Services

Volume

NCP calls

0x2222 22 21
Get Volume Info With Handle

References

NWGetDirSpaceInfo(3nw), NWGetVolumeInfoWithNumber(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.