GetVolumeInfoWithNumber

Returns information about a volume by volume number

Local Servers:blocking
Remote Servers:blocking
NetWare Server:3.x, 4.x, 5.x, 6.x
Platform:NLM
SMP Aware:No
Service:Volume

Syntax

   #include <nwdir.h> 
    
    int GetVolumeInfoWithNumber (  
       BYTE    volumeNumber, 
       char   *volumeName, 
       WORD   *totalBlocks, 
       WORD   *sectorsPerBlock, 
       WORD   *availableBlocks, 
       WORD   *totalDirectorySlots, 
       WORD   *availableDirectorySlots, 
       WORD   *volumeIsRemovable);
   

Parameters

volumeNumber
(IN) Specifies the number of the volume slot (0-254 for NetWare 5.x and 6.x, 0-63 for NetWare 3.1 and 4x, 0-31 for previous versions). Even though the Volume Mount Table is 256 slots in size (0-255), the system reserves 255 as an invalid volume ID.
volumeName
(OUT) Returns a string containing the volume name (maximum 16 characters, including the NULL terminator).
totalBlocks
(OUT) Returns the number of blocks on the volume.
sectorsPerBlock
(OUT) Returns the number of sectors in a block.
availableBlocks
(OUT) Returns the number of unused blocks on the volume.
totalDirectorySlots
(OUT) Returns the number of directory slots on the volume.
availableDirectorySlots
(OUT) Returns the number of unused directory slots on the volume.
volumeIsRemovable
(OUT) Set to NULL. Always returns TRUE.

Return Values

Decimal

Hex

Constant

0

(0x00)

ESUCCESS

NetWare Error

UNSUCCESSFUL

Remarks

The GetVolumeInfoWithNumber function returns information about a volume by passing a volume number. The volumeNumber identifies the volume in the server’s Volume Table. The Volume Table contains information about each volume on the server. A server running NetWare 3.1 or above can accommodate up to 64 volumes.

The volumeName parameter must be 16 bytes long. A volume name can be from 2 to 15 characters long plus the NULL terminator and cannot include spaces or the following characters:

*

Asterisk

?

Question mark

:

Colon

/

Slash

\

Backslash

The sectorsPerBlock parameter shows the number of 512-byte sectors contained in each block of the specified volume.

The totalDirectorySlots parameter shows the number of total directory slots available (NetWare 3.x and 4.x) or allocated (in the case of NetWare 2.x).

NOTE:This function requires console operator rights for NetWare 2.x, but not 3.x or 4.x. Therefore, if you call this function remotely on a NetWare 2.x server, you must have console operator rights.

See Also

GetVolumeInformation, GetVolumeName, GetVolumeNumber, GetVolumeStatistics