ListApplyToEachEx
int ListApplyToEachEx (ListType list, int order, ListApplicationFuncEx callbackFunction, void *callbackData);
Purpose
This function takes a list and a callback function and calls the callback for each item in the list.
Parameters
Input | ||
Name | Type | Description |
list | ListType | Pass the list containing the items on which to call the specified callback function. |
order | int | Specify a nonzero value or select Ascending in the function panel to traverse the items in the list from first to last. Specify 0 or select Descending in the function panel to traverse the items in the list from last to first. |
callbackFunction | ListApplicationFuncEx | Pass the callback function to call for each item in the list. The function must have the following prototype: int CVICALLBACK ListApplicationFunc(size_t index, void *ptrToItem, void *callbackData); The callback function receives the following information when it is called:
If the list application function returns zero or a positive integer, the callback function continues to be called for the remaining items in the list. However, if the list application function returns a negative number, then ListApplyToEachEx stops and returns the negative number as its result. |
callbackData | void * | A user–defined value passed to the callback function each time the callback function is called. |
Return Value
Name | Type | Description |
result | int | Returns the result of the last call to Function_To_Apply. |
Additional Information
Library: Programmer's Toolbox
Include file: toolbox\toolbox.h
LabWindows/CVI compatibility: LabWindows/CVI 2009 and later