Function _conReturn() Foundation
Defines the value returned by the function to Xbase++.
XPPAPIRET _conReturn(XppParamList pList, ContainerHandle chx);
Returns NULL when the operation was successful. The function returns an error code (XPP_ERR_...) when the Xbase++ return value could not be set.
_conReturn() is used to set the return value a function sends to the calling Xbase++ application. If NULLCONTAINER is passed instead of a container handle, the return value is set to NIL. _conReturn() does not end the actual function but merely establishes its return value.
In order to insure correct operation, a return value should always be specified. In Xbase++, procedures are defined as functions which return NIL. But there may be only one call to one of the return functions (_ret...() or _conReturn). After the call an access to other C-API functions is not allowed any more and the function should return immediately. An exception is the call to _conRelease() which releases the ContainerHandle passed to _conReturn().
/*
Returns a logical value as a return value to Xbase++.
*/
#include <xppcon.h>
ContainerHandle hLogic;
BOOL logic;
/* ... assigns value to new logic type container */
hLogic = _conPutL(NULLCONTAINER, logic);
if (hLogic != NULLCONTAINER)
{
_conReturn(<pList>, hLogic);
_conRelease(hLogic);
}
else
{
/* Error occurred: return NIL. */
_conReturn(<pList>, NULLCONTAINER);
}
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.