Function _storclen() Foundation
Assigns a character string of explicit length to a parameter.
BOOL _storclen(CHAR *pBuffer, ULONG ulSize,
XppParamList pList, ULONG ulIndex, ...);
If the string is copied successfully, the function returns TRUE. If the return value is FALSE, not enough memory is available for the string to be copied.
The function _storclen() is used to assign a string which may contain NULL characters to a parameter. The string is copied up to the indicated length including NULL characters. It can, therefore, be overwritten after a call of the function. This function is normally used along with parameters passed by reference to return multiple values to the calling function. However, the changed parameters can also be accessed again within the C function.
/*
Assigns a new value to the first three parameters.
*/
#include <xpppar.h>
#include <stdlib.h>
CHAR buffer[80];
ULONG num;
for (num = 1; num < 3; num++)
{
sprintf(buffer, "New value for parameter %d", num);
storclen(buffer, strlen(buffer), <pList>, num, 0);
}
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.