Function _conCallPa() Foundation

Calls an Xbase++ function.

Syntax
XPPAPIRET _conCallPa(ContainerHandle chResult,
                     char *funcName,
                     ULONG numParams,
                     ContainerHandle *chParams);
Parameters
ContainerHandle chResult
Handle of a container that will contain the return value of the Xbase++ function.
CHAR* funcName
The character pointer funcName points to a string identifying the name of the Xbase++ function.
ULONG numParams
The amount of parameters that will be passed to the Xbase++ function.
ContainerHandle* chParams
*chParams points to an array of containers that contain the parameters that shall be passed to the Xbase++ function.
Return

This function returns NULL if no error occured, otherwise it returns an error code (XPP_ERR_...).

Description

The function _conCallPa() is used to call an Xbase++ function with a variable parameter list. The parameter list is stored in an array and passed over to the Xbase++ function.

Examples
#include <windows.h> 

#include "xppdef.h" 
#include "xpppar.h" 
#include "xppcon.h" 

XPPRET XPPENTRY MyCAPIFunction(XppParamList paramList) 
{  /* Declare and initialize variables */ 
ContainerHandle chResult = _conNew( NULLCONTAINER ); 
ContainerHandle chParams[1]; 

/* Prepare function call */ 
chParams[0]=_conPutNL( NULLCONTAINER, (LONG)2 ); 

/* Call function. */ 
_conCallPa( chResult, "SQUARE", 1, chParams ); 

/* Return */ 
_conReturn( paramList, chResult ); 

/* Release containers. */ 
_conRelease( chResult ); 
_conRelease( chParams ); 
} 


/* Xbase++ code */ 
FUNCTION Square( nValue ) 
RETURN nValue * nValue 

PROCEDURE Main 
CLS 

? MyCAPIFunction() 
RETURN 
Feedback

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.