_RetChar( ) API Library Routine Example
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.
SET LIBRARY TO RETCHAR
#include <pro_ext.h>
void FAR chars(ParamBlk FAR *parm)
{
char message[] = "Hello, world";
_RetChar(message);
}
FoxInfo myFoxInfo[] = {
{"CHARS", (FPFI) chars, 0, ""}
};
FoxTable _FoxTable = {
(FoxTable FAR *) 0, sizeof(myFoxInfo)/sizeof(FoxInfo), myFoxInfo
};