NSL Library not initialized
A library call that has an error return value in the neighborhood of -10000000 means that the library function was called, but NalpLibOpen() was never called or was called and failed (with a < 0 error return), or NalpLibClose() was called and then further calls into the library were made.
Solution
Initialize the library with a call to NalpLibOpen() before using other calls.
When the library is initialized it sets up internal structures needed to operate. One of the things passed into the initialization routines are the authentication constants. These constants are used to construct a psuedo-random security offset that is added to the return value from many functions. The security offset is intended to make spoofing of the library more difficult.
If one of the library functions is called without the library having been initialized the library needs to return an error condition (return value < 0). But, it cannot use the security offset, because without initialization the library cannot construct the security offset.
In some situations, the library will return the large, negative value (-10000000) adjusted with the random portion of the random security offset computation, resulting in false return values that are in the neighborhood of -10000000.