Function _conSizeC() Foundation
Determines the number of characters in a string container.
XPPAPIRET _conSizeC(ContainerHandle chs, ULONG *ulSize);
The function returns an error code (XPP_ERR_...) when the container is not of character type. Otherwise the return value is NULL and the length is placed in *ulSize.
Using _conSizeC() the length of the character string of a container of character or memo type can be determined.
/*
Determines the length of a character string.
*/
#include <xppcon.h>
ContainerHandle chs;
BOOL isRef;
XPPAPIRET xr;
ULONG sSize;
chs = _conParam(<pList>, 1, &isRef);
xr = _conSizeC(chs, &sSize);
if (xr != 0)
{
/*
... error: parameter 1 is not a string or no parameters were
passed.
*/
}
else
{
/*
... Parameter 1 is a string and *sSize contains the length of
the string
*/
}
/*
release the parameter container
(if not passed by reference)
*/
if (!isRef)
_conRelease(chs);
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.