char *Ns_ConfigGetPath( char *hServer, char *module, ... );
Ns_ConfigGetPath("server1", NULL, "special", NULL)
will return "\NS\Server\server1\special" if such a section exists in the configuration file and NULL if it does not.The space for the string returned is located in the configuration data. You do not need to deallocate the string and you must not alter it.
int DllExport Ns_ModuleInit(char *hServer, char *hModule) { char *path; char *value; /* * Construct the MySub section name specific to this * server and module. For example, if hServer = "vs1" * and hModule = "mymod", path would be: * [ns/server/vs1/module/mymod/MySudb] */ path = Ns_ConfigGetPath(hServer, hModule, "MySub", NULL); value = Ns_ConfigGetValue(path, "MyKey"); ...