There are three traditional veins of NetWare Loadable Module (NLM) writing: (1) low-level kernel extensions such as drivers, protocol stacks, namespaces, and so on; (2) applications; and (3) libraries. Of the three, libraries have been the most vague and contradicted topic of discussion over the 14-year history of NLM writing. This is the topic addressed by this AppNote.
This AppNote provides some discussion and recommendations for writing NLMs as dynamic libraries. Feel free to consume this source code in any way you see fit for writing your own NLM library.
This follow-up AppNote is an update for more POSIX-oriented work: http://www.novell.com/coolsolutions/appnote/583.html