Function _conPutCL() Foundation
Assigns a character string with an explicit length to a container or produces a new string container.
ContainerHandle _conPutCL(ContainerHandle ch,
CHAR *pBuffer, ULONG ulSize);
Returns either the passed container handle or a handle to a new container. The return value is NULLCONTAINER if an error occurrs.
The function _conPutCL() is used to assign a character string of explicit length to a container. The character string is copied up to the indicated length, including any contained NULL characters. When the passed container handle has the value NULLCONTAINER, a new container is created. Otherwise, the value of the passed container is changed.
When a new container is created, it must be released with _conRelease() as soon as it is no longer needed.
/*
Creates a container with data of character type.
*/
#include <xppcon.h>
ContainerHandle hString;
CHAR cBuffer[100];
XPPAPIRET xr;
/* ... initialization of the buffer with any data */
hString = _conPutCL(NULLCONTAINER, cBuffer, sizeof(cBuffer));
if (hString != NULLCONTAINER)
{
/* ... operations with the container */
_conRelease(hString);
}
else
{
xr = _conLastError();
/* ... error handling */
}
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.