environ_ns* NewNeticaEnviron_ns ( const char*  license,   environ_ns*  subenv,   const char*  locn )

This is always the first function to call when using Netica API. It creates a new environ_ns structure that is suitable for passing to InitNetica2_bn.

For license pass the license string provided to you when you purchased Netica, or NULL if you don't have one. The behavior of the Netica system may be limited by the license you use.

Pass NULL (i.e., 0) for subenv and locn; they are just for future expansion.

Most applications will have only one global environment, and in that case the best approach is to make a global variable of type environ_ns*, set it to the value returned by this function, and then pass it to any function that requires it.

This function does not generate any error conditions. The subsequent call to InitNetica2_bn will report if anything went wrong.

Netica will make a copy of license; it won't modify or free the passed string.


Versions 2.09 and earlier had a function called NewNeticaEnviron_bn (_bn instead of _ns) instead, which didn't take the locn or subenv arguments.

See also:

InitNetica2_bn    Initialize the environ_ns created
CloseNetica_bn    Delete the environ_ns created
LimitMemoryUsage_ns    To limit the amount of memory that can be allocated for this environ_ns


See InitNetica2_bn