NWSetLongName

Renames an entry in the specified name space, given a path specifying the entry name

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 NWSetLongName ( 
      NWCONN_HANDLE       conn,  
      nuint8              dirHandle,  
      nuint8              namSpc,  
      const nstr8 N_FAR  *dstPath,  
      nuint16             dstType,  
      const nstr8 N_FAR  *longName);
   

Delphi Syntax

   uses calwin32 
    
   Function NWSetLongName 
     (conn : NWCONN_HANDLE; 
      dirHandle : nuint8; 
      namSpc : nuint8; 
      dstPath : pnstr8; 
      dstType : nuint16; 
      longName : pnstr8 
   ) : NWCCODE;
   

Parameters

conn

(IN) Specifies the NetWare server connection handle.

dirHandle

(IN) Specifies the directory handle of the parent directory.

namSpc

(IN) Specifies the name space of dstPath (see Section 20.5, Name Space Flag Values).

dstPath

(IN) Points to the name of the directory or file to rename.

dstType

(IN) Specifies the directory or file type that dstPath points to.

longName

(IN) Points to the new name (256 bytes maximum).

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

0x899E

INVALID_FILENAME

Remarks

dirHandle must point to the parent directory.

dstPath and longName must be valid names containing only one component. dirHandle will specify the path where the one component is located.

dstType can take on the following values:

C Value

Delphi Value

Value Name

0x8000

$0800

NW_TYPE_FILE

0x0010

$0010

NW_TYPE_SUBDIR

Resetting a filename in one name space resets the name in all name spaces. The shortening algorithm is used for the DOS and/or Macintosh name spaces, if appropriate.

AFP directory and file names contain from 1 to 31 characters and consist of a Delphi string preceded by one byte which specifies the length of the name. AFP names can contain any ASCII character between 1 and 255 except the colon (:) but cannot be terminated by a NULL character (character 0). NetWare servers automatically generate DOS-style file names (short names) for all AFP directories, as well as for created files and accessed files. NetWare servers maintain both the AFP name and the short name for each AFP directory and file.

For explanation of how long names are converted to DOS style names, see NetWare 4.x and NetWare 5.x and 6.x.

NCP Calls

See Also

NWGetLongName