NWSMLoadNLM2

Loads a selected NLM on a server

NetWare Server:4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98
Library:Cross-Platform NetWare Calls (CAL*.*)
Service:Server Management

Syntax

  #include <nwsm.h> 
  or 
  #include <nwcalls.h> 
   
  N_EXTERN_LIBRARY NWCCODE NWSMLoadNLM2 (
     NWCONN_HANDLE     connHandle,  
     const nstr8 N_FAR *loadCommand,
     pnuint32          loadNLMReturnCode); 
  

Delphi Syntax

  uses calwin32 
   
  Function NWSMLoadNLM2 
    (connHandle : NWCONN_HANDLE; 
     loadCommand : const nstr8 N_FAR
     loadNLMReturnCode : pnuint32 
  ) : NWCCODE; 
  

Parameters

connHandle
(IN) Specifies the server connection handle which is being managed.
loadCommand
(IN) Points to the load command for the NLM. It must be NULL terminated; maximum length is 482 bytes.
loadNLMReturnCode
(OUT) Points to nuint32 variable which contains a return code from the loading NLM procedure in servers when the return code from NWSMLoadNLM2 is 0x0202. See the Remarks section for possible values.

Return Values

These are common return values; see Return Values (NDK: Connection, Message, and NCP Extensions) for more information.

0x0000

SUCCESS

0x0202

Unable to load specified module

0x8801

INVALID_CONNECTION

0x890A

NLM_INVALID_CONNECTION

0x88FB

ERR_NCP_NOT_SUPPORTED

0x899E

INVALID_FILENAME

Remarks

You must be logged in with the connection specified by connHandle, be permanently authenticated, and have a minimum of console operator rights to call NWSMLoadNLM2.

loadCommand can be any string that is valid for the LOAD command on the console (except it does not include the actual "LOAD" command). It contains the NLM name (including the path if it is not in the server path), and command line parameters if any.

The LOAD command has the following format:

  {VOLUME NAME:}{PATH\...}NLMname{.ext}{parameters}
  

NWSMLoadNLM2 does not support UNC paths.

NWSMLoadNLM2 is an enhancement version of NWSMLoadNLM. It provides extra information to explain why the function cannot load an NLM.

The following values are possibilities when the loadNLMReturnCode is 0x0202:

  LOAD_COULD_NOT_FIND_FILE            1
  LOAD_ERROR_READING_FILE             2
  LOAD_NOT_NLM_FILE_FORMAT            3
  LOAD_WRONG_NLM_FILE_VERSION         4
  LOAD_REENTRANT_INITIALIZE_FAILURE   5
  LOAD_CAN_NOT_LOAD_MULTIPLE_COPIES   6
  LOAD_ALREADY_IN_PROGRESS            7
  LOAD_NOT_ENOUGH_MEMORY              8
  LOAD_INITIALIZE_FAILURE             9
  LOAD_INCONSISTENT_FILE_FORMAT       10
  LOAD_CAN_NOT_LOAD_AT_STARTUP        11
  LOAD_AUTO_LOAD_MODULES_NOT_LOADED   12
  LOAD_UNRESOLVED_EXTERNAL            13
  LOAD_PUBLIC_ALREADY_DEFINED         14
  LOAD_XDC_DATA_ERROR                 15
  LOAD_NOT_OS_DOMAIN                 16
  

NCP Calls

See Also

NWSMLoadNLM, NWSMUnloadNLM