Function _retclen() Foundation
Sets a character string with explicit length as a return value.
BOOL _retclen(XppParamList pList, CHAR *cBuffer, ULONG ulSize);
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.
_retclen() is used to return a string which may contain NULL characters as a character string to Xbase++. The string, including NULL characters, is copied into the return container up to the specified length. Calling this function does not exit the actual function, but merely sets the return value. After the call an access to other C-API functions except for _conRelease()is not allowed anymore and the function should return immediately.
/*
Reads data from a file and sets it as the return value of the
function.
*/
#include <xpppar.h>
#include <stdio.h>
CHAR buffer[1024];
ULONG len;
len = fread(<file>, buffer, 1024);
retclen(<pList>, buffer, len);
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.