Function _conSetMemvar() Foundation
Assign the value of a container to an Xbase++ memvar.
XPPAPIRET _conSetMemvar(CHAR *name,
ContainerHandle chValue);
This function returns NULL if no error occured, otherwise it returns an error code which can be checked by _conLastError().
The function _conSetMemvar() is used to assign the value of a container to an Xbase++ memvar. If this memvar does not already exist, it will be created by the function.
#include <windows.h>
#include "xppdef.h"
#include "xpppar.h"
#include "xppcon.h"
XPPRET XPPENTRY MyCAPIFunction(XppParamList paramList)
{ /* Declare and initialize variables */
ContainerHandle chValueA = _conGetMemvar( "VALUEA", NULLCONTAINER );
ContainerHandle chValueB = _conGetMemvar( "VALUEB", NULLCONTAINER );
/* Now swap values. */
_conSetMemvar( "VALUEA", chValueB );
_conSetMemvar( "VALUEB", chValueA );
/* Release containers. */
_conRelease( chValueA );
_conRelease( chValueB );
}
/* Xbase++ code */
PROCEDURE Main
PUBLIC ValueA := 1
PUBLIC ValueB := 2
CLS
? ValueA, ValueB
MyCAPIFunction()
? ValueA, ValueB
RETURN
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.