UnloadModule

Unloads an NLM.

Library:LibC
Classification:NetWare OS
Service:NetWare Platform

Syntax

  #include <netware.h>
   
  int UnloadModule (
     scr_t        *scrID,
     const char   *commandLine);
  

Parameters

scrID

(IN) Points to the application screen for the NLM.

commandLine

(IN) Points to a command string that contains the address space and/or the module name to unload. The string must be all in uppercase. See Remarks for sample command strings.

Return Values

If successful, returns 0. Otherwise, returns one of the following error codes:

Decimal

Name

Description

-1

The specified address space was not found.

513

ERR_MODULE_NOT_UNLOADED

The specified address space was not found.

Remarks

The UnloadModule function unlinks a loadable module from the operating system. An address space can also be specified to unload a module from a specific address space. If an address space is specified without a module name, all of the NLM applications in that address space will be unloaded.

To unload a module that was loaded with a long name (which includes space characters), the module name specified in the commandLine string must be placed in double quotes. If there are multiple instances of the specified module loaded, UnloadModule attempts to unload all instances.

The following examples list commandLine parameter strings and explain what is unloaded when you use such a string.

IMPORTANT:Command strings must be all in uppercase.

"MONITOR"

Unloads the NLM with the specified name.

"ADDRESS SPACE=GROUPWISE"

Unloads all modules from the groupwise address space.

"ADDRESS SPACE=GROUPWISE CLIB"

Unloads clib.nlm from the groupwise address space.

"KILL ADDRESS SPACE=GROUPWISE"

Shuts down the groupwise address space.

"\"MY LONG NAME MODULE.NLM"\"

Unloads the module named "my long name module.nlm" which contains spaces.

"NE2000.LAN"

If multiple instances of NE2000.LAN were loaded, UnloadModule attempts to unload all instances of the NE2000.LAN module.

See Also