User Guide

Installation Scripts for NetWare 155
Other Installation Options
103-000143-001
August 30, 2001
Novell Confidential
Manual 99a38 July 17, 2001
ICMDGetVar
Use the ICMDGetVar function to get the value of a script variable.
Function
int ICMDGetVar (char *variableName, char *variableValue)
*variableName: Pointer to name of variable
*variableValue: Buffer containing value of variable; must be at least 128
bytes
Return
0 if successful; non-zero error code if unsuccessful or if variableName does
not exist.
Description
ICMDGetVar is a function exported by ICMD.NLM that another NLM can
call. This lets the NLM set a variable within a script being executed by
ICMD.NLM so the NLM can communicate with the script, changing the
control flow, etc.
Example
If a script looks like this:
SetVar myvar, “Hello”
NLMExec 1, mynlm
and if MYNLM.NLM has code as follows:
char buffer[128];
ICMDGetVar(“myvar”, buffer);
then the value in buffer would be the null-terminated string:
“Hello”.