Function _conPutEmptyData() Foundation
Store the default null value of the passed datatype to its container.
ContainerHandle _conPutEmptyData(ContainerHandle chDest,
ULONG xppType,
LONG length,
LONG decs);
This function returns a container containing the new value.
The function _conPutEmptyData() is used to assign a default null value of a certain Xbase++ datatype to a container. If a null value for the Xbase++ datatypes "C" or "M" is to be created, the resulting container will contain an empty string of a specified length. Logical values will default to .F. (FALSE). The date datatype will be emptied, and numeric values will default to zero.
#include <windows.h>
#include "xppdef.h"
#include "xpppar.h"
#include "xppcon.h"
XPPRET XPPENTRY MyCAPIFunction(XppParamList paramList)
{ /* Declare and initialize variables */
ContainerHandle chTemp;
ContainerHandle chResult = _conNewArray( 1, 4 );
/* Create NULL values.*/
chTemp = _conPutEmptyData( NULLCONTAINER, XPP_CHARACTER, 10, 0 );
if(_conArrayPut( chResult, chTemp, 1, 0 ))
{ /* Error handling... */
}
chTemp = _conPutEmptyData( chTemp, XPP_LOGICAL, 0, 0 );
if(_conArrayPut( chResult, chTemp, 2, 0 ))
{ /* Error handling... */
}
chTemp = _conPutEmptyData( chTemp, XPP_DATE, 0, 0 );
if(_conArrayPut( chResult, chTemp, 3, 0 ))
{ /* Error handling... */
}
chTemp = _conPutEmptyData( chTemp, XPP_NUMERIC, 10, 0 );
if(_conArrayPut( chResult, chTemp, 4, 0 ))
{ /* Error handling... */
}
/* Return created array. */
_conReturn( paramList, chResult );
/* Release containers. */
_conRelease( chTemp );
_conRelease( chResult );
}
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.