_NutQueryWinNetFileDir()

return directory containing Windows networking files 

Function


SYNOPSIS

#include <nutc.h>

char *_NutQueryWinNetFileDir(int fmt);


DESCRIPTION

This function returns the path to the directory that contains the Windows networking files(for example, the hosts and networks file). This function is equivalent to the following code fragment (which ignores the setting of fmt, for the sake of clarity):

if ((sysconf(_SC_NUTC_OS_PLATFORM) & NUTC_PLAT_WIN9x) != 0) {
	strcpy(buf, _NutQueryWinDir(NUTFMT_NUTC));
} else {
	strcpy(buf, _NutQueryWinSysDir(NUTFMT_NUTC));
	strcat(buf, "/drivers/etc");
}

return buf;

You should use the return value from this function in place of a hard-coded /etc in any code that needs to locate networking configuration files.

Note:

This function returns a pointer to a static buffer. Do not modify the string returned by this function.


PARAMETERS

fmt 

When NUTFMT_WIN32, indicates that the path should be returned in Windows format.

When NUTFMT_NUTC, indicates that the path should be returned in NuTCRACKER Platform format.

When NUTFMT_WIN32_FS, indicates that the path should be returned in Windows format, using forward slashes (also known as MKS format).


RETURN VALUES

_NutQueryWinNetFileDir() returns a pointer to the windows network file directory in the specified format.


CONFORMANCE

PTC MKS Toolkit UNIX APIs extension.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
_NutPathToNutc(), _NutPathToWin32(), _NutPathToWin32FS(), _NutQueryRootDir(), _NutQueryWinDir(), _NutQueryWinSysDir()


PTC MKS Toolkit 10.3 Documentation Build 39.