Description
XDRAccept() is used to accept count items into the data array from over the NETLink.
Call Signature
int/string/mstring XDRAccept ( any ptr data [, int count] )
Return Value
int/string/mstring
For data other than strings,a non-zero value is returned if successfull, 0 otherwise. If "data" is zero, then a string will be returned from the method. If the "count" is more than one and "data" is zero, then an mstring value will be built from the multiple strings read and returned.
Arguments
any ptr data:
Pointer to an array of data of type byte, char, int, float, double into which the transported data should be accepted. If accepting a string, this field must be zero.
[ int count ]:
If this argument is present, this is the number of items of the type of data to be sent. If missing, the count is derived from the size of the data array. If a string is sent this count defaults to one, but may be passed with a value more than one.
Remarks
If data is not of one of the indicated types, and not zero, an error will occur.
Example
Receive a list of strings preceded by their count. Despite the fact that the count is a single (scalar) value, we have to create an array of more than one item in order to ensure that XDRAccept() will receive a data pointer rather than an integer value as it's first argument.
local mstring name_list, int name_count[2] call poLink.XDRAccept( name_count, 1) name_list = poLink.XDRAccept( 0, name_count[1] )
See also
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.