Assigns a value to a particular variable.
returnCode = wcSetVariable(cntrlHandle, "$myvar", "value");
int wcSetVariable(void *controlHandle, char *varName, char *value)
controlHandle | The handle to the control structure. |
varName | Name of the variable for which you want to set the value. Variable names are case-sensitive, begin with a "$", and consist of alphanumeric characters with a maximum of 80 characters. Variable names may not include underscore characters. |
value | The new value to assign to the variable. |
0 | Success. |
Error code | Failure or exception. For a list of possible error codes, see Error Messages. |
The following code shows how wcSetVariable( ) is used in an application.
wcGetVariable(wcp, "$MIval", &mival); if (mival==NULL) wcSetVariable(wcp, "$MIval", "firstpage");
wcGetVariable( )
wcDropVariable( )