Formats a fully qualified parent directory path according to the specified NetWare name space specifications, but is obsolete. Call NWSMTSFixDataSetName instead.
#include <smsutapi.h> STRING NWSMFixDirectoryPath ( STRING *path, UINT32 nameSpaceType, STRING_BUFFER **newPath, NWBOOLEAN wildAllowedOnTerminal);
(IN/OUT) Points to the NetWare path to be fixed on input. Points to the formatted string on output.
(IN) Specifies the name space type of path (see nameSpaceType Values).
(OUT) Points to the buffer to contain the fixed up directory path (optional).
(IN) Specifies if the path contains wildcard in the last path node:
The following table lists the return values associated with the function.
NWSMFixDirectoryPath ensures that path has a primary separator and the proper case. If path does not contain a primary separator ( : or :: ), it returns NULL.
Volume names on NetWare and DOS paths are always converted to upper case.
If wildAllowedOnTerminal is set and the path nodes (other than the terminal node) contain wildcards, NWSMFixDirectoryPath returns NULL.
NWSMFixDirectoryPath adds an end separator to the terminal path node if the terminal path node is a parent. If an ending separator is added to the string, newPath will contain the formatted string.
The following statement determines where the formatted path will be returned:
if (newPath && newpath->string) /* newPath contains the fixed up path. */ else /* path contains the fixed up path. */
Usually, path and nameSpaceType are determined from NWSM_DATA_SET_NAME_LIST.
The following fixes are applied to path for the specified name space (except Macintosh):
All backslashes ( \ ) are converted to forward slashes ( / ).
For all colon and slash combinations ( :\ or :/ ), the slash is removed and all characters after the slash are moved one space toward the colon.
If newPath is NULL, NWSMFixDirectoryPath allocates the needed buffer space.
Call NWSMFreeString to free the buffer memory.
If the name space requires it, a separator must follow a parent terminal node.
IMPORTANT:This API is not supported in NetWare 6.5.
unsigned char *p = “Vol1:\system\temp”, *ptr; STRING path = p; UINT32 nameSpaceType = DOSNameSpace; STRING_BUFFER *newPath = NULL; ptr = NWSMFixDirectoryPath(path, nameSpaceType, &newPath, FALSE); if (newPath && newPath->string) { /* newPath contains the fixed up path. */ } else /* path contains the fixed up path. */