In the User Function window:
| Return Type: |
Single |
| Input Parameters: |
long a; OUTPTR b; |
| Output Parameters: |
short w; char x[30]; long y; char z; |
In the state table:
STRING func7_char, NUMBER func7_long, NUMBER func7_short,
STRING func7_string, NUMBER send3_long;
AssignData(send3_long, "ASSIGN", "2") ;
SendData("CUSTOM_SERVER", "TEST_PARMS", 30, "TEST_PARMS_func7",
send3_long) ;
ReceiveData("CUSTOM_SERVER", "TEST_PARMS", 30, "TEST_PARMS_func7",
func7_short, func7_string, func7_long, func7_char) ;
So, using the data in SendData (above), the parameters in ReceiveData have the following values:
Example code
int TEST_PARMS_func7 (long a, char **b)
{
short w = 438;
char *x;
long y = 22432;
char z = 'Y';
char *buf_ptr;
x = "GAZELLE";
if (a == 2) {
buf_ptr = TP_buffer;
*(short *)buf_ptr = w;
buf_ptr += sizeof(w);
strcpy(buf_ptr, x);
buf_ptr += strlen(x) + 1;
*(long *)buf_ptr = y;
buf_ptr += sizeof(y);
*buf_ptr = z;
buf_ptr += sizeof(z);
*b = TP_buffer;
return (0);
} else {
return (-1);
} /* endif */
}