NWSetDriveBase

Maps the target drive to the specified directory path

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) NWSetDriveBase ( 
      nuint16             driveNum,  
      NWCONN_HANDLE       conn,  
      NWDIR_HANDLE        dirHandle,  
      const nstr8 N_FAR  *dirPath,  
      nuint16             driveScope);
   

Delphi Syntax

   uses calwin32 
    
   Function NWSetDriveBase 
     (driveNum : nuint16; 
      conn : NWCONN_HANDLE; 
      dirHandle : NWDIR_HANDLE; 
      dirPath : pnstr8; 
      driveScope : nuint16 
   ) : NWCCODE;
   

Parameters

driveNum

(IN) Specifies the drive number of the drive being mapped (0=current, 1=A, 2=B,. . .).

conn

(IN) Specifies the NetWare server connection handle to which the drive is mapped.

dirHandle

(IN) Specifies the directory handle associated with dirPath.

dirPath

(IN) Points to the directory path the drive will be mapped to. dirPath is relative to dirHandle, unless dirHandle is 0.

driveScope

Reserved for Novell use only; must be 0.

Return Values

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

0x0000

SUCCESSFUL

0x8801

INVALID_CONNECTION

0x8802

DRIVE_IN_USE (Windows NT): The drive number is already mapped

0x8803

DRIVE_CANNOT_MAP

0x883C

NOT_MY_RESOURCE: Trying to map a local drive

0x8875

INVALID_DRIVE_NUM

0x8998

VOLUME_DOES_NOT_EXIST

0x899B

BAD_DIRECTORY_HANDLE

0x899C

INVALID_PATH

0x89FF

INVALID_DRIVE_NUMBER (Windows NT): An invalid drive number is being used

Remarks

If the specified drive number is zero, the current drive will be remapped to the specified path. For other drive numbers, if the target drive is already mapped, the mapping must be deleted by calling NWDeleteDriveBase before calling NWSetDriveBase.

Under all platforms, CD-ROM drives cannot be mapped.

The server name should not be specified in the dirPath parameter. Specify the server name in the conn parameter. Under NETX.EXE, the server name can be parsed, but VLMs do not parse out the server name.

Under NLM, INVALID_SHELL_CALL is always returned.

See Also

NWDeleteDriveBase, NWGetDriveStatus