NWSMLoadNLM2
Loads a selected NLM on a server
#include <nwsm.h> or #include <nwcalls.h> N_EXTERN_LIBRARY NWCCODE NWSMLoadNLM2 ( NWCONN_HANDLE connHandle, const nstr8 N_FAR *loadCommand, pnuint32 loadNLMReturnCode);
uses calwin32 Function NWSMLoadNLM2 (connHandle : NWCONN_HANDLE; loadCommand : const nstr8 N_FAR loadNLMReturnCode : pnuint32 ) : NWCCODE;
These are common return values; see Return Values (NDK: Connection, Message, and NCP Extensions) for more information.
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