Function _conCall() Foundation
Calls an Xbase++ function with parameters.
XPPAPIRET _conCall(ContainerHandle chres, char *pszFuncName,
ULONG nParams, ...);
Returns NULL when the function is called successfully. Otherwise an error value is returned (XPP_ERR_...). If errors occur during execution of the function, the error code block is called. Note: If the error code block causes a BREAK, the return value of _conCall() is XPP_ERR_BREAK. If the error can be rectified by the error code block, the return value is NULL.
Using this function, all functions and procedures in an Xbase++ program not declared static, and all functions in the Xbase++ runtime library can be called. It is critical to pay attention to the number of parameters required by the function being called. If too few parameters are passed, a fatal error is generated and the process terminates.
/*
Read a character by calling the function Inkey(0)
*/
#include <xppcon.h>
ContainerHandle chnKey, chn;
XPPAPIRET xr;
LONG nKey;
chnKey = _conNew( NULLCONTAINER );
chn = _conPutNL( NULLCONTAINER, 0 );
if (chnKey != NULLCONTAINER && chn != NULLCONTAINER)
{
xr = _conCall( chnKey, "inkey", 1, chn );
if (xr == 0)
{
xr = _conGetNL( chnKey, &nKey );
if (xr == 0)
{
/*
Evaluates characters ...
*/
}
}
else
{
/* Error handling ... */
}
_conRelease( chnKey );
_conRelease( chn );
}
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.