Function
The function ListOfObjects is used to get a list of objects according to given criterions.
Declaration
APIRET ListOfObjects(ListObjRqPtr rqPtr, USHORT wait, ChainListObjDataPtr dataPtr)

Parameters
The parameter rqPtr defines a request for a list. It is possible to request a list of objects of particular type or list of all objects (the item Type of the parameter rqPtr must equal to O_ALL_TYPES). List can be limited by entering a mask (e.g. *DI). The item Access defines access rights - the list will not include the objects with higher access rights than the user's access rights. The item rel defines a relation of required objects to an object defined by the parameter Id, if this relation other than zero.  Relation can be e.g. children, reference objects etc. The parameter wait [s] defines a maximal wait time for a list of objects.
Return code
Code Description
API_OK List of objects obtained correctly in given time. Required data are returned by the parameter dataPtr in the form of a list. After use of the data, the allocated memory for each pointer must be freed by calling the function FreeData.
API_TimeoutError Required data was not available in given time.
API_ParamError The value of the parameters rqPtr or dataPtr is null.

Napíšte komentár