NWGetNSPath

Returns the full NetWare path for the desired name space associated with the specified path

Local Servers:blocking
Remote Servers:blocking
NetWare Server:3.11, 3.12, 3.2, 4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98
Library:Cross-Platform NetWare Calls (CAL*.*)
Service:Name Space

Syntax

   #include <nwnamspc.h> 
   or 
   #include <nwcalls.h> 
    
   NWCCODE N_API  NWGetNSPath  ( 
      NWCONN_HANDLE      conn,  
      nuint8             dirHandle,  
      nuint16            fileFlag,  
      nuint8             srcNamSpc,  
      nuint8             dstNamSpc,  
      NW_NS_PATH N_FAR  *NSPath);
   

Delphi Syntax

   uses calwin32 
    
   Function NWGetNSPath 
     (conn : NWCONN_HANDLE; 
      dirHandle : nuint8; 
      fileFlag : nuint16; 
      srcNamSpc : nuint8; 
      dstNamSpc : nuint8; 
      Var NSPath : NW_NS_PATH 
   ) : NWCCODE;
   

Parameters

conn

(IN) Specifies the NetWare server connection handle.

dirHandle

(IN) Specifies the directory handle associated with the desired name space.

fileFlag

(IN) Specifies whether the source path ends with a file or a directory name:

   0 = directory name 
   1 = file name
   
srcNamSpc

(IN) Specifies the name space used for srcPath in NSPath (see Section 20.5, Name Space Flag Values).

dstNamSpc

(IN) Specifies the name space for the return path (see Section 20.5, Name Space Flag Values).

NSPath

(IN/OUT) Points to NW_NS_PATH.

Return Values

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

0x0000

SUCCESSFUL

0x8801

INVALID_CONNECTION

0x890A

NLM_INVALID_CONNECTION

0x8998

VOLUME_DOES_NOT_EXIST

0x899B

BAD_DIRECTORY_HANDLE

0x899C

INVALID_PATH

Remarks

A full path includes the volume name. For example:

   volume:path\path
   

If the fileFlag parameter is set to 0 (indicating a directory name is being passed) and a file name is passed, INVALID_PARAMETER will be returned. The same error will be returned if the fileFlag parameter is set to 1 (indicating a file name is being passed) and a directory name is passed.

NWGetNSPath returns only the directory path name even if a file name was passed.

On NetWare server versions 3.12 and before, NWGetNSPath will return INVALID_PATH when used to return the full path of a root file.

NCP Calls