Registers a function to convert a pathname in a name space format to the NetWare format (volume number, path, string, path count)
#include <nwfileng.h>
int FERegisterNSPathParser (
T_PathParseFunc parser);
(IN) Specifies the address of a function to be called by all other functions that require a NetWare style pathname.
Returns 0 if successful; otherwise, returns an error (see Return Values for C for more information).
Before calling FERegisterNSPathParser, you must set the current name space to the appropriate name space by calling SetCurrentNameSpace. Once the new path parser is registered, functions such as open call the new path parser to translate the path parameter into its NetWare counterparts.
To reverse FERegisterNSPathParser, ensure that the current name space is the name space that was in effect at the time that the parsing function was registered. Then call FERegisterNSPathParser, passing NULL for the parser parameter. The previously registered parser will be deleted and the default parser will be used.
When a path parse function has been registered, and conversion of a pathname to NetWare format is required by a function, the registered name space path parser is called in place of the regular NetWare API path parser.
The registered name space path parser must convert a pathname string into a NetWare pathname. A NetWare pathname consists of a path string count and a string of elements (path). The count is the number of elements that are in the path. Each element can be a length-preceded directory or filename. The NetWare path, however, does not contain the server or volume information.
The following is an example of a NetWare path. The path string count is 3; it contains three elements (dir1, dir2, and dir3).
\0x3dir1\0x3dir2\0x8filename
The prototype for the path parse function is in nwfileng.h and is defined as follows:
typedef int (*T_PathParseFunc) (
const char *inputPath,
WORD *fileServerIDp,
int *volumeNumberP,
LONG *directoryNumberP,
BYTE *outPathStringP,
LONG *outPathCountP)
(IN) Input path string to be parsed.
(OUT) File server ID of the server where the file is located.
(OUT) Volume number of the file.
(OUT) Directory number of the file.
(OUT) Path string in NetWare format.
(OUT) Path string count.