NWGetDriveInformation

Returns information about the specified drive

NetWare Server:3.11, 3.12, 3.2, 4.x, 5.x, 6.x
Platform:Windows NT, Windows 95, Windows 98
Library:Cross-Platform NetWare Calls (CAL*.*)
Service:Path and Drive

Syntax

   #include <nwdpath.h> 
   or 
   #include <nwcalls.h> 
    
   N_EXTERN_LIBRARY( NWCCODE )NWGetDriveInformation  ( 
      nuint16               driveNum,  
      nuint16               mode,  
      NWCONN_HANDLE N_FAR  *conn,  
      NWDIR_HANDLE N_FAR   *dirHandle,  
      pnuint16              driveScope,  
      pnstr8                dirPath);
   

Delphi Syntax

   uses calwin32 
    
   Function NWGetDriveInformation 
     (driveNum : nuint16; 
      mode : nuint16; 
      Var conn : NWCONN_HANDLE; 
      Var dirHandle : NWDIR_HANDLE; 
      driveScope : pnuint16; 
      dirPath : pnstr8 
   ) : NWCCODE;
   

Parameters

driveNum

(IN) Specifies the drive number for which to get the status (A=1, B=2, C=3, . . .); pass 0 for current drive.

mode

Currently unused.

conn

(OUT) Points to the connection ID of the server the drive is currently mapped to.

dirHandle

(OUT) Points to the directory handle associated with the specified drive.

driveScope

(OUT) Points to the drive scope (currently returns GLOBAL).

dirPath

(OUT) Points to the current directory of the specified drive.

Return Values

These are common return values; see Return Values (Return Values for C) for more information.

0x0000

SUCCESSFUL

0x000F

DOS_INVALID_DRIVE

0x883C

NOT_MY_RESOURCE

0x89FF

INVALID_DRIVE_NUMBER

Remarks

If driveNum is 0, information about the current drive is returned.

DOS_INVALID_DRIVE is returned if the drive is not defined.

If VLMs are running, dirHandle returns 0. VLMs do not associate a directory handle with a mapped drive, no directory handle can be returned. For example, if NETX version 3.32 is running, NWGetDriveInformation will return a valid dirHandle (non-zero) and a valid dirPath. If VLM version 1.20 is running, NWGetDriveInformation returns a dirHandle of zero and a valid dirPath (the same dirPath returned when NETX was running).

Under Windows NT, a dirHandle will not be returned. Under all other platforms, if dirHandle does not point to NULL, a dirHandle will be returned if NETX support is available. Otherwise, NWGetDriveInformation will return NWE_REQUESTER_FAILURE (0x88FF).

Under NLM, INVALID_SHELL_CALL is always returned.

See Also

NWGetFirstDrive