Registers a cleanup function to be used when third-party library unloads.
#include <library.h> int register_destructor ( int libid, int (*cleanupFunc)( void *data_area ));
(IN) Specifies a registered library.
(IN) Points to a function to be called whenever one of the clients of the library is terminated by either an UNLOAD command or because the NLM terminated itself by calling exit, abort, NXThreadExit, or so on.
If successful, returns 0. Otherwise, returns -1 and sets errno to the following:
This function provides a way to back-register or replace a destructor function after the library has already been registered. It is mostly used by NLM applications exporting DllMain.