JavaScript Editor js editor     Web development 

Main Page

Sets the library return value to a null-terminated string.

void _RetChar(char FAR *string)
char FAR *string;            /* String. */


If you need to return a string that might contain embedded null characters, use the _RetVal(В ) function.

For more information on how to create an API library and integrate it with Visual FoxPro, see Accessing the Visual FoxPro API.


The following example makes two calls to _RetChar(В ), demonstrating that control returns to the API routine from _RetChar(В ) and that the last _RetChar(В ) determines the value returned to Visual FoxPro.

Visual FoxPro Code

В Copy Code

C Code

В Copy Code
#include <pro_ext.h>

void FAR chars(ParamBlk FAR *parm)
   char message[] = "Hello, world";
FoxInfo myFoxInfo[] = {
   {"CHARS", (FPFI) chars, 0, ""}
FoxTable _FoxTable = {
   (FoxTable FAR *) 0, sizeof(myFoxInfo)/sizeof(FoxInfo), myFoxInfo

See Also

JavaScript Editor js editor     Web development