wcGetVariable( )

Syntax . . Returns . . Tips . . Program Example . . Related Topics . . A-Z Index . . Home

Gets the value of a particular variable.

Example

returnCode = wcGetVariable(cntrlHandle, "$customerSelection", &product);

Syntax

int wcGetVariable(void *controlHandle, 
                  char *varName,
                  char **currentValue)
controlHandleThe handle to the control structure.
varNameName of the variable for which you want to get the value.
currentValueOut parameter used to return a pointer to the data associated with the specified varName.

Returns

0Success.
Error codeFailure or exception. For a list of possible error codes, see Error Messages.

Tips

Program Example

The following code shows how wcGetVariable( ) is used in an application.


    wcGetVariable(wcp, "$MIval", &mival);

    if (mival==NULL)
        wcSetVariable(wcp, "$MIval", "firstpage");

Related Topics

wcSetVariable( )
wcDropVariable( )


Top of Page . . Syntax . . Returns . . Tips . . Program Example . . A-Z Index . . Home