NWGetDriveStatus

Returns the status of the specified drive and, optionally, the associated connection and its path in various formats

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 )NWGetDriveStatus  ( 
      nuint16               driveNum,  
      nuint16               pathFormat,  
      pnuint16              status,  
      NWCONN_HANDLE N_FAR  *conn,  
      pnstr8                rootPath,  
      pnstr8                relPath,  
      pnstr8                fullPath);
   

Delphi Syntax

   uses calwin32 
    
   Function NWGetDriveStatus 
     (driveNum : nuint16; 
      pathFormat : nuint16; 
      status : pnuint16; 
      Var conn : NWCONN_HANDLE; 
      rootPath : pnstr8; 
      relPath : pnstr8; 
      fullPath : 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.

pathFormat

(IN) Specifies the desired format for the return paths.

status

(OUT) Points to a bit mask indicating if the drive is local and/or networked.

conn

(OUT) Points to the connection handle of the path driveNum is mapped to, if any (optional).

rootPath

(OUT) Points to the base path driveNum is mapped to (optional).

relPath

(OUT) Points to the path (relative to the rootPath parameter) to which the drive number is mapped (optional).

fullPath

(OUT) Points to the full path of driveNum, if it is a network drive (optional).

Return Values

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

0x0000

SUCCESSFUL

0x000F

NW_INVALID_DRIVE

0x8800

Unknown Error Occurred; Unable to Complete Request

0x883C

NOT_MY_RESOURCE

Remarks

Currently, NWGetDriveStatus returns the status of local drives, but does not return path strings for these paths to prevent critical errors from occurring on removable drives. (May change with future releases.)

See Section 21.1, Path Parameters for input values and examples of returned information.

NW_LOCAL_DRIVE indicates the specified drive letter is lower than the first networked drive which usually defaults to F: and is set in the net.cfg file.

See Also

NWGetFirstDrive