GetVolumeNumber

Returns the volume number for a volume

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 GetVolumeNumber (  
       char   *volumeName, 
       int    *volumeNumber);
   

Parameters

volumeName
(IN) Specifies the string containing the volume name (maximum 16 characters, including the NULL terminator).
volumeNumber
(OUT) Receives the volume number associated with the volumeName (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.

Return Values

Decimal

Hex

Constant

0

(0x00)

ESUCCESS

152

(0x98)

ERR_VOLUME_DOES_NOT_EXIST

Remarks

The GetVolumeNumber function converts a volume name to a zero-based index. The volumeName parameter is 16 bytes long. A volume name can be from 2 to 16 characters long and cannot include spaces or the following characters:

*

Asterisk

?

Question Mark

:

Colon

/

Slash

\

Backslash

Wildcards are not allowed in the volume name.

The volumeNumber identifies the volume in the server’s VolumeTable. 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.

See Also

GetVolumeInformation, GetVolumeInfoWithNumber, GetVolumeName, GetVolumeStatistics