Renames an entry in the specified name space, given a path specifying the entry name
#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);
uses calwin32
Function NWSetLongName
(conn : NWCONN_HANDLE;
dirHandle : nuint8;
namSpc : nuint8;
dstPath : pnstr8;
dstType : nuint16;
longName : pnstr8
) : NWCCODE;
(IN) Specifies the NetWare server connection handle.
(IN) Specifies the directory handle of the parent directory.
(IN) Specifies the name space of dstPath (see Section 20.5, Name Space Flag Values).
(IN) Points to the name of the directory or file to rename.
(IN) Specifies the directory or file type that dstPath points to.
(IN) Points to the new name (256 bytes maximum).
These are common return values; see Return Values (Return Values for C) for more information.
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:
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.